From be917d43c28cb67ff0ee6e72a0b650969632a63a Mon Sep 17 00:00:00 2001 From: Anders Jenbo Date: Sat, 9 Jan 2021 15:23:01 +0100 Subject: [PATCH] Make diablo vegan frindly --- Source/items.cpp | 14 +++++++------- Source/stores.cpp | 6 +++--- enums.h | 4 ++-- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Source/items.cpp b/Source/items.cpp index 73eb235d5..e8b12287b 100644 --- a/Source/items.cpp +++ b/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; diff --git a/Source/stores.cpp b/Source/stores.cpp index a4995add8..698786d62 100644 --- a/Source/stores.cpp +++ b/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; diff --git a/enums.h b/enums.h index bea49066c..030c4d6a4 100644 --- a/enums.h +++ b/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;