๐ชHooking
These are all of the functions revolving hooking that Wave supports.
Clone Function
<function> clonefunction(<function> a1)
Clones function
a1
.
Alternative:
clonefunc
Get Callback Value
<any> getcallbackvalue(<function fn>)
Retrieves the current value or reference of
fn
that has been set or hooked.
Hook Function
<function> hookfunction(<function> old, <function> new)
Hooks function
old
, replacing it with the functionnew
. Theold
function is returned, you must use this function in order to call the original function.
Alternative:
replaceclosure
,hookfunc
,replacefunction
,replacefunc
,detourfunction
,replaceclosure
,detour_function
Hook Metamethod
<function> hookmetamethod(<Object> object, <string> metamethod, <function> a1)
Hooks the
metamethod
passed inobject
's metatable witha1
.
Is Hooked
<bool> ishooked(<function fn>)
Checks if
fn
has been hooked (i.e., replaced or wrapped by a hook).
Alternative:
isfunctionhooked
Is Our Call Stack
<bool> isourcallstack(<int level>)
Checks if
level
originates from the executorโs environment.
New C Closure
<function> newcclosure(<function> a1)
Pushes a new C Closure that invokes the function
a1
upon call.
New Lua Closure
<function> newlclosure(<function fn>)
Pushes a new L Closure that invokes the function
fn
upon call.
Protect Closure
<void> protectclosure(<function fn>)
Prevents
fn
from being hooked or modified by external code.
Alternative:
protectfunction
Restore Closure
<void> restoreclosure(<function fn>)
Restores
fn
back to its original, unmodified closure.
Alternative:
restorefunction
,restorefunc
Last updated