From 71650f981f06f22dd80bee8e59c82e07d7664201 Mon Sep 17 00:00:00 2001 From: qndel Date: Wed, 21 Aug 2024 23:19:14 +0200 Subject: [PATCH] fix repair and recharge (#7360) --- Source/stores.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Source/stores.cpp b/Source/stores.cpp index baa6afb9a09..537de975f84 100644 --- a/Source/stores.cpp +++ b/Source/stores.cpp @@ -1483,8 +1483,6 @@ void SmithSellEnter() */ void SmithRepairItem(int price) { - TakePlrsMoney(price); - int idx = stextvhold + ((stextlhold - stextup) / 4); storehold[idx]._iDurability = storehold[idx]._iMaxDur; @@ -1505,6 +1503,7 @@ void SmithRepairItem(int price) } myPlayer.InvList[i]._iDurability = myPlayer.InvList[i]._iMaxDur; + TakePlrsMoney(price); } void SmithRepairEnter() @@ -1637,8 +1636,6 @@ void WitchSellEnter() */ void WitchRechargeItem(int price) { - TakePlrsMoney(price); - int idx = stextvhold + ((stextlhold - stextup) / 4); storehold[idx]._iCharges = storehold[idx]._iMaxCharges; @@ -1653,6 +1650,7 @@ void WitchRechargeItem(int price) NetSyncInvItem(myPlayer, i); } + TakePlrsMoney(price); CalcPlrInv(myPlayer, true); }