HOOK_STEAL: add arg4 - quantity of items stolen

This commit is contained in:
phobos2077
2023-07-22 03:29:31 +02:00
parent 0e8b6efe49
commit b2c9b1cc23
3 changed files with 4 additions and 1 deletions
+1
View File
@@ -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)
```
+1
View File
@@ -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)
```
+2 -1
View File
@@ -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 {