Originally Posted by opismahname
Or could you post how the entire code would be?
|
I would be happy to if you'd like; although wouldn't that invalidate the point of trying to make your own addon?
Otherwise:
What you want to do is put some checks in your OnEvent function itself, the function that you call eventHandler.
Code:
frame:SetScript("OnEvent", eventHandler)
and
Code:
frame:RegisterEvent("UNIT_AURA");
are both already correct as they are. You need to put some logic in eventHandler to detect the three things I mentioned above:
Code:
local function eventHandler(self, event, ...)
--some stuff goes here
--your existing code
end