TrinityCore
Loading...
Searching...
No Matches
InstanceScript.h File Reference
#include "ZoneScript.h"
#include "Common.h"
#include "Duration.h"
#include "Optional.h"
#include <array>
#include <map>
#include <set>
#include <variant>
+ Include dependency graph for InstanceScript.h:

Go to the source code of this file.

Classes

struct  DungeonEncounterData
 
struct  DoorData
 
struct  BossBoundaryEntry
 
struct  BossBoundaryData
 
struct  MinionData
 
struct  ObjectData
 
struct  BossInfo
 
struct  DoorInfo
 
struct  MinionInfo
 
struct  UpdateBossStateSaveDataEvent
 
struct  UpdateAdditionalSaveDataEvent
 
class  InstanceScript
 
class  PersistentInstanceScriptValueBase
 
class  PersistentInstanceScriptValue< T >
 

Macros

#define OUT_SAVE_INST_DATA   TC_LOG_DEBUG("scripts", "Saving Instance Data for Instance {} (Map {}, Instance Id {})", instance->GetMapName(), instance->GetId(), instance->GetInstanceId())
 
#define OUT_SAVE_INST_DATA_COMPLETE   TC_LOG_DEBUG("scripts", "Saving Instance Data for Instance {} (Map {}, Instance Id {}) completed.", instance->GetMapName(), instance->GetId(), instance->GetInstanceId())
 
#define OUT_LOAD_INST_DATA(a)   TC_LOG_DEBUG("scripts", "Loading Instance Data for Instance {} (Map {}, Instance Id {}). Input is '{}'", instance->GetMapName(), instance->GetId(), instance->GetInstanceId(), a)
 
#define OUT_LOAD_INST_DATA_COMPLETE   TC_LOG_DEBUG("scripts", "Instance Data Load for Instance {} (Map {}, Instance Id: {}) is complete.", instance->GetMapName(), instance->GetId(), instance->GetInstanceId())
 
#define OUT_LOAD_INST_DATA_FAIL   TC_LOG_ERROR("scripts", "Unable to load Instance Data for Instance {} (Map {}, Instance Id: {}).", instance->GetMapName(), instance->GetId(), instance->GetInstanceId())
 

Typedefs

typedef std::vector< AreaBoundary const * > CreatureBoundary
 
typedef std::multimap< uint32, DoorInfoDoorInfoMap
 
typedef std::pair< DoorInfoMap::const_iterator, DoorInfoMap::const_iterator > DoorInfoMapBounds
 
typedef std::map< uint32, MinionInfoMinionInfoMap
 
typedef std::map< uint32, ObjectGuidObjectGuidMap
 
typedef std::map< uint32, uint32ObjectInfoMap
 

Enumerations

enum  EncounterFrameType {
  ENCOUNTER_FRAME_SET_COMBAT_RES_LIMIT = 0 , ENCOUNTER_FRAME_RESET_COMBAT_RES_LIMIT = 1 , ENCOUNTER_FRAME_ENGAGE = 2 , ENCOUNTER_FRAME_DISENGAGE = 3 ,
  ENCOUNTER_FRAME_UPDATE_PRIORITY = 4 , ENCOUNTER_FRAME_ADD_TIMER = 5 , ENCOUNTER_FRAME_ENABLE_OBJECTIVE = 6 , ENCOUNTER_FRAME_UPDATE_OBJECTIVE = 7 ,
  ENCOUNTER_FRAME_DISABLE_OBJECTIVE = 8 , ENCOUNTER_FRAME_UNK7 = 9 , ENCOUNTER_FRAME_ADD_COMBAT_RES_LIMIT = 10
}
 
enum  EncounterState {
  NOT_STARTED = 0 , IN_PROGRESS = 1 , FAIL = 2 , DONE = 3 ,
  SPECIAL = 4 , TO_BE_DECIDED = 5
}
 
enum  DoorType { DOOR_TYPE_ROOM = 0 , DOOR_TYPE_PASSAGE = 1 , DOOR_TYPE_SPAWN_HOLE = 2 , MAX_DOOR_TYPES }
 

Variables

static constexpr uint32 MAX_DUNGEON_ENCOUNTERS_PER_BOSS = 4
 

Macro Definition Documentation

◆ OUT_LOAD_INST_DATA

#define OUT_LOAD_INST_DATA (   a)    TC_LOG_DEBUG("scripts", "Loading Instance Data for Instance {} (Map {}, Instance Id {}). Input is '{}'", instance->GetMapName(), instance->GetId(), instance->GetInstanceId(), a)

Definition at line 36 of file InstanceScript.h.

◆ OUT_LOAD_INST_DATA_COMPLETE

#define OUT_LOAD_INST_DATA_COMPLETE   TC_LOG_DEBUG("scripts", "Instance Data Load for Instance {} (Map {}, Instance Id: {}) is complete.", instance->GetMapName(), instance->GetId(), instance->GetInstanceId())

Definition at line 37 of file InstanceScript.h.

◆ OUT_LOAD_INST_DATA_FAIL

#define OUT_LOAD_INST_DATA_FAIL   TC_LOG_ERROR("scripts", "Unable to load Instance Data for Instance {} (Map {}, Instance Id: {}).", instance->GetMapName(), instance->GetId(), instance->GetInstanceId())

Definition at line 38 of file InstanceScript.h.

◆ OUT_SAVE_INST_DATA

#define OUT_SAVE_INST_DATA   TC_LOG_DEBUG("scripts", "Saving Instance Data for Instance {} (Map {}, Instance Id {})", instance->GetMapName(), instance->GetId(), instance->GetInstanceId())

Definition at line 34 of file InstanceScript.h.

◆ OUT_SAVE_INST_DATA_COMPLETE

#define OUT_SAVE_INST_DATA_COMPLETE   TC_LOG_DEBUG("scripts", "Saving Instance Data for Instance {} (Map {}, Instance Id {}) completed.", instance->GetMapName(), instance->GetId(), instance->GetInstanceId())

Definition at line 35 of file InstanceScript.h.

Typedef Documentation

◆ CreatureBoundary

typedef std::vector<AreaBoundary const*> CreatureBoundary

Definition at line 134 of file InstanceScript.h.

◆ DoorInfoMap

typedef std::multimap<uint32 , DoorInfo> DoorInfoMap

Definition at line 178 of file InstanceScript.h.

◆ DoorInfoMapBounds

typedef std::pair<DoorInfoMap::const_iterator, DoorInfoMap::const_iterator> DoorInfoMapBounds

Definition at line 179 of file InstanceScript.h.

◆ MinionInfoMap

typedef std::map<uint32 , MinionInfo> MinionInfoMap

Definition at line 181 of file InstanceScript.h.

◆ ObjectGuidMap

typedef std::map<uint32 , ObjectGuid > ObjectGuidMap

Definition at line 182 of file InstanceScript.h.

◆ ObjectInfoMap

typedef std::map<uint32 , uint32 > ObjectInfoMap

Definition at line 183 of file InstanceScript.h.

Enumeration Type Documentation

◆ DoorType

enum DoorType
Enumerator
DOOR_TYPE_ROOM 
DOOR_TYPE_PASSAGE 
DOOR_TYPE_SPAWN_HOLE 
MAX_DOOR_TYPES 

Definition at line 81 of file InstanceScript.h.

82{
83 DOOR_TYPE_ROOM = 0, // Door can open if encounter is not in progress
84 DOOR_TYPE_PASSAGE = 1, // Door can open if encounter is done
85 DOOR_TYPE_SPAWN_HOLE = 2, // Door can open if encounter is in progress, typically used for spawning places
87};
@ DOOR_TYPE_SPAWN_HOLE
@ DOOR_TYPE_ROOM
@ DOOR_TYPE_PASSAGE
@ MAX_DOOR_TYPES

◆ EncounterFrameType

Enumerator
ENCOUNTER_FRAME_SET_COMBAT_RES_LIMIT 
ENCOUNTER_FRAME_RESET_COMBAT_RES_LIMIT 
ENCOUNTER_FRAME_ENGAGE 
ENCOUNTER_FRAME_DISENGAGE 
ENCOUNTER_FRAME_UPDATE_PRIORITY 
ENCOUNTER_FRAME_ADD_TIMER 
ENCOUNTER_FRAME_ENABLE_OBJECTIVE 
ENCOUNTER_FRAME_UPDATE_OBJECTIVE 
ENCOUNTER_FRAME_DISABLE_OBJECTIVE 
ENCOUNTER_FRAME_UNK7 
ENCOUNTER_FRAME_ADD_COMBAT_RES_LIMIT 

Definition at line 55 of file InstanceScript.h.

56{
66 ENCOUNTER_FRAME_UNK7 = 9, // Seems to have something to do with sorting the encounter units
68};
@ ENCOUNTER_FRAME_RESET_COMBAT_RES_LIMIT
@ ENCOUNTER_FRAME_ENABLE_OBJECTIVE
@ ENCOUNTER_FRAME_SET_COMBAT_RES_LIMIT
@ ENCOUNTER_FRAME_UNK7
@ ENCOUNTER_FRAME_DISENGAGE
@ ENCOUNTER_FRAME_ADD_COMBAT_RES_LIMIT
@ ENCOUNTER_FRAME_UPDATE_PRIORITY
@ ENCOUNTER_FRAME_DISABLE_OBJECTIVE
@ ENCOUNTER_FRAME_UPDATE_OBJECTIVE
@ ENCOUNTER_FRAME_ADD_TIMER
@ ENCOUNTER_FRAME_ENGAGE

◆ EncounterState

Enumerator
NOT_STARTED 
IN_PROGRESS 
FAIL 
DONE 
SPECIAL 
TO_BE_DECIDED 

Definition at line 71 of file InstanceScript.h.

72{
73 NOT_STARTED = 0,
74 IN_PROGRESS = 1,
75 FAIL = 2,
76 DONE = 3,
77 SPECIAL = 4,
79};
@ IN_PROGRESS
@ FAIL
@ DONE
@ SPECIAL
@ NOT_STARTED
@ TO_BE_DECIDED

Variable Documentation

◆ MAX_DUNGEON_ENCOUNTERS_PER_BOSS

constexpr uint32 MAX_DUNGEON_ENCOUNTERS_PER_BOSS = 4
staticconstexpr

Definition at line 89 of file InstanceScript.h.