From 140212ef7437b78dcac711822e042239e9e02f03 Mon Sep 17 00:00:00 2001 From: qndel Date: Tue, 17 Sep 2019 18:56:56 +0200 Subject: [PATCH] [hellfire] PrintItemDur bin exact --- Source/items.cpp | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/Source/items.cpp b/Source/items.cpp index 93942c3dd..66fa42192 100644 --- a/Source/items.cpp +++ b/Source/items.cpp @@ -3448,8 +3448,19 @@ void PrintItemDetails(ItemStruct *x) void PrintItemDur(ItemStruct *x) { + char str, dex; + BYTE mag; + if (x->_iClass == ICLASS_WEAPON) { - if (x->_iMaxDur == 255) +#ifdef HELLFIRE + if (x->_iMinDam == x->_iMaxDam) { + if (x->_iMaxDur == 255) + sprintf(tempstr, "damage: %i Indestructible", x->_iMinDam); + else + sprintf(tempstr, "damage: %i Dur: %i/%i", x->_iMinDam, x->_iDurability, x->_iMaxDur); + } else +#endif + if (x->_iMaxDur == 255) sprintf(tempstr, "damage: %i-%i Indestructible", x->_iMinDam, x->_iMaxDam); else sprintf(tempstr, "damage: %i-%i Dur: %i/%i", x->_iMinDam, x->_iMaxDam, x->_iDurability, x->_iMaxDur); @@ -3477,7 +3488,10 @@ void PrintItemDur(ItemStruct *x) if (x->_itype == ITYPE_RING || x->_itype == ITYPE_AMULET) AddPanelString("Not Identified", TRUE); PrintItemMisc(x); - if (x->_iMinMag + x->_iMinDex + x->_iMinStr) { + str = x->_iMinStr; + mag = x->_iMinMag; + dex = x->_iMinDex; + if (str + mag + dex) { strcpy(tempstr, "Required:"); if (x->_iMinStr) sprintf(tempstr, "%s %i Str", tempstr, x->_iMinStr);