WoW:Hooking functions: Difference between revisions

Marking OOD: Needs info on tainting and secure hooks
(Added other hooking functions (other than Sea))
(Marking OOD: Needs info on tainting and secure hooks)
Line 11: Line 11:


== How to Hook a Function ==
== How to Hook a Function ==
 
{{ood}}
Let's say we wanted to show the target's level instead of the skull for players and monsters much higher level than us.  The function responsible for hiding the level is TargetFrame_CheckLevel(), so we need to hook that function to make it un-hide the level.
Let's say we wanted to show the target's level instead of the skull for players and monsters much higher level than us.  The function responsible for hiding the level is TargetFrame_CheckLevel(), so we need to hook that function to make it un-hide the level.


Line 125: Line 125:


== Hook Chains ==
== Hook Chains ==
 
{{ood}}
This can be a little tricky, but it works.  Let's say there are two seperate addons, one that attaches the player tooltip to the mouse, and one that replaces ?? with the player's level.  One addon is called "AnchorToolTip", and the other is called "ShowLevel"
This can be a little tricky, but it works.  Let's say there are two seperate addons, one that attaches the player tooltip to the mouse, and one that replaces ?? with the player's level.  One addon is called "AnchorToolTip", and the other is called "ShowLevel"