Mercurial > mm7
diff mm7_1.cpp @ 600:db4a23580e6c
Chest item view fixed, gold can be taken
author | Gloval |
---|---|
date | Thu, 07 Mar 2013 00:35:10 +0400 |
parents | 55d6b756e03a |
children | 628694cd5744 |
line wrap: on
line diff
--- a/mm7_1.cpp Wed Mar 06 22:47:21 2013 +0400 +++ b/mm7_1.cpp Thu Mar 07 00:35:10 2013 +0400 @@ -2510,19 +2510,22 @@ if (item_desc->uDamageDice) //"Armor" sprintfex(out_text + 100, "%s: +%d", pGlobalTXT_LocalizationStrings[11], item_desc->uDamageDice + item_desc->uDamageMod); break; - case EQUIP_POTION: - if ( inspect_item->uEnchantmentType ) - sprintf(out_text + 200, "%s: %d",pGlobalTXT_LocalizationStrings[449] , inspect_item->uEnchantmentType); //"Power" - break; - case EQUIP_REAGENT: - sprintf(out_text + 200, "%s: %d", pGlobalTXT_LocalizationStrings[449], pItemsTable->pItems[inspect_item->uItemID].uDamageDice); //"Power" - break; + } if ( !v77 ) { - //v23 = item_desc->uEquipType; - if ( inspect_item->uEnchantmentType ) + if (item_desc->uEquipType ==EQUIP_POTION) //this is CORRECT! do not move to switch! + { + if ( inspect_item->uEnchantmentType ) + sprintf(out_text + 200, "%s: %d",pGlobalTXT_LocalizationStrings[449] , inspect_item->uEnchantmentType); //"Power" + } + else if (item_desc->uEquipType == EQUIP_REAGENT) + { + sprintf(out_text + 200, "%s: %d", pGlobalTXT_LocalizationStrings[449], pItemsTable->pItems[inspect_item->uItemID].uDamageDice); //"Power" + } + + else if ( inspect_item->uEnchantmentType ) { sprintf(out_text + 200, "%s: %s +%d", pGlobalTXT_LocalizationStrings[210], pItemsTable->pEnchantments[inspect_item->uEnchantmentType-1].pBonusStat, inspect_item->_bonus_strength); //"Special" @@ -3984,9 +3987,9 @@ else v3 = -1; v4 = pChests[chest_id].pInventoryIndices[v3] - 1; - if ( pItemsTable->pItems[pChests[chest_id].igChestItems[v4].uItemID].uEquipType == 18 ) + if ( pItemsTable->pItems[pChests[chest_id].igChestItems[v4].uItemID].uEquipType == EQUIP_GOLD ) { - party_finds_gold(pItemsTable->pItems[pChests[chest_id].igChestItems[v4].uItemID].uValue, 0); //recheck + party_finds_gold(pChests[chest_id].igChestItems[v4].uSpecEnchantmentType, 0); viewparams->bRedrawGameUI = 1; } else