[Scummvm-git-logs] scummvm master -> 00af6a9aec5f175fc548b12598eace3d42b98285

dreammaster dreammaster at scummvm.org
Tue Apr 24 02:15:02 CEST 2018


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
00af6a9aec XEEN: Fix Swords Greyhaven guild spell list


Commit: 00af6a9aec5f175fc548b12598eace3d42b98285
    https://github.com/scummvm/scummvm/commit/00af6a9aec5f175fc548b12598eace3d42b98285
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2018-04-23T20:14:57-04:00

Commit Message:
XEEN: Fix Swords Greyhaven guild spell list

Changed paths:
    engines/xeen/dialogs/dialogs_spells.cpp


diff --git a/engines/xeen/dialogs/dialogs_spells.cpp b/engines/xeen/dialogs/dialogs_spells.cpp
index 3aced2a..1e7dc75 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)





More information about the Scummvm-git-logs mailing list