| 3028 | } |
| 3029 | |
| 3030 | void PrintItemDetails(ItemStruct *x) |
| 3031 | { |
| 3032 | if (x->_iClass == ICLASS_WEAPON) { |
| 3033 | if (x->_iMaxDur == DUR_INDESTRUCTIBLE) |
| 3034 | sprintf(tempstr, "damage: %i-%i Indestructible", x->_iMinDam, x->_iMaxDam); |
| 3035 | else |
| 3036 | sprintf(tempstr, "damage: %i-%i Dur: %i/%i", x->_iMinDam, x->_iMaxDam, x->_iDurability, x->_iMaxDur); |
| 3037 | AddPanelString(tempstr, TRUE); |
| 3038 | } |
| 3039 | if (x->_iClass == ICLASS_ARMOR) { |
| 3040 | if (x->_iMaxDur == DUR_INDESTRUCTIBLE) |
| 3041 | sprintf(tempstr, "armor: %i Indestructible", x->_iAC); |
| 3042 | else |
| 3043 | sprintf(tempstr, "armor: %i Dur: %i/%i", x->_iAC, x->_iDurability, x->_iMaxDur); |
| 3044 | AddPanelString(tempstr, TRUE); |
| 3045 | } |
| 3046 | if (x->_iMiscId == IMISC_STAFF && x->_iMaxCharges) { |
| 3047 | sprintf(tempstr, "dam: %i-%i Dur: %i/%i", x->_iMinDam, x->_iMaxDam, x->_iDurability, x->_iMaxDur); |
| 3048 | sprintf(tempstr, "Charges: %i/%i", x->_iCharges, x->_iMaxCharges); |
| 3049 | AddPanelString(tempstr, TRUE); |
| 3050 | } |
| 3051 | if (x->_iPrePower != -1) { |
| 3052 | PrintItemPower(x->_iPrePower, x); |
| 3053 | AddPanelString(tempstr, TRUE); |
| 3054 | } |
| 3055 | if (x->_iSufPower != -1) { |
| 3056 | PrintItemPower(x->_iSufPower, x); |
| 3057 | AddPanelString(tempstr, TRUE); |
| 3058 | } |
| 3059 | if (x->_iMagical == ITEM_QUALITY_UNIQUE) { |
| 3060 | AddPanelString("unique item", TRUE); |
| 3061 | uitemflag = TRUE; |
| 3062 | curruitem = *x; |
| 3063 | } |
| 3064 | PrintItemMisc(x); |
| 3065 | if (x->_iMinMag + x->_iMinDex + x->_iMinStr) { |
| 3066 | strcpy(tempstr, "Required:"); |
| 3067 | if (x->_iMinStr) |
| 3068 | sprintf(tempstr, "%s %i Str", tempstr, x->_iMinStr); |
| 3069 | if (x->_iMinMag) |
| 3070 | sprintf(tempstr, "%s %i Mag", tempstr, x->_iMinMag); |
| 3071 | if (x->_iMinDex) |
| 3072 | sprintf(tempstr, "%s %i Dex", tempstr, x->_iMinDex); |
| 3073 | AddPanelString(tempstr, TRUE); |
| 3074 | } |
| 3075 | pinfoflag = TRUE; |
| 3076 | } |
| 3077 | |
| 3078 | void PrintItemDur(ItemStruct *x) |
| 3079 | { |
no test coverage detected