From 0022f358ee71ca12fa449594b1c7ed1c86ec497f Mon Sep 17 00:00:00 2001 From: Sidoine De Wispelaere Date: Fri, 20 Nov 2009 21:06:50 +0000 Subject: [PATCH] do not spam if red git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@134 d5049fe3-3747-40f7-a4b5-f36d6801af5f --- Ovale.toc | 2 +- OvaleIcone.lua | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Ovale.toc b/Ovale.toc index 27478f6..0ec034b 100644 --- a/Ovale.toc +++ b/Ovale.toc @@ -3,7 +3,7 @@ ## Notes: Show the icon of the next spell to cast ## Notes-frFR: Affiche l'icône du prochain sort à lancer ## Author: Sidoine -## Version: 3.2.16 +## Version: 3.2.17 ## OptionalDeps: Ace3, ButtonFacade, Recount ## SavedVariables: OvaleDB ## SavedVariablesPerCharacter: OvaleDBPC diff --git a/OvaleIcone.lua b/OvaleIcone.lua index 6d8a0dd..4f9dd85 100644 --- a/OvaleIcone.lua +++ b/OvaleIcone.lua @@ -52,9 +52,11 @@ local function Update(self, minAttente, actionTexture, actionInRange, actionCool self.icone:SetAlpha(0.33) end + local red if (Ovale.maintenant + minAttente > actionCooldownStart + actionCooldownDuration + 0.01 and minAttente > 0 and minAttente>Ovale.attenteFinCast) then self.icone:SetVertexColor(0.75,0.2,0.2) + red = true else self.icone:SetVertexColor(1,1,1) end @@ -64,7 +66,7 @@ local function Update(self, minAttente, actionTexture, actionInRange, actionCool end -- La latence - if minAttente>0 and Ovale.db.profile.apparence.highlightIcon then + if minAttente>0 and Ovale.db.profile.apparence.highlightIcon and not red then local lag = 0.6 local newShouldClick if minAttente