diff options
author | Paul Gilbert | 2018-03-15 20:15:01 -0400 |
---|---|---|
committer | Paul Gilbert | 2018-03-15 20:15:01 -0400 |
commit | 5584e7ec3701928caaeff90ac3dbe99cb86a03bb (patch) | |
tree | 896230ba9e048ba1e57360f356875194ad3e495f | |
parent | a656480092f515c269f2eed993379fb58039f37c (diff) | |
download | scummvm-rg350-5584e7ec3701928caaeff90ac3dbe99cb86a03bb.tar.gz scummvm-rg350-5584e7ec3701928caaeff90ac3dbe99cb86a03bb.tar.bz2 scummvm-rg350-5584e7ec3701928caaeff90ac3dbe99cb86a03bb.zip |
XEEN: Fix for identifying items
-rw-r--r-- | engines/xeen/dialogs/dialogs_items.cpp | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/engines/xeen/dialogs/dialogs_items.cpp b/engines/xeen/dialogs/dialogs_items.cpp index 422ef8f21f..4715dfbc0f 100644 --- a/engines/xeen/dialogs/dialogs_items.cpp +++ b/engines/xeen/dialogs/dialogs_items.cpp @@ -846,6 +846,11 @@ int ItemsDialog::doItemOptions(Character &c, int actionIndex, int itemIndex, Ite c._items[category][itemIndex].clear(); c._items[category].sort(); } + + intf._charsShooting = false; + combat.moveMonsters(); + combat._whosTurn = -1; + return 1; } else { ErrorScroll::show(_vm, Common::String::format(Res.NO_SPECIAL_ABILITIES, c._items[category].getFullDescription(itemIndex).c_str() @@ -855,7 +860,8 @@ int ItemsDialog::doItemOptions(Character &c, int actionIndex, int itemIndex, Ite } break; case 3: - c._items[category].discardItem(itemIndex); + if (c._items[category].discardItem(itemIndex) && mode == ITEMMODE_8) + return 2; break; default: break; @@ -888,7 +894,7 @@ int ItemsDialog::doItemOptions(Character &c, int actionIndex, int itemIndex, Ite } } } - return 0; + break; } case ITEMMODE_2: { @@ -919,7 +925,7 @@ int ItemsDialog::doItemOptions(Character &c, int actionIndex, int itemIndex, Ite party._gold += cost; } } - return 0; + break; } case ITEMMODE_RECHARGE: @@ -941,7 +947,7 @@ int ItemsDialog::doItemOptions(Character &c, int actionIndex, int itemIndex, Ite int amount = _vm->getRandomNumber(1, _oldCharacter->getCurrentLevel() / 5 + 1); amount = MIN(amount, 5); _oldCharacter->_items[category].enchantItem(itemIndex, amount); - break; + return 2; } case ITEMMODE_REPAIR: @@ -1001,10 +1007,7 @@ int ItemsDialog::doItemOptions(Character &c, int actionIndex, int itemIndex, Ite } } - intf._charsShooting = false; - combat.moveMonsters(); - combat._whosTurn = -1; - return true; + return 0; } void ItemsDialog::itemToGold(Character &c, int itemIndex, ItemCategory category, |