View Single Post
10-10-16, 10:40 PM   #6
nebula
A Deviate Faerie Dragon
 
nebula's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2007
Posts: 16
Originally Posted by Phanx View Post
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.

Last edited by nebula : 10-11-16 at 01:09 AM.
  Reply With Quote