# HG changeset patch # User Ritor1 # Date 1378034090 -21600 # Node ID ac7599089b783ba3f764f09c1c3efe7a9199cc27 # Parent 878a5c69297a14e9e4cc443ccfd74afbf3cc6bb0# Parent 990fadbaac18028765fc542a284ba3e2104bc7c7 Слияние diff -r 878a5c69297a -r ac7599089b78 Level/Decoration.cpp --- a/Level/Decoration.cpp Sun Sep 01 17:14:42 2013 +0600 +++ b/Level/Decoration.cpp Sun Sep 01 17:14:50 2013 +0600 @@ -119,22 +119,26 @@ //bool v1; // ebx@1 //LevelDecoration *v2; // edi@1 + static const std::array aObeliskQuests = { + PARTY_QUEST_OBELISK_HARMONDALE, + PARTY_QUEST_OBELISK_ERATHIA, + PARTY_QUEST_OBELISK_TULAREAN_FOREST, + PARTY_QUEST_OBELISK_DEYJA, + PARTY_QUEST_OBELISK_BRACADA_DESERT, + PARTY_QUEST_OBELISK_CELESTE, + PARTY_QUEST_OBELISK_THE_PIT, + PARTY_QUEST_OBELISK_EVENMORN_ISLAND, + PARTY_QUEST_OBELISK_MOUNT_NIGHON, + PARTY_QUEST_OBELISK_BARROW_DOWNS, + PARTY_QUEST_OBELISK_LAND_OF_THE_GIANTS, + PARTY_QUEST_OBELISK_TATALIA, + PARTY_QUEST_OBELISK_AVLEE, + PARTY_QUEST_OBELISK_STONE_CITY + }; + if (pParty->uCurrentHour == 0 - && !_449B57_test_bit(pParty->_quest_bits, 178) - && _449B57_test_bit(pParty->_quest_bits, 164) - && _449B57_test_bit(pParty->_quest_bits, 165) - && _449B57_test_bit(pParty->_quest_bits, 166) - && _449B57_test_bit(pParty->_quest_bits, 167) - && _449B57_test_bit(pParty->_quest_bits, 168) - && _449B57_test_bit(pParty->_quest_bits, 169) - && _449B57_test_bit(pParty->_quest_bits, 170) - && _449B57_test_bit(pParty->_quest_bits, 171) - && _449B57_test_bit(pParty->_quest_bits, 172) - && _449B57_test_bit(pParty->_quest_bits, 173) - && _449B57_test_bit(pParty->_quest_bits, 174) - && _449B57_test_bit(pParty->_quest_bits, 175) - && _449B57_test_bit(pParty->_quest_bits, 176) - && _449B57_test_bit(pParty->_quest_bits, 177)) + && !TestPartyQuestBit(PARTY_QUEST_OBELISK_TREASURE_FOUND) + && std::all_of(aObeliskQuests.begin(), aObeliskQuests.end(), TestPartyQuestBit)) { this->uFlags &= ~LEVEL_DECORATION_INVISIBLE; return true; diff -r 878a5c69297a -r ac7599089b78 Party.h --- a/Party.h Sun Sep 01 17:14:42 2013 +0600 +++ b/Party.h Sun Sep 01 17:14:50 2013 +0600 @@ -1,13 +1,13 @@ #pragma once #include "Player.h" #include "NPC.h" -#include "VectorTypes.h" +#include "mm7_data.h" #define PARTY_AUTONOTES_BIT__EMERALD_FIRE_FOUNTAIN 2 -enum PARTY_QUEST_BITS: unsigned __int32 +enum PARTY_QUEST_BITS: uint16 { PARTY_QUEST_EMERALD_RED_POTION_ACTIVE = 1, PARTY_QUEST_EMERALD_SEASHELL_ACTIVE = 2, @@ -20,6 +20,24 @@ PARTY_QUEST_EVENMORN_MAP_FOUND = 64, PARTY_QUEST_FINISHED_EMERALD_ISLE = 136, + + PARTY_QUEST_OBELISK_HARMONDALE = 164, + PARTY_QUEST_OBELISK_ERATHIA = 165, + PARTY_QUEST_OBELISK_TULAREAN_FOREST = 166, + PARTY_QUEST_OBELISK_DEYJA = 167, + PARTY_QUEST_OBELISK_BRACADA_DESERT = 168, + PARTY_QUEST_OBELISK_CELESTE = 169, + PARTY_QUEST_OBELISK_THE_PIT = 170, + PARTY_QUEST_OBELISK_EVENMORN_ISLAND = 171, + PARTY_QUEST_OBELISK_MOUNT_NIGHON = 172, + PARTY_QUEST_OBELISK_BARROW_DOWNS = 173, + PARTY_QUEST_OBELISK_LAND_OF_THE_GIANTS = 174, + PARTY_QUEST_OBELISK_TATALIA = 175, + PARTY_QUEST_OBELISK_AVLEE = 176, + PARTY_QUEST_OBELISK_STONE_CITY = 177, + + PARTY_QUEST_OBELISK_TREASURE_FOUND = 178, + PARTY_QUEST_FOUNTAIN_HARMONDALE = 206, PARTY_QUEST_FOUNTAIN_NIGHON = 207, PARTY_QUEST_FOUNTAIN_PIERPONT = 208, @@ -28,9 +46,6 @@ PARTY_QUEST_FOUNTAIN_EVENMORN_ISLE = 211 }; - - - /* 355 */ enum PARTY_FLAGS_1: __int32 { @@ -300,3 +315,7 @@ extern struct ActionQueue *pPartyActionQueue; +inline bool TestPartyQuestBit(PARTY_QUEST_BITS bit) +{ + return _449B57_test_bit(pParty->_quest_bits, bit); +}