Quantcast

Workaround for aura lag.

Johnny C. Lam [05-08-14 - 17:27]
Workaround for aura lag.

This is ultimately a problem in OvaleFuture where a spell may have
finished casting and landed on the target, but any target auras applied by
the spell haven't yet been applied on the target due to aura lag.

Need to find a way to still apply spell effects on a spell that has landed
on its target but not yet applied auras.  Perhaps split out another level
of ApplySpell() due to aura lag.

git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@1411 d5049fe3-3747-40f7-a4b5-f36d6801af5f
Filename
OvaleAura.lua
diff --git a/OvaleAura.lua b/OvaleAura.lua
index 15077ce..4ec8b9d 100644
--- a/OvaleAura.lua
+++ b/OvaleAura.lua
@@ -647,11 +647,15 @@ 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)
+					Ovale:Logf("    Aura %d on %d removed; more recently updated outside simulator.", auraId, guid)
+				elseif not IsWithinAuraLag(aura.start, state.currentTime) then
+					self_pool:Release(aura)
+					whoseTable[casterGUID] = nil
+					Ovale:Logf("    Aura %d on %d removed; outside of predicted aura lag.", auraId, guid)
 				else
 					-- Reset the aura age relative to the state of the simulator.
 					aura.serial = state.serial
-					Ovale:Logf("    Aura %d preserved in simulator.", auraId)
+					Ovale:Logf("    Aura %d on %d preserved in simulator.", auraId, guid)
 				end
 			end
 			if not next(whoseTable) then