aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorPaul Gilbert2018-04-23 20:14:57 -0400
committerPaul Gilbert2018-04-23 20:14:57 -0400
commit00af6a9aec5f175fc548b12598eace3d42b98285 (patch)
tree702cc57f3b2f5006b368eea77beb39b382be54e7 /engines
parentdb8f9bccfbf19d6b29c143aa440d7dacc270076a (diff)
downloadscummvm-rg350-00af6a9aec5f175fc548b12598eace3d42b98285.tar.gz
scummvm-rg350-00af6a9aec5f175fc548b12598eace3d42b98285.tar.bz2
scummvm-rg350-00af6a9aec5f175fc548b12598eace3d42b98285.zip
XEEN: Fix Swords Greyhaven guild spell list
Diffstat (limited to 'engines')
-rw-r--r--engines/xeen/dialogs/dialogs_spells.cpp18
1 files changed, 17 insertions, 1 deletions
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)