View Single Post
01-09-10, 09:25 PM   #4
Akryn
A Firelord
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 479
Originally Posted by opismahname View Post
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
  Reply With Quote