View Single Post
11-09-14, 09:15 AM   #5
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,710
Originally Posted by gwyd View Post
This fixes it. Any thoughts on why the event isn't firing on the unit in this case? Also, thanks for the help.
When you register a UNIT_* event on a frame in oUF, it ties the unit the event fires for to the unit associated with the frame.
So, if you register say UNIT_HEALTH on your player frame, the function will only fire if the event fired for the player unit.
The 3rd argument to frame:RegisterEvent() is to override this check, which is why the argument is called "unitless"

See this source for more details:
https://github.com/haste/oUF/blob/ma...s.lua#L53-L100

In the past, oUF's event handler checked everything itself, but somewhere during Cata or Mists we got a new method called RegisterUnitEvent to do this work for us, and is what oUF uses today.
  Reply With Quote