changeset 1499:ac7599089b78

Слияние
author Ritor1
date Sun, 01 Sep 2013 17:14:50 +0600
parents 878a5c69297a (current diff) 990fadbaac18 (diff)
children fd6c580a02b7
files
diffstat 2 files changed, 43 insertions(+), 20 deletions(-) [+]
line wrap: on
line diff
--- 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<const PARTY_QUEST_BITS, 14> 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;
--- 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);
+}