Trace aura state reset in OvaleAura for debugging.
Johnny C. Lam [05-05-14 - 18:03]
Trace aura state reset in OvaleAura for debugging.
git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@1381 d5049fe3-3747-40f7-a4b5-f36d6801af5f
diff --git a/OvaleAura.lua b/OvaleAura.lua
index e61ce15..b948c2a 100644
--- a/OvaleAura.lua
+++ b/OvaleAura.lua
@@ -639,6 +639,7 @@ function OvaleAura:ResetState(state)
state.serial = state.serial + 1
-- Garbage-collect auras in the state machine that are more recently updated in the true aura database.
+ Ovale:Log("Resetting aura state:")
for guid, auraTable in pairs(state.aura) do
for auraId, whoseTable in pairs(auraTable) do
for casterGUID, aura in pairs(whoseTable) do
@@ -646,9 +647,11 @@ function OvaleAura:ResetState(state)
if auraFound and aura.lastUpdated <= auraFound.lastUpdated then
self_pool:Release(aura)
whoseTable[casterGUID] = nil
+ Ovale:Logf(" Aura %d removed; more recently updated outside simulator.", auraId)
else
-- Reset the aura age relative to the state of the simulator.
aura.serial = state.serial
+ Ovale:Logf(" Aura %d preserved in simulator.", auraId)
end
end
if not next(whoseTable) then