Browse Source

Make diablo vegan frindly

pull/973/head
Anders Jenbo 5 years ago
parent
commit
be917d43c2
  1. 14
      Source/items.cpp
  2. 6
      Source/stores.cpp
  3. 4
      enums.h

14
Source/items.cpp

@ -2704,7 +2704,7 @@ int RndUItem(int m)
okflag = FALSE;
if (AllItemsList[i].itype == ITYPE_GOLD)
okflag = FALSE;
if (AllItemsList[i].itype == ITYPE_MEAT)
if (AllItemsList[i].itype == ITYPE_FOOD)
okflag = FALSE;
if (AllItemsList[i].iMiscId == IMISC_BOOK)
okflag = TRUE;
@ -4459,7 +4459,7 @@ void PrintItemDetails(ItemStruct *x)
if (x->_iClass == ICLASS_WEAPON) {
#ifdef HELLFIRE
if (x->_iMinDam == x->_iMaxDam) {
if (x->_iMaxDur == 255)
if (x->_iMaxDur == DUR_INDESTRUCTIBLE)
sprintf(tempstr, "damage: %i Indestructible", x->_iMinDam);
else
sprintf(tempstr, "damage: %i Dur: %i/%i", x->_iMinDam, x->_iDurability, x->_iMaxDur);
@ -4526,7 +4526,7 @@ void PrintItemDur(ItemStruct *x)
if (x->_iClass == ICLASS_WEAPON) {
#ifdef HELLFIRE
if (x->_iMinDam == x->_iMaxDam) {
if (x->_iMaxDur == 255)
if (x->_iMaxDur == DUR_INDESTRUCTIBLE)
sprintf(tempstr, "damage: %i Indestructible", x->_iMinDam);
else
sprintf(tempstr, "damage: %i Dur: %i/%i", x->_iMinDam, x->_iDurability, x->_iMaxDur);
@ -4582,7 +4582,7 @@ void UseItem(int p, int Mid, int spl)
switch (Mid) {
case IMISC_HEAL:
case IMISC_MEAT:
case IMISC_FOOD:
j = plr[p]._pMaxHP >> 8;
l = ((j >> 1) + random_(39, j)) << 6;
#ifdef HELLFIRE
@ -4846,7 +4846,7 @@ BOOL SmithItemOk(int i)
rv = FALSE;
if (AllItemsList[i].itype == ITYPE_GOLD)
rv = FALSE;
if (AllItemsList[i].itype == ITYPE_MEAT)
if (AllItemsList[i].itype == ITYPE_FOOD)
rv = FALSE;
#ifdef HELLFIRE
if (AllItemsList[i].itype == ITYPE_STAFF && AllItemsList[i].iSpell)
@ -4958,7 +4958,7 @@ BOOL PremiumItemOk(int i)
rv = TRUE;
#ifdef HELLFIRE
if (AllItemsList[i].itype == ITYPE_MISC || AllItemsList[i].itype == ITYPE_GOLD || AllItemsList[i].itype == ITYPE_MEAT)
if (AllItemsList[i].itype == ITYPE_MISC || AllItemsList[i].itype == ITYPE_GOLD || AllItemsList[i].itype == ITYPE_FOOD)
rv = FALSE;
if (gbMaxPlayers != 1) {
@ -4970,7 +4970,7 @@ BOOL PremiumItemOk(int i)
rv = FALSE;
if (AllItemsList[i].itype == ITYPE_GOLD)
rv = FALSE;
if (AllItemsList[i].itype == ITYPE_MEAT)
if (AllItemsList[i].itype == ITYPE_FOOD)
rv = FALSE;
if (AllItemsList[i].itype == ITYPE_STAFF)
rv = FALSE;

6
Source/stores.cpp

@ -639,7 +639,7 @@ BOOL SmithSellOk(int i)
return FALSE;
if (pI->_itype == ITYPE_GOLD)
return FALSE;
if (pI->_itype == ITYPE_MEAT)
if (pI->_itype == ITYPE_FOOD)
return FALSE;
if (pI->_itype == ITYPE_STAFF && pI->_iSpell != SPL_NULL)
return FALSE;
@ -654,7 +654,7 @@ BOOL SmithSellOk(int i)
return FALSE;
if (plr[myplr].InvList[i]._itype == ITYPE_GOLD)
return FALSE;
if (plr[myplr].InvList[i]._itype == ITYPE_MEAT)
if (plr[myplr].InvList[i]._itype == ITYPE_FOOD)
return FALSE;
if (plr[myplr].InvList[i]._itype == ITYPE_STAFF)
return FALSE;
@ -787,7 +787,7 @@ BOOL SmithRepairOk(int i)
return FALSE;
if (plr[myplr].InvList[i]._itype == ITYPE_GOLD)
return FALSE;
if (plr[myplr].InvList[i]._itype == ITYPE_MEAT)
if (plr[myplr].InvList[i]._itype == ITYPE_FOOD)
return FALSE;
if (plr[myplr].InvList[i]._iDurability == plr[myplr].InvList[i]._iMaxDur)
return FALSE;

4
enums.h

@ -2994,7 +2994,7 @@ typedef enum item_misc_id {
IMISC_RING = 0x19,
IMISC_AMULET = 0x1A,
IMISC_UNIQUE = 0x1B,
IMISC_MEAT = 0x1C, /* from demo/PSX */
IMISC_FOOD = 0x1C, /* from demo/PSX */
IMISC_OILFIRST = 0x1D,
IMISC_OILOF = 0x1E, /* oils are beta or hellfire only */
IMISC_OILACC = 0x1F,
@ -3040,7 +3040,7 @@ typedef enum item_type {
ITYPE_GOLD = 0xB,
ITYPE_RING = 0xC,
ITYPE_AMULET = 0xD,
ITYPE_MEAT = 0xE, /* used in demo, might be generic for 'food' */
ITYPE_FOOD = 0xE, /* used in demo */
ITYPE_NONE = -1,
} item_type;

Loading…
Cancel
Save