Fix ticket 304 - Buff tracking bugged.
Johnny C. Lam [10-24-13 - 05:40]
Fix ticket 304 - Buff tracking bugged.
OvaleAura was missed in the code sweep to use time spans in r1045.
OvaleAura was using nil to represent infinity in auras for both duration
and expiration time. This caused OvaleCondition to consider these auras
as invalid because OvaleCondition is much more strict now when checking
the start and ending times for auras. Use math.huge (the correct value to
represent infinity for time spans) instead.
This bug only appeared when the aura has "infinite" duration, or no
expiration time.
git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@1108 d5049fe3-3747-40f7-a4b5-f36d6801af5f
diff --git a/OvaleAura.lua b/OvaleAura.lua
index dc4adc5..d62f90f 100644
--- a/OvaleAura.lua
+++ b/OvaleAura.lua
@@ -119,13 +119,14 @@ local function UnitGainedAura(guid, spellId, filter, casterGUID, icon, count, de
aura.stacks = count
aura.debuffType = debuffType
if duration > 0 then
+ aura.start = expirationTime - duration
aura.duration = duration
aura.ending = expirationTime
else
- aura.duration = nil
- aura.ending = nil
+ aura.start = now
+ aura.duration = math.huge
+ aura.ending = math.huge
end
- aura.start = expirationTime - duration
aura.stealable = isStealable
aura.mine = mine
aura.source = casterGUID