diff --git a/Source/inv.cpp b/Source/inv.cpp index cfc7a095d..4a9fb73b6 100644 --- a/Source/inv.cpp +++ b/Source/inv.cpp @@ -1079,7 +1079,7 @@ void CheckInvPaste(int pnum, int mx, int my) drawsbarflag = 1; break; } - CalcPlrInv(pnum, 1); + CalcPlrInv(pnum, TRUE); if (pnum == myplr) { if (cn == 1) SetCursorPos(MouseX + (cursW >> 1), MouseY + (cursH >> 1)); @@ -1271,19 +1271,15 @@ void CheckInvCut(int pnum, int mx, int my) void inv_update_rem_item(int pnum, BYTE iv) { - BOOL Loadgfx; - if (iv < NUM_INVLOC) { plr[pnum].InvBody[iv]._itype = ITYPE_NONE; } - Loadgfx = FALSE; - - if (plr[pnum]._pmode != PM_DEATH) { - Loadgfx = TRUE; + if (plr[pnum]._pmode == PM_DEATH) { + CalcPlrInv(pnum, FALSE); + } else { + CalcPlrInv(pnum, TRUE); } - - CalcPlrInv(pnum, Loadgfx); } void RemoveInvItem(int pnum, int iv) diff --git a/Source/items.cpp b/Source/items.cpp index 45392cc3b..4d59d04a2 100644 --- a/Source/items.cpp +++ b/Source/items.cpp @@ -2492,7 +2492,7 @@ void CheckIdentify(int pnum, int cii) pi = &plr[pnum].InvBody[cii]; pi->_iIdentified = TRUE; - CalcPlrInv(pnum, 1); + CalcPlrInv(pnum, TRUE); if (pnum == myplr) SetCursor_(CURSOR_HAND); @@ -2508,7 +2508,7 @@ void DoRepair(int pnum, int cii) PlaySfxLoc(IS_REPAIR, p->WorldX, p->WorldY); RepairItem(pi, p->_pLevel); - CalcPlrInv(pnum, 1); + CalcPlrInv(pnum, TRUE); if (pnum == myplr) SetCursor_(CURSOR_HAND); @@ -2557,7 +2557,7 @@ void DoRecharge(int pnum, int cii) r = spelldata[pi->_iSpell].sBookLvl; r = random(38, p->_pLevel / r) + 1; RechargeItem(pi, r); - CalcPlrInv(pnum, 1); + CalcPlrInv(pnum, TRUE); } if (pnum == myplr) diff --git a/Source/pack.cpp b/Source/pack.cpp index c79f6ebf4..af1f7d072 100644 --- a/Source/pack.cpp +++ b/Source/pack.cpp @@ -208,7 +208,7 @@ void UnPackPlayer(PkPlayerStruct *pPack, int pnum, BOOL killok) witchitem[i]._itype = -1; } - CalcPlrInv(pnum, 0); + CalcPlrInv(pnum, FALSE); pPlayer->pTownWarps = 0; pPlayer->pDungMsgs = 0; pPlayer->pLvlLoad = 0; diff --git a/Source/stores.cpp b/Source/stores.cpp index 364aae704..5eaccfca4 100644 --- a/Source/stores.cpp +++ b/Source/stores.cpp @@ -1883,7 +1883,7 @@ void SmithBuyItem() } smithitem[idx]._itype = ITYPE_NONE; } - CalcPlrInv(myplr, 1); + CalcPlrInv(myplr, TRUE); } void S_SBuyEnter() @@ -2267,7 +2267,7 @@ void WitchRechargeItem() else plr[myplr].InvList[i]._iCharges = plr[myplr].InvList[i]._iMaxCharges; - CalcPlrInv(myplr, 1u); + CalcPlrInv(myplr, TRUE); } void S_WRechargeEnter() @@ -2320,7 +2320,7 @@ void BoyBuyItem() StoreAutoPlace(); boyitem._itype = ITYPE_NONE; stextshold = STORE_BOY; - CalcPlrInv(myplr, 1); + CalcPlrInv(myplr, TRUE); } void HealerBuyItem()