diff options
author | Treeston <treeston.mmoc@gmail.com> | 2017-08-04 00:23:40 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2020-08-22 13:48:44 +0200 |
commit | 608c9aaabfcdbaf09edd11cdf268c243b3e69478 (patch) | |
tree | 11acd56239005fb5d9c96b733976830cf4365e7e /src/server/game/Instances/InstanceScript.h | |
parent | acb4934f766321efbf90d0c6716f2df44c47ef16 (diff) |
Scripts/InstanceScript: Implement database framework for managing spawn groups based on boss state. (#20103)
(cherry picked from commit 84590be26d6b3c56b95a804cbe889826186dd8a2)
Diffstat (limited to 'src/server/game/Instances/InstanceScript.h')
-rw-r--r-- | src/server/game/Instances/InstanceScript.h | 9 |
1 files changed, 8 insertions, 1 deletions
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<InstanceSpawnGroupInfo> const* const _instanceSpawnGroups; uint32 _entranceId; uint32 _temporaryEntranceId; uint32 _combatResurrectionTimer; |