| 3076 | } |
| 3077 | |
| 3078 | void PrintItemDur(ItemStruct *x) |
| 3079 | { |
| 3080 | if (x->_iClass == ICLASS_WEAPON) { |
| 3081 | if (x->_iMaxDur == DUR_INDESTRUCTIBLE) |
| 3082 | sprintf(tempstr, "damage: %i-%i Indestructible", x->_iMinDam, x->_iMaxDam); |
| 3083 | else |
| 3084 | sprintf(tempstr, "damage: %i-%i Dur: %i/%i", x->_iMinDam, x->_iMaxDam, x->_iDurability, x->_iMaxDur); |
| 3085 | AddPanelString(tempstr, TRUE); |
| 3086 | if (x->_iMiscId == IMISC_STAFF && x->_iMaxCharges) { |
| 3087 | sprintf(tempstr, "Charges: %i/%i", x->_iCharges, x->_iMaxCharges); |
| 3088 | AddPanelString(tempstr, TRUE); |
| 3089 | } |
| 3090 | if (x->_iMagical != ITEM_QUALITY_NORMAL) |
| 3091 | AddPanelString("Not Identified", TRUE); |
| 3092 | } |
| 3093 | if (x->_iClass == ICLASS_ARMOR) { |
| 3094 | if (x->_iMaxDur == DUR_INDESTRUCTIBLE) |
| 3095 | sprintf(tempstr, "armor: %i Indestructible", x->_iAC); |
| 3096 | else |
| 3097 | sprintf(tempstr, "armor: %i Dur: %i/%i", x->_iAC, x->_iDurability, x->_iMaxDur); |
| 3098 | AddPanelString(tempstr, TRUE); |
| 3099 | if (x->_iMagical != ITEM_QUALITY_NORMAL) |
| 3100 | AddPanelString("Not Identified", TRUE); |
| 3101 | if (x->_iMiscId == IMISC_STAFF && x->_iMaxCharges) { |
| 3102 | sprintf(tempstr, "Charges: %i/%i", x->_iCharges, x->_iMaxCharges); |
| 3103 | AddPanelString(tempstr, TRUE); |
| 3104 | } |
| 3105 | } |
| 3106 | if (x->_itype == ITYPE_RING || x->_itype == ITYPE_AMULET) |
| 3107 | AddPanelString("Not Identified", TRUE); |
| 3108 | PrintItemMisc(x); |
| 3109 | if (x->_iMinMag + x->_iMinDex + x->_iMinStr) { |
| 3110 | strcpy(tempstr, "Required:"); |
| 3111 | if (x->_iMinStr) |
| 3112 | sprintf(tempstr, "%s %i Str", tempstr, x->_iMinStr); |
| 3113 | if (x->_iMinMag) |
| 3114 | sprintf(tempstr, "%s %i Mag", tempstr, x->_iMinMag); |
| 3115 | if (x->_iMinDex) |
| 3116 | sprintf(tempstr, "%s %i Dex", tempstr, x->_iMinDex); |
| 3117 | AddPanelString(tempstr, TRUE); |
| 3118 | } |
| 3119 | pinfoflag = TRUE; |
| 3120 | } |
| 3121 | |
| 3122 | void UseItem(int p, int Mid, int spl) |
| 3123 | { |
no test coverage detected