diff --git a/Source/debug.cpp b/Source/debug.cpp index fecdb03d9..3dda266b6 100644 --- a/Source/debug.cpp +++ b/Source/debug.cpp @@ -104,7 +104,7 @@ void GiveGoldCheat() int i, ni; for (i = 0; i < NUM_INV_GRID_ELEM; i++) { - if (!plr[myplr].InvGrid[i]) { + if (plr[myplr].InvGrid[i] == 0) { ni = plr[myplr]._pNumInv++; SetPlrHandItem(&plr[myplr].InvList[ni], IDI_GOLD); GetPlrHandSeed(&plr[myplr].InvList[ni]); diff --git a/Source/inv.cpp b/Source/inv.cpp index 8bfb5c637..efc79c9a4 100644 --- a/Source/inv.cpp +++ b/Source/inv.cpp @@ -900,7 +900,7 @@ BOOL GoldAutoPlace(int pnum) for (i = 39; i >= 0 && !done; i--) { yy = 10 * (i / 10); xx = i % 10; - if (!plr[pnum].InvGrid[xx + yy]) { + if (plr[pnum].InvGrid[xx + yy] == 0) { ii = plr[pnum]._pNumInv; plr[pnum].InvList[ii] = plr[pnum].HoldItem; plr[pnum]._pNumInv = plr[pnum]._pNumInv + 1; @@ -963,7 +963,7 @@ BOOL GoldAutoPlace(int pnum) for (int i = 39; i >= 0 && !done; i--) { yy = 10 * (i / 10); xx = i % 10; - if (!plr[pnum].InvGrid[xx + yy]) { + if (plr[pnum].InvGrid[xx + yy] == 0) { ii = plr[pnum]._pNumInv; plr[pnum].InvList[ii] = plr[pnum].HoldItem; plr[pnum]._pNumInv = plr[pnum]._pNumInv + 1; diff --git a/Source/objects.cpp b/Source/objects.cpp index a5e10cdb0..54d845148 100644 --- a/Source/objects.cpp +++ b/Source/objects.cpp @@ -3950,7 +3950,7 @@ void OperateShrine(int pnum, int i, int sType) if (pnum != myplr) return; for (j = 0; j < NUM_INV_GRID_ELEM; j++) { - if (!plr[pnum].InvGrid[j]) { + if (plr[pnum].InvGrid[j] == 0) { r = 5 * leveltype + random_(160, 10 * leveltype); t = plr[pnum]._pNumInv; // check plr[pnum].InvList[t] = golditem; diff --git a/Source/stores.cpp b/Source/stores.cpp index ad1d0ac03..73423350f 100644 --- a/Source/stores.cpp +++ b/Source/stores.cpp @@ -2083,7 +2083,7 @@ BOOL StoreGoldFit(int idx) cost = storehold[idx]._iIvalue; sz = cost / GOLD_MAX_LIMIT; - if (cost % GOLD_MAX_LIMIT) + if (cost % GOLD_MAX_LIMIT != 0) sz++; SetCursor_(storehold[idx]._iCurs + CURSOR_FIRSTITEM); @@ -2094,7 +2094,7 @@ BOOL StoreGoldFit(int idx) return TRUE; for (i = 0; i < NUM_INV_GRID_ELEM; i++) { - if (!plr[myplr].InvGrid[i]) + if (plr[myplr].InvGrid[i] == 0) numsqrs++; } @@ -2124,7 +2124,7 @@ void PlaceStoreGold(int v) for (i = 0; i < NUM_INV_GRID_ELEM && !done; i++) { yy = 10 * (i / 10); xx = i % 10; - if (!plr[myplr].InvGrid[xx + yy]) { + if (plr[myplr].InvGrid[xx + yy] == 0) { ii = plr[myplr]._pNumInv; GetGoldSeed(myplr, &golditem); plr[myplr].InvList[ii] = golditem;