Johnny C. Lam [04-21-14 - 05:02]
diff --git a/OvaleAura.lua b/OvaleAura.lua
index b2e07dd..5788381 100644
--- a/OvaleAura.lua
+++ b/OvaleAura.lua
@@ -1,6 +1,6 @@
--[[--------------------------------------------------------------------
Ovale Spell Priority
- Copyright (C) 2013 Johnny C. Lam
+ Copyright (C) 2013, 2014 Johnny C. Lam
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License in the LICENSE
@@ -373,7 +373,7 @@ function OvaleAura:IsActiveAura(aura, now)
return boolean
end
-function OvaleAura:GainedAuraOnGUID(guid, atTime, auraId, casterGUID, filter, icon, count, debuffType, duration, expirationTime, isStealable, name, value1, value2, value3)
+function OvaleAura:GainedAuraOnGUID(guid, atTime, auraId, casterGUID, filter, visible, icon, count, debuffType, duration, expirationTime, isStealable, name, value1, value2, value3)
-- Whose aura is it?
casterGUID = casterGUID or UNKNOWN_GUID
local mine = (casterGUID == self_guid)
@@ -421,6 +421,7 @@ function OvaleAura:GainedAuraOnGUID(guid, atTime, auraId, casterGUID, filter, ic
aura.stacks = count
aura.consumed = nil
aura.filter = filter
+ aura.visible = visible
aura.icon = icon
aura.debuffType = debuffType
aura.enrage = IsEnrageEffect(auraId)
@@ -543,7 +544,7 @@ function OvaleAura:ScanAurasOnGUID(guid)
end
else
local casterGUID = OvaleGUID:GetGUID(unitCaster)
- self:GainedAuraOnGUID(guid, now, spellId, casterGUID, filter, icon, count, debuffType, duration, expirationTime, isStealable, name, value1, value2, value3)
+ self:GainedAuraOnGUID(guid, now, spellId, casterGUID, filter, true, icon, count, debuffType, duration, expirationTime, isStealable, name, value1, value2, value3)
i = i + 1
end
end
@@ -554,7 +555,13 @@ function OvaleAura:ScanAurasOnGUID(guid)
for auraId, whoseTable in pairs(auraTable) do
for casterGUID, aura in pairs(whoseTable) do
if aura.serial == serial - 1 then
- self:LostAuraOnGUID(guid, now, auraId, casterGUID)
+ if aura.visible then
+ -- Remove the aura if it was visible.
+ self:LostAuraOnGUID(guid, now, auraId, casterGUID)
+ else
+ -- Age any hidden auras that are managed by outside modules.
+ aura.serial = serial
+ end
end
end
end
diff --git a/OvaleBanditsGuile.lua b/OvaleBanditsGuile.lua
index a9a41e4..1c9b778 100644
--- a/OvaleBanditsGuile.lua
+++ b/OvaleBanditsGuile.lua
@@ -162,7 +162,7 @@ end
function OvaleBanditsGuile:GainedAura(atTime)
atTime = atTime or API_GetTime()
- OvaleAura:GainedAuraOnGUID(self_guid, atTime, BANDITS_GUILE, self_guid, "HELPFUL", nil, self.stacks, nil, INSIGHT_DURATION, self.ending, nil, "Bandit's Guile", nil, nil, nil)
+ OvaleAura:GainedAuraOnGUID(self_guid, atTime, BANDITS_GUILE, self_guid, "HELPFUL", nil, nil, self.stacks, nil, INSIGHT_DURATION, self.ending, nil, "Bandit's Guile", nil, nil, nil)
end
function OvaleBanditsGuile:LostAura(atTime)
diff --git a/OvaleSteadyFocus.lua b/OvaleSteadyFocus.lua
index 3fb6018..8fc3b97 100644
--- a/OvaleSteadyFocus.lua
+++ b/OvaleSteadyFocus.lua
@@ -128,7 +128,7 @@ function OvaleSteadyFocus:GainedAura(atTime)
self.start = atTime
self.ending = math.huge
self.stacks = self.stacks + 1
- OvaleAura:GainedAuraOnGUID(self_guid, self.start, PRE_STEADY_FOCUS, self_guid, "HELPFUL", nil, 1, nil, math.huge, self.ending, nil, "Pre-Steady Focus", nil, nil, nil)
+ OvaleAura:GainedAuraOnGUID(self_guid, self.start, PRE_STEADY_FOCUS, self_guid, "HELPFUL", nil, nil, 1, nil, math.huge, self.ending, nil, "Pre-Steady Focus", nil, nil, nil)
end
function OvaleSteadyFocus:LostAura(atTime)