An advanced service for hooking native NWN functions.
More...
An advanced service for hooking native NWN functions.
◆ RequestHook< T >() [1/2]
FunctionHook<T> Anvil.Services.HookService.RequestHook< T > |
( |
T |
handler, |
|
|
int |
order = HookOrder.Default |
|
) |
| |
|
inline |
Requests a hook for a native function.
- Parameters
-
handler | The handler to be invoked when this function is called. Once hooked, the original function will not be called, and must be invoked manually via the returned object. |
order | The execution order for this hook. See the constants in HookOrder. |
- Template Parameters
-
T | The delegate type that identically matches the native function signature. |
- Returns
- A wrapper object containing a delegate to the original function. The wrapped object can be disposed to release the hook.
◆ RequestHook< T >() [2/2]
FunctionHook<T> Anvil.Services.HookService.RequestHook< T > |
( |
void * |
handler, |
|
|
int |
order = HookOrder.Default |
|
) |
| |
|
inline |
Requests a hook for a native function.
- Parameters
-
handler | A delegate pointer (delegate*) to be invoked when the original game function is called. Once hooked, the original function will not be called, and must be invoked manually via the returned object. |
order | The execution order for this hook. See the constants in HookOrder. |
- Template Parameters
-
T | The delegate type that identically matches the native function signature. Must have the NativeFunctionAttribute applied. |
- Returns
- A wrapper object containing a delegate to the original function. The wrapped object can be disposed to release the hook.
The documentation for this class was generated from the following file:
- NWN.Anvil/src/main/Services/Core/Hooking/HookService.cs