Quantcast

Add a timestamp to the args associated with Ovale_Aura* events.

Johnny C. Lam [09-26-13 - 05:34]
Add a timestamp to the args associated with Ovale_Aura* events.

git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@1032 d5049fe3-3747-40f7-a4b5-f36d6801af5f
Filename
OvaleAura.lua
OvaleFuture.lua
diff --git a/OvaleAura.lua b/OvaleAura.lua
index b6a832b..3139ba6 100644
--- a/OvaleAura.lua
+++ b/OvaleAura.lua
@@ -160,9 +160,9 @@ local function UnitGainedAura(guid, spellId, filter, casterGUID, icon, count, de
 		end
 	end
 	if not existingAura then
-		self:SendMessage("Ovale_AuraAdded", guid, spellId, casterGUID)
+		self:SendMessage("Ovale_AuraAdded", now, guid, spellId, casterGUID)
 	elseif not auraIsUnchanged then
-		self:SendMessage("Ovale_AuraRefreshed", guid, spellId, casterGUID)
+		self:SendMessage("Ovale_AuraRefreshed", now, guid, spellId, casterGUID)
 	end
 	return addAura
 end
@@ -173,7 +173,7 @@ local function RemoveAuraIfExpired(guid, spellId, filter, aura, serial)
 		local now = API_GetTime()
 		Ovale:DebugPrintf(OVALE_AURA_DEBUG, "    Removing expired %s %s (%s) from %s at %f, serial=%d aura.serial=%d",
 			filter, aura.name, spellId, guid, now, serial, aura.serial)
-		self:SendMessage("Ovale_AuraRemoved", guid, spellId, aura.source)
+		self:SendMessage("Ovale_AuraRemoved", now, guid, spellId, aura.source)
 		self_pool:Release(aura)
 		return true
 	end
diff --git a/OvaleFuture.lua b/OvaleFuture.lua
index 827a869..cc08ee1 100644
--- a/OvaleFuture.lua
+++ b/OvaleFuture.lua
@@ -279,9 +279,9 @@ function OvaleFuture:PLAYER_ENTERING_WORLD(event)
 	end
 end

-function OvaleFuture:Ovale_AuraAdded(event, guid, spellId, caster)
+function OvaleFuture:Ovale_AuraAdded(event, timestamp, guid, spellId, caster)
 	if guid == OvaleGUID:GetGUID("player") then
-		self_timeAuraAdded = API_GetTime()
+		self_timeAuraAdded = timestamp
 	end
 end