From 211f3c4fa1f25f52c07abc2282e8c44934a0eea1 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 d4e87fd7a..8a1ab99ef 100644 --- a/Source/stores.cpp +++ b/Source/stores.cpp @@ -1537,8 +1537,6 @@ void SmithSellEnter() */ void SmithRepairItem(int price) { - TakePlrsMoney(price); - int idx = stextvhold + ((stextlhold - stextup) / 4); storehold[idx]._iDurability = storehold[idx]._iMaxDur; @@ -1559,6 +1557,7 @@ void SmithRepairItem(int price) } myPlayer.InvList[i]._iDurability = myPlayer.InvList[i]._iMaxDur; + TakePlrsMoney(price); } void SmithRepairEnter() @@ -1691,8 +1690,6 @@ void WitchSellEnter() */ void WitchRechargeItem(int price) { - TakePlrsMoney(price); - int idx = stextvhold + ((stextlhold - stextup) / 4); storehold[idx]._iCharges = storehold[idx]._iMaxCharges; @@ -1707,6 +1704,7 @@ void WitchRechargeItem(int price) NetSyncInvItem(myPlayer, i); } + TakePlrsMoney(price); CalcPlrInv(myPlayer, true); }