diff --git a/artifacts/scripting/hooks.yml b/artifacts/scripting/hooks.yml index 294ed09c..3c3f5886 100644 --- a/artifacts/scripting/hooks.yml +++ b/artifacts/scripting/hooks.yml @@ -375,6 +375,7 @@ Obj arg1 - The target Item arg2 - Item being stolen/planted int arg3 - 0 when stealing, 1 when planting + int arg4 - quantity of items being stolen int ret0 - overrides hard-coded handler (1 - force success, 0 - force fail, -1 - use engine handler) ``` diff --git a/artifacts/scripting/hookscripts.md b/artifacts/scripting/hookscripts.md index 70871f30..7d011563 100644 --- a/artifacts/scripting/hookscripts.md +++ b/artifacts/scripting/hookscripts.md @@ -478,6 +478,7 @@ Critter arg0 - Thief Obj arg1 - The target Item arg2 - Item being stolen/planted int arg3 - 0 when stealing, 1 when planting +int arg4 - quantity of items being stolen int ret0 - overrides hard-coded handler (1 - force success, 0 - force fail, -1 - use engine handler) ``` diff --git a/sfall/Modules/HookScripts/MiscHs.cpp b/sfall/Modules/HookScripts/MiscHs.cpp index 787e2ed9..54afa7c8 100644 --- a/sfall/Modules/HookScripts/MiscHs.cpp +++ b/sfall/Modules/HookScripts/MiscHs.cpp @@ -209,10 +209,11 @@ static void __declspec(naked) StealCheckHook() { mov args[4], edx; // target mov args[8], ebx; // item mov args[12], ecx; // is planting + mov args[16], esi; // quantity pushadc; } - argCount = 4; + argCount = 5; RunHookScript(HOOK_STEAL); __asm {