From 9d4c9aa8cd14c36cadd61b4a5e92280f18446031 Mon Sep 17 00:00:00 2001 From: "Johnny C. Lam" Date: Sat, 3 May 2014 23:17:58 +0000 Subject: [PATCH] Fix bug that caused state auras to always be at least 1 stack. This bug was hidden before the change to garbage-collect only the state auras that were reflected in the real auras. git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@1367 d5049fe3-3747-40f7-a4b5-f36d6801af5f --- OvaleAura.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/OvaleAura.lua b/OvaleAura.lua index ac77f69..74075d8 100644 --- a/OvaleAura.lua +++ b/OvaleAura.lua @@ -917,10 +917,10 @@ statePrototype.ApplySpellAuras = function(state, spellId, guid, startCast, endCa local duration, dotDuration, tick, numTicks = state:GetDuration(auraId, spellcast) local stacks = 1 - if type(spellData) == "number" and spellData > 0 then + if type(spellData) == "number" then stacks = spellData -- Deprecated after transition. - if not (si and si.duration) then + if not (si and si.duration) and spellData > 0 then -- Aura doesn't have duration SpellInfo(), so treat spell data as duration. duration = spellData stacks = 1 @@ -1004,7 +1004,7 @@ statePrototype.ApplySpellAuras = function(state, spellId, guid, startCast, endCa end else -- Aura is not on the target. - if stacks > 0 then + if spellData ~= "refresh" and stacks > 0 then -- Spellcast causes a new aura. Ovale:Logf("New aura %d at %f on %s", auraId, atTime, guid) -- Add an aura in the simulator and copy the existing aura information over. -- 1.7.9.5