View Single Post
12-27-08, 12:14 PM   #176
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 1,027
Originally Posted by Kellen View Post
How do you hook using the new event structure? I suck pretty hard at this and was using the following in 1.2.1:

Code:
local orig_RAID_TARGET_UPDATE = self.RAID_TARGET_UPDATE
self.RAID_TARGET_UPDATE = function (self, event)
  orig_RAID_TARGET_UPDATE(self, event)
  PositionRaidIcon(self)
end
There really isn't any straight forward way to hook with the new event system. You can however just register the event with a function parameter, and oUF will place it afterwards in the call rotation. It's just a post-hook however, nothing more.

Replacing the function isn't really recommended as oUF uses this to handle unregistering of events tho'.