View Single Post
08-04-12, 08:58 PM   #195
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
The method is called RegisterUnitEvent. I think it should be pretty obvious that it only works with unit events...

There is really no need to have this for events like ADDON_LOADED, which almost never fire after the initial loading sequence. The whole point of RegisterUnitEvent isn't to save you from the crushing burden of typing that one line of code to check the unit... it's to speed up processing of events that fire very frequently (especially in combat) and are almost always filtered by the unit they pass. Aside from the UNIT_* events, the only event that really falls into this category is COMBAT_LOG_EVENT_UNFILTERED.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.