diff options
-rw-r--r-- | engines/xeen/character.cpp | 17 | ||||
-rw-r--r-- | engines/xeen/character.h | 6 | ||||
-rw-r--r-- | engines/xeen/scripts.cpp | 4 |
3 files changed, 17 insertions, 10 deletions
diff --git a/engines/xeen/character.cpp b/engines/xeen/character.cpp index d70ea8a08b..7e36e54190 100644 --- a/engines/xeen/character.cpp +++ b/engines/xeen/character.cpp @@ -1451,23 +1451,24 @@ void Character::setValue(int id, uint value) { } bool Character::guildMember() const { - Party &party = *Party::_vm->_party; + FileManager &files = *g_vm->_files; + Party &party = *g_vm->_party; - if (party._mazeId == 49 && !Party::_vm->_files->_isDarkCc) { - return hasAward(5); + if (party._mazeId == 49 && !files._isDarkCc) { + return hasAward(SHANGRILA_GUILD_MEMBER); } switch (party._mazeId) { case 29: - return hasAward(83); + return hasAward(CASTLEVIEW_GUILD_MEMBER); case 31: - return hasAward(84); + return hasAward(SANDCASTER_GUILD_MEMBER); case 33: - return hasAward(85); + return hasAward(LAKESIDE_GUILD_MEMBER); case 35: - return hasAward(86); + return hasAward(NECROPOLIS_GUILD_MEMBER); default: - return hasAward(87); + return hasAward(OLYMPUS_GUILD_MEMBER); } } diff --git a/engines/xeen/character.h b/engines/xeen/character.h index 4dde3415db..54e8d1a37c 100644 --- a/engines/xeen/character.h +++ b/engines/xeen/character.h @@ -37,6 +37,12 @@ namespace Xeen { #define AWARDS_TOTAL 88 #define WARZONE_AWARD 9 +enum Award { + SHANGRILA_GUILD_MEMBER = 5, GOOBER = 76, SUPER_GOOBER = 77, + CASTLEVIEW_GUILD_MEMBER = 83, SANDCASTER_GUILD_MEMBER = 84, + LAKESIDE_GUILD_MEMBER = 85, NECROPOLIS_GUILD_MEMBER = 86, OLYMPUS_GUILD_MEMBER = 87 +}; + enum BonusFlags { ITEMFLAG_BONUS_MASK = 0xBF, ITEMFLAG_CURSED = 0x40, ITEMFLAG_BROKEN = 0x80 }; diff --git a/engines/xeen/scripts.cpp b/engines/xeen/scripts.cpp index 59e12f6289..99603224c8 100644 --- a/engines/xeen/scripts.cpp +++ b/engines/xeen/scripts.cpp @@ -1432,10 +1432,10 @@ void Scripts::doEnding(const Common::String &endStr) { int state = 0; for (uint idx = 0; idx < party._activeParty.size(); ++idx) { Character &player = party._activeParty[idx]; - if (player.hasAward(77)) { + if (player.hasAward(SUPER_GOOBER)) { state = 2; break; - } else if (player.hasAward(76)) { + } else if (player.hasAward(GOOBER)) { state = 1; break; } |