Originally Posted by Phanx
However, based on the event you chose as an example, I think you may be confused about what RegisterUnitEvent does. "Unit events" are events whose names start with "UNIT_" and whose first argument is a unit token. PLAYER_SPECIALIZATION_CHANGED is not a "unit event", so you can't use RegisterUnitEvent with it anyway.
|
PLAYER_SPECIALIZATION_CHANGED is actually a unit event now, so maybe that is the source of some confusion. I'm not sure when it changed, but it fires for more than just the player and passes the unit.
Anyway, probably overkill for most things, but we create a pseudo unit event handler in
BigWigs that basically keeps a pool of frames for each unit and calls RegisterUnitEvent on the corresponding frame. I made a patch for AceEvent way back using this approach, but we decided it was a bit much to add.