From 00af6a9aec5f175fc548b12598eace3d42b98285 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Mon, 23 Apr 2018 20:14:57 -0400 Subject: XEEN: Fix Swords Greyhaven guild spell list --- engines/xeen/dialogs/dialogs_spells.cpp | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'engines') diff --git a/engines/xeen/dialogs/dialogs_spells.cpp b/engines/xeen/dialogs/dialogs_spells.cpp index 3aced2a2f4..1e7dc75d5a 100644 --- a/engines/xeen/dialogs/dialogs_spells.cpp +++ b/engines/xeen/dialogs/dialogs_spells.cpp @@ -291,7 +291,23 @@ const char *SpellsDialog::setSpellText(Character *c, int mode) { if ((mode & 0x7f) == 0) { if (category != SPELLCAT_INVALID) { - if (_vm->getGameID() != GType_Swords && (party._mazeId == 49 || party._mazeId == 37)) { + if (_vm->getGameID() == GType_Swords && party._mazeId == 49) { + for (int spellId = 0; spellId < 10; ++spellId) { + int idx = 0; + while (idx < SPELLS_PER_CLASS && Res.SPELLS_ALLOWED[category][idx] != + Res.DARK_SPELL_OFFSETS[category][spellId]) + ++idx; + + if (idx < SPELLS_PER_CLASS) { + if (!c->_spells[idx] || (mode & 0x80)) { + int cost = spells.calcSpellCost(Res.SPELLS_ALLOWED[category][idx], expenseFactor); + _spells.push_back(SpellEntry(Common::String::format("\x3l%s\x3r\x9""000%u", + spells._spellNames[Res.SPELLS_ALLOWED[category][idx]].c_str(), cost), + idx, spellId)); + } + } + } + } else if (party._mazeId == 49 || party._mazeId == 37) { for (uint spellId = 0; spellId < TOTAL_SPELLS; ++spellId) { int idx = 0; while (idx < SPELLS_PER_CLASS && Res.SPELLS_ALLOWED[category][idx] != (int)spellId) -- cgit v1.2.3