diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/xeen/interface.cpp | 4 | ||||
-rw-r--r-- | engines/xeen/spells.cpp | 14 |
2 files changed, 14 insertions, 4 deletions
diff --git a/engines/xeen/interface.cpp b/engines/xeen/interface.cpp index 7efc7a7068..0c7f15dc5f 100644 --- a/engines/xeen/interface.cpp +++ b/engines/xeen/interface.cpp @@ -527,8 +527,10 @@ void Interface::perform() { } int result = 0; + Character *c = &party._activeParty[(spells._lastCaster < 0 || + spells._lastCaster >= (int)party._activeParty.size()) ? + (int)party._activeParty.size() - 1 : spells._lastCaster]; do { - Character *c = nullptr; int spellId = CastSpell::show(_vm, c, _vm->_mode); if (spellId == -1 || c == nullptr) break; diff --git a/engines/xeen/spells.cpp b/engines/xeen/spells.cpp index 3b753bc90b..d2a2af31c0 100644 --- a/engines/xeen/spells.cpp +++ b/engines/xeen/spells.cpp @@ -126,13 +126,21 @@ int Spells::castSpell(Character *c, int spellId) { } else { // Some spells have special handling switch (spellId) { - case 19: - // Enchant item + case 19: // Enchant item + case 21: // Etherialize + case 40: // Jump + case 44: // Lloyd's Beacon + case 66: // Super Shelter + case 69: // Teleport + case 71: // Town Portal + case 75: // Wizard Eye if (_vm->_mode != MODE_COMBAT) { - enchantItem(); + executeSpell(spellId); } else { // Return the spell costs and flag that another spell can be selected addSpellCost(*c, spellId); + ErrorDialog::show(_vm, Common::String::format(CANT_CAST_WHILE_ENGAGED, + _spellNames[spellId])); result = -1; } break; |