TrinityCore
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_ENGAGE = 0 , ENCOUNTER_FRAME_DISENGAGE = 1 , ENCOUNTER_FRAME_UPDATE_PRIORITY = 2 , ENCOUNTER_FRAME_ADD_TIMER = 3 ,
  ENCOUNTER_FRAME_ENABLE_OBJECTIVE = 4 , ENCOUNTER_FRAME_UPDATE_OBJECTIVE = 5 , ENCOUNTER_FRAME_DISABLE_OBJECTIVE = 6 , ENCOUNTER_FRAME_PHASE_SHIFT_CHANGED = 7
}
 
enum  EncounterState {
  NOT_STARTED = 0 , IN_PROGRESS = 1 , FAIL = 2 , DONE = 3 ,
  SPECIAL = 4 , TO_BE_DECIDED = 5
}
 
enum class  EncounterDoorBehavior : uint8 {
  OpenWhenNotInProgress = 0 , OpenWhenDone = 1 , OpenWhenInProgress = 2 , OpenWhenNotDone = 3 ,
  Max
}
 

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 131 of file InstanceScript.h.

◆ DoorInfoMap

typedef std::multimap<uint32 , DoorInfo> DoorInfoMap

Definition at line 175 of file InstanceScript.h.

◆ DoorInfoMapBounds

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

Definition at line 176 of file InstanceScript.h.

◆ MinionInfoMap

typedef std::map<uint32 , MinionInfo> MinionInfoMap

Definition at line 178 of file InstanceScript.h.

◆ ObjectGuidMap

typedef std::map<uint32 , ObjectGuid > ObjectGuidMap

Definition at line 179 of file InstanceScript.h.

◆ ObjectInfoMap

typedef std::map<uint32 , uint32 > ObjectInfoMap

Definition at line 180 of file InstanceScript.h.

Enumeration Type Documentation

◆ EncounterDoorBehavior

enum class EncounterDoorBehavior : uint8
strong
Enumerator
OpenWhenNotInProgress 
OpenWhenDone 
OpenWhenInProgress 
OpenWhenNotDone 
Max 

Definition at line 77 of file InstanceScript.h.

◆ EncounterFrameType

Enumerator
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_PHASE_SHIFT_CHANGED 

Definition at line 54 of file InstanceScript.h.

◆ EncounterState

Enumerator
NOT_STARTED 
IN_PROGRESS 
FAIL 
DONE 
SPECIAL 
TO_BE_DECIDED 

Definition at line 67 of file InstanceScript.h.

Variable Documentation

◆ MAX_DUNGEON_ENCOUNTERS_PER_BOSS

constexpr uint32 MAX_DUNGEON_ENCOUNTERS_PER_BOSS = 4
staticconstexpr

Definition at line 86 of file InstanceScript.h.