View Single Post
12-14-08, 07:57 AM   #110
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,710
Originally Posted by haste View Post
No, the event system is only set on the oUF objects. I did think about applying it to all elements that could use events, but it's not worth the overhead. Neither I am really sure of when you would want to register events upon a element, instead of oUF itself.
Just read that you can register multiple functions to the same event with :RegisterEvent('EVENT', func), so it wont be nessisary for the sub-object one.
Can easily do this for my druidpower function now.

Code:
self:RegisterEvent('UNIT_MANA', DruidPowerFunc)
self:RegisterEvent('UNIT_ENERGY', DruidPowerFunc)
self:RegisterEvent('PLAYER_LOGIN', DruidPowerFunc)
Right?

Last edited by p3lim : 12-14-08 at 08:00 AM. Reason: wrong objects in code