Browse Source

Clean up CalcPlrInv calls

pull/133/head
Anders Jenbo 7 years ago
parent
commit
0022702c38
  1. 14
      Source/inv.cpp
  2. 6
      Source/items.cpp
  3. 2
      Source/pack.cpp
  4. 6
      Source/stores.cpp

14
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)

6
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)

2
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;

6
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()

Loading…
Cancel
Save