From c095e54b62b08dc787fdc85d707594fe5682db92 Mon Sep 17 00:00:00 2001 From: "Mr.Stalin" Date: Thu, 9 Mar 2017 19:26:13 +0300 Subject: [PATCH] Add new get arguments(arg7/arg8/arg9) to HOOK_BARTERPRICE (from Crafty) --- sfall/HookScripts.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/sfall/HookScripts.cpp b/sfall/HookScripts.cpp index f8d5a58f..a100cb9b 100644 --- a/sfall/HookScripts.cpp +++ b/sfall/HookScripts.cpp @@ -520,7 +520,7 @@ static void __declspec(naked) RemoveObjHook() { static void __declspec(naked) BarterPriceHook() { __asm { - hookbegin(6); + hookbegin(9); mov args[0], eax; mov args[4], edx; call barter_compute_value_ @@ -533,6 +533,16 @@ static void __declspec(naked) BarterPriceHook() { mov eax, ds:[_btable] call item_total_cost_ mov args[20], eax; + mov eax, ds:[_ptable] + mov args[24], eax + call item_total_cost_ + mov args[28], eax + xor eax, eax + cmp edi, args[0] // check offers button + jne skip + inc eax +skip: + mov args[32], eax mov eax, edx; pushad; push HOOK_BARTERPRICE;