View Single Post
12-19-19, 08:01 PM   #4
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,324
Functions are immutable. What hooksecurefunc() does is wrap the original function and your hook to run together from a new function, then overwrites the original with it. You can observe this by looking at the function pointer before and after hooking. They'll be different.

You can delay the hook and still have the local variable defined. You just need to update the pointer stored in the local after hooking.
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)

Last edited by SDPhantom : 12-19-19 at 08:04 PM.
  Reply With Quote