Browse Source

🔥 Remove ITYPE_FOOD (unused)

pull/1219/head
Anders Jenbo 5 years ago
parent
commit
83e783a796
  1. 1
      Source/itemdat.h
  2. 6
      Source/items.cpp
  3. 4
      Source/stores.cpp

1
Source/itemdat.h

@ -182,7 +182,6 @@ typedef enum item_type {
ITYPE_GOLD,
ITYPE_RING,
ITYPE_AMULET,
ITYPE_FOOD, /* used in demo */
ITYPE_NONE = -1,
} item_type;

6
Source/items.cpp

@ -2535,8 +2535,6 @@ int RndUItem(int m)
okflag = FALSE;
if (AllItemsList[i].itype == ITYPE_GOLD)
okflag = FALSE;
if (AllItemsList[i].itype == ITYPE_FOOD)
okflag = FALSE;
if (AllItemsList[i].iMiscId == IMISC_BOOK)
okflag = TRUE;
if (AllItemsList[i].iSpell == SPL_RESURRECT && !gbIsMultiplayer)
@ -4443,8 +4441,6 @@ BOOL SmithItemOk(int i)
rv = FALSE;
if (AllItemsList[i].itype == ITYPE_GOLD)
rv = FALSE;
if (AllItemsList[i].itype == ITYPE_FOOD)
rv = FALSE;
if (AllItemsList[i].itype == ITYPE_STAFF && (!gbIsHellfire || AllItemsList[i].iSpell))
rv = FALSE;
if (AllItemsList[i].itype == ITYPE_RING)
@ -4558,8 +4554,6 @@ BOOL PremiumItemOk(int i)
rv = FALSE;
if (AllItemsList[i].itype == ITYPE_GOLD)
rv = FALSE;
if (AllItemsList[i].itype == ITYPE_FOOD)
rv = FALSE;
if (!gbIsHellfire && AllItemsList[i].itype == ITYPE_STAFF)
rv = FALSE;

4
Source/stores.cpp

@ -434,8 +434,6 @@ BOOL SmithSellOk(int i)
return FALSE;
if (pI->_itype == ITYPE_GOLD)
return FALSE;
if (pI->_itype == ITYPE_FOOD)
return FALSE;
if (pI->_itype == ITYPE_STAFF && (!gbIsHellfire || pI->_iSpell != SPL_NULL))
return FALSE;
if (pI->_iClass == ICLASS_QUEST)
@ -564,8 +562,6 @@ BOOL SmithRepairOk(int i)
return FALSE;
if (plr[myplr].InvList[i]._itype == ITYPE_GOLD)
return FALSE;
if (plr[myplr].InvList[i]._itype == ITYPE_FOOD)
return FALSE;
if (plr[myplr].InvList[i]._iDurability == plr[myplr].InvList[i]._iMaxDur)
return FALSE;

Loading…
Cancel
Save