From fe86d7699074933e4af291b16b05fa56c4aaa658 Mon Sep 17 00:00:00 2001 From: Sidoine De Wispelaere Date: Mon, 15 Mar 2010 18:50:09 +0000 Subject: [PATCH] fix with castTime git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@245 d5049fe3-3747-40f7-a4b5-f36d6801af5f --- Ovale.lua | 16 +++++++++++----- Ovale.toc | 2 +- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/Ovale.lua b/Ovale.lua index 0f6787a..1ac820e 100644 --- a/Ovale.lua +++ b/Ovale.lua @@ -530,9 +530,11 @@ function Ovale:UNIT_AURA(event, unit) end function Ovale:CompileAll() - self.masterNodes = self:Compile(self.db.profile.code) - self:UpdateFrame() - self.needCompile = false + if self.db.profile.code then + self.masterNodes = self:Compile(self.db.profile.code) + self:UpdateFrame() + self.needCompile = false + end end function Ovale:HandleProfileChanges() @@ -1409,7 +1411,11 @@ function Ovale:CalculerMeilleureAction(element) element.castTime = self.spellInfo[spellName].casttime elseif spellName then local spell, rank, icon, cost, isFunnel, powerType, castTime = GetSpellInfo(spellName) - element.castTime = castTime/1000 + if castTime then + element.castTime = castTime/1000 + else + element.castTime = nil + end else element.castTime = 0 end @@ -1651,7 +1657,7 @@ function Ovale:CalculerMeilleureAction(element) if nouveauElement then newCastTime = nouveauElement.castTime end - if not newCastTime or newCastTime == 0 then + if not newCastTime or newCastTime < self.gcd then newCastTime = self.gcd end diff --git a/Ovale.toc b/Ovale.toc index fc50214..917a35a 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.3.31 +## Version: 3.3.32 ## OptionalDeps: Ace3, ButtonFacade, Recount, LibBabble-CreatureType-3.0 ## SavedVariables: OvaleDB ## SavedVariablesPerCharacter: OvaleDBPC -- 1.7.9.5