From 9ed7d024f3295a666b42234e7d93a2c382f664fc Mon Sep 17 00:00:00 2001 From: "Johnny C. Lam" Date: Fri, 19 Jul 2013 05:33:38 +0000 Subject: [PATCH] Raise events in OvaleAura when auras are added, refreshed or deleted. The events are: Ovale_AuraAdded Ovale_AuraRefreshed Ovale_AuraDeleted and the arguments for these events are: unit GUID, aura spell ID, caster GUID git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@979 d5049fe3-3747-40f7-a4b5-f36d6801af5f --- OvaleAura.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/OvaleAura.lua b/OvaleAura.lua index cd63543..61f0471 100644 --- a/OvaleAura.lua +++ b/OvaleAura.lua @@ -176,6 +176,11 @@ local function UnitGainedAura(event, guid, spellId, filter, casterGUID, icon, co end end end + if not existingAura then + self:SendMessage("Ovale_AuraAdded", guid, spellId, casterGUID) + elseif not auraIsUnchanged then + self:SendMessage("Ovale_AuraRefreshed", guid, spellId, casterGUID) + end return addAura end @@ -183,6 +188,7 @@ local function RemoveAuraIfExpired(guid, spellId, filter, aura, serial) if aura and serial and aura.serial ~= serial then Ovale:DebugPrintf(OVALE_AURA_DEBUG, "Removing expired %s %s (%s) from %s, serial=%d aura.serial=%d", filter, aura.name, spellId, guid, serial, aura.serial) + self:SendMessage("Ovale_AuraRemoved", guid, spellId, aura.source) self_pool:Release(aura) return true end -- 1.7.9.5