From 608c9aaabfcdbaf09edd11cdf268c243b3e69478 Mon Sep 17 00:00:00 2001 From: Treeston Date: Fri, 4 Aug 2017 00:23:40 +0200 Subject: Scripts/InstanceScript: Implement database framework for managing spawn groups based on boss state. (#20103) (cherry picked from commit 84590be26d6b3c56b95a804cbe889826186dd8a2) --- src/server/game/Instances/InstanceScript.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/server/game/Instances/InstanceScript.h') diff --git a/src/server/game/Instances/InstanceScript.h b/src/server/game/Instances/InstanceScript.h index c382c8aad83..d9ceabb6189 100644 --- a/src/server/game/Instances/InstanceScript.h +++ b/src/server/game/Instances/InstanceScript.h @@ -38,6 +38,7 @@ class InstanceMap; class ModuleReference; class Player; class Unit; +struct InstanceSpawnGroupInfo; enum CriteriaTypes : uint8; enum CriteriaTimedTypes : uint8; enum EncounterCreditType : uint8; @@ -165,7 +166,10 @@ class TC_GAME_API InstanceScript : public ZoneScript // KEEPING THIS METHOD ONLY FOR BACKWARD COMPATIBILITY !!! virtual void Initialize() { } - // On load + // On instance load, exactly ONE of these methods will ALWAYS be called: + // if we're starting without any saved instance data + virtual void Create(); + // if we're loading existing instance save data virtual void Load(char const* data); // When save is needed, this function generates the data @@ -300,6 +304,8 @@ class TC_GAME_API InstanceScript : public ZoneScript virtual void UpdateDoorState(GameObject* door); void UpdateMinionState(Creature* minion, EncounterState state); + void UpdateSpawnGroups(); + // Exposes private data that should never be modified unless exceptional cases. // Pay very much attention at how the returned BossInfo data is modified to avoid issues. BossInfo* GetBossInfo(uint32 id); @@ -326,6 +332,7 @@ class TC_GAME_API InstanceScript : public ZoneScript ObjectInfoMap _gameObjectInfo; ObjectGuidMap _objectGuids; uint32 completedEncounters; // completed encounter mask, bit indexes are DungeonEncounter.dbc boss numbers, used for packets + std::vector const* const _instanceSpawnGroups; uint32 _entranceId; uint32 _temporaryEntranceId; uint32 _combatResurrectionTimer; -- cgit v1.2.3