From 3522ee2c011dce20e33765f8faee641aa3cce7e4 Mon Sep 17 00:00:00 2001 From: Sidoine De Wispelaere Date: Sat, 18 Apr 2009 14:38:28 +0000 Subject: [PATCH] - bug fix: hides the cooldown when a spell has no cooldown when it is first shown (e.g. a spell that is casted after a proc) git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@30 d5049fe3-3747-40f7-a4b5-f36d6801af5f --- OvaleIcone.lua | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/OvaleIcone.lua b/OvaleIcone.lua index 65101af..45076c5 100644 --- a/OvaleIcone.lua +++ b/OvaleIcone.lua @@ -34,9 +34,17 @@ if (minAttente~=nil and meilleureAction) then if (meilleureAction~=self.actionCourante or self.ancienneAttente==nil or - (minAttente~=0 and minAttente>self.ancienneAttente+0.01)) then + (minAttente~=0 and minAttente>self.ancienneAttente+0.01) or + (Ovale.maintenant + minAttente < self.finAction-0.01)) then self.actionCourante = meilleureAction self.debutAction = Ovale.maintenant + self.finAction = minAttente + self.debutAction + if (minAttente == 0) then + self.cd:Hide() + else + self.cd:Show() + self.cd:SetCooldown(self.debutAction, self.finAction - self.debutAction); + end end self.ancienneAttente = minAttente @@ -51,8 +59,8 @@ self.icone:SetAlpha(0.25) end - if (minAttente~=0) then - self.cd:SetCooldown(self.debutAction, minAttente+(Ovale.maintenant-self.debutAction)); + if (minAttente==0) then + self.cd:Hide() end -- Le temps restant -- 1.7.9.5