From 99e699f4b394c361ff1c331e9e87fa015d98166d Mon Sep 17 00:00:00 2001 From: "Johnny C. Lam" Date: Thu, 8 May 2014 17:27:54 +0000 Subject: [PATCH] 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 --- OvaleAura.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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 -- 1.7.9.5