Browse Source

fix repair and recharge (#7360)

pull/7395/head
qndel 2 years ago committed by Anders Jenbo
parent
commit
211f3c4fa1
  1. 6
      Source/stores.cpp

6
Source/stores.cpp

@ -1537,8 +1537,6 @@ void SmithSellEnter()
*/ */
void SmithRepairItem(int price) void SmithRepairItem(int price)
{ {
TakePlrsMoney(price);
int idx = stextvhold + ((stextlhold - stextup) / 4); int idx = stextvhold + ((stextlhold - stextup) / 4);
storehold[idx]._iDurability = storehold[idx]._iMaxDur; storehold[idx]._iDurability = storehold[idx]._iMaxDur;
@ -1559,6 +1557,7 @@ void SmithRepairItem(int price)
} }
myPlayer.InvList[i]._iDurability = myPlayer.InvList[i]._iMaxDur; myPlayer.InvList[i]._iDurability = myPlayer.InvList[i]._iMaxDur;
TakePlrsMoney(price);
} }
void SmithRepairEnter() void SmithRepairEnter()
@ -1691,8 +1690,6 @@ void WitchSellEnter()
*/ */
void WitchRechargeItem(int price) void WitchRechargeItem(int price)
{ {
TakePlrsMoney(price);
int idx = stextvhold + ((stextlhold - stextup) / 4); int idx = stextvhold + ((stextlhold - stextup) / 4);
storehold[idx]._iCharges = storehold[idx]._iMaxCharges; storehold[idx]._iCharges = storehold[idx]._iMaxCharges;
@ -1707,6 +1704,7 @@ void WitchRechargeItem(int price)
NetSyncInvItem(myPlayer, i); NetSyncInvItem(myPlayer, i);
} }
TakePlrsMoney(price);
CalcPlrInv(myPlayer, true); CalcPlrInv(myPlayer, true);
} }

Loading…
Cancel
Save