AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
instance_halls_of_lightning::instance_halls_of_lightning_InstanceMapScript Struct Reference
Inheritance diagram for instance_halls_of_lightning::instance_halls_of_lightning_InstanceMapScript:
InstanceScript ZoneScript

Public Member Functions

 instance_halls_of_lightning_InstanceMapScript (Map *pMap)
 
void Initialize () override
 
bool IsEncounterInProgress () const override
 
void OnCreatureCreate (Creature *pCreature) override
 
void OnGameObjectCreate (GameObject *pGo) override
 
bool CheckAchievementCriteriaMeet (uint32 criteria_id, Player const *, Unit const *, uint32) override
 
void SetData (uint32 uiType, uint32 uiData) override
 
void ReadSaveDataMore (std::istringstream &data) override
 
void WriteSaveDataMore (std::ostringstream &data) override
 
uint32 GetData (uint32 uiType) const override
 
ObjectGuid GetGuidData (uint32 uiData) const override
 
- Public Member Functions inherited from InstanceScript
 InstanceScript (Map *map)
 
 ~InstanceScript () override
 
virtual void Initialize ()
 
virtual void Load (char const *data)
 
virtual void CreatureLooted (Creature *, LootType)
 
virtual std::string GetSaveData ()
 
void SaveToDB ()
 
virtual void Update (uint32)
 
virtual bool IsEncounterInProgress () const
 
void OnCreatureCreate (Creature *creature) override
 
void OnCreatureRemove (Creature *creature) override
 
void OnGameObjectCreate (GameObject *go) override
 
void OnGameObjectRemove (GameObject *go) override
 
ObjectGuid GetObjectGuid (uint32 type) const
 
ObjectGuid GetGuidData (uint32 type) const override
 
CreatureGetCreature (uint32 type)
 
GameObjectGetGameObject (uint32 type)
 
virtual void OnPlayerEnter (Player *)
 
virtual void OnPlayerAreaUpdate (Player *, uint32, uint32)
 
virtual void OnPlayerInWaterStateUpdate (Player *, bool)
 
void HandleGameObject (ObjectGuid guid, bool open, GameObject *go=nullptr)
 
void DoUseDoorOrButton (ObjectGuid guid, uint32 withRestoreTime=0, bool useAlternativeState=false)
 
void DoRespawnGameObject (ObjectGuid guid, uint32 timeToDespawn=MINUTE)
 
void DoRespawnCreature (ObjectGuid guid, bool force=false)
 
void DoRespawnCreature (uint32 type, bool force=false)
 
void DoUpdateWorldState (uint32 worldstateId, uint32 worldstateValue)
 
void DoSendNotifyToInstance (char const *format,...)
 
void DoUpdateAchievementCriteria (AchievementCriteriaTypes type, uint32 miscValue1=0, uint32 miscValue2=0, Unit *unit=nullptr)
 
void DoStartTimedAchievement (AchievementCriteriaTimedTypes type, uint32 entry)
 
void DoStopTimedAchievement (AchievementCriteriaTimedTypes type, uint32 entry)
 
void DoRemoveAurasDueToSpellOnPlayers (uint32 spell)
 
void DoCastSpellOnPlayers (uint32 spell)
 
void DoCastSpellOnPlayer (Player *player, uint32 spell, bool includePets, bool includeControlled)
 
bool ServerAllowsTwoSideGroups ()
 
virtual bool SetBossState (uint32 id, EncounterState state)
 
EncounterState GetBossState (uint32 id) const
 
CreatureBoundary const * GetBossBoundary (uint32 id) const
 
BossInfo const * GetBossInfo (uint32 id) const
 
uint32 GetPersistentData (uint32 index) const
 
void StorePersistentData (uint32 index, uint32 data)
 
virtual bool CheckAchievementCriteriaMeet (uint32, Player const *, Unit const *=nullptr, uint32=0)
 
virtual bool CheckRequiredBosses (uint32, Player const *=nullptr) const
 
void SetCompletedEncountersMask (uint32 newMask, bool save)
 
uint32 GetCompletedEncounterMask () const
 
void SendEncounterUnit (uint32 type, Unit *unit=nullptr, uint8 param1=0, uint8 param2=0)
 
virtual void FillInitialWorldStates (WorldPacket &)
 
uint32 GetEncounterCount () const
 
void MarkAreaTriggerDone (uint32 id)
 
void ResetAreaTriggerDone (uint32 id)
 
bool IsAreaTriggerDone (uint32 id) const
 
virtual void DoAction (int32)
 
void DoForAllMinions (uint32 id, std::function< void(Creature *)> exec)
 
void StoreGameObjectState (ObjectGuid::LowType spawnId, uint8 state)
 
uint8 GetStoredGameObjectState (ObjectGuid::LowType spawnId) const
 
void LoadInstanceSavedGameobjectStateData ()
 
bool IsBossDone (uint32 bossId) const
 
bool AllBossesDone () const
 
bool AllBossesDone (std::initializer_list< uint32 > bossIds) const
 
- Public Member Functions inherited from ZoneScript
 ZoneScript ()
 
virtual ~ZoneScript ()
 
virtual uint32 GetCreatureEntry (ObjectGuid::LowType, CreatureData const *data)
 
virtual uint32 GetGameObjectEntry (ObjectGuid::LowType, uint32 entry)
 
virtual void OnCreatureCreate (Creature *)
 
virtual void OnCreatureRemove (Creature *)
 
virtual void OnGameObjectCreate (GameObject *)
 
virtual void OnGameObjectRemove (GameObject *)
 
virtual void OnUnitDeath (Unit *)
 
virtual void OnCreatureEvade (Creature *)
 
virtual ObjectGuid GetGuidData (uint32) const
 
virtual void SetGuidData (uint32, ObjectGuid)
 
virtual uint64 GetData64 (uint32) const
 
virtual void SetData64 (uint32, uint64)
 
virtual uint32 GetData (uint32) const
 
virtual void SetData (uint32, uint32)
 
virtual void ProcessEvent (WorldObject *, uint32)
 

Public Attributes

uint32 m_auiEncounter [MAX_ENCOUNTER]
 
ObjectGuid m_uiGeneralBjarngrimGUID
 
ObjectGuid m_uiIonarGUID
 
ObjectGuid m_uiLokenGUID
 
ObjectGuid m_uiVolkhanGUID
 
ObjectGuid m_uiBjarngrimDoorGUID
 
ObjectGuid m_uiVolkhanDoorGUID
 
ObjectGuid m_uiIonarDoorGUID
 
ObjectGuid m_uiLokenDoorGUID
 
ObjectGuid m_uiLokenGlobeGUID
 
bool volkhanAchievement
 
bool bjarngrimAchievement
 
- Public Attributes inherited from InstanceScript
Mapinstance
 
TaskScheduler scheduler
 

Additional Inherited Members

- Static Public Member Functions inherited from InstanceScript
static std::string GetBossStateName (uint8 state)
 
- Protected Member Functions inherited from InstanceScript
void SetHeaders (std::string const &dataHeaders)
 
void SetBossNumber (uint32 number)
 
void SetPersistentDataCount (uint32 number)
 
void LoadBossBoundaries (BossBoundaryData const &data)
 
void LoadDoorData (DoorData const *data)
 
void LoadMinionData (MinionData const *data)
 
void LoadObjectData (ObjectData const *creatureData, ObjectData const *gameObjectData)
 
void AddObject (Creature *obj, bool add=true)
 
void RemoveObject (Creature *obj)
 
void AddObject (GameObject *obj, bool add=true)
 
void RemoveObject (GameObject *obj)
 
void AddObject (WorldObject *obj, uint32 type, bool add=true)
 
void RemoveObject (WorldObject *obj, uint32 type)
 
void AddDoor (GameObject *door, bool add=true)
 
void RemoveDoor (GameObject *door)
 
void AddMinion (Creature *minion, bool add=true)
 
void RemoveMinion (Creature *minion)
 
void UpdateDoorState (GameObject *door)
 
void UpdateMinionState (Creature *minion, EncounterState state)
 
bool ReadSaveDataHeaders (std::istringstream &data)
 
void ReadSaveDataBossStates (std::istringstream &data)
 
void ReadSavePersistentData (std::istringstream &data)
 
virtual void ReadSaveDataMore (std::istringstream &)
 
void WriteSaveDataHeaders (std::ostringstream &data)
 
void WriteSaveDataBossStates (std::ostringstream &data)
 
void WritePersistentData (std::ostringstream &data)
 
virtual void WriteSaveDataMore (std::ostringstream &)
 

Detailed Description

Constructor & Destructor Documentation

◆ instance_halls_of_lightning_InstanceMapScript()

instance_halls_of_lightning::instance_halls_of_lightning_InstanceMapScript::instance_halls_of_lightning_InstanceMapScript ( Map pMap)
inline
35: InstanceScript(pMap) { Initialize(); };
Definition: InstanceScript.h:142
void Initialize() override
Definition: instance_halls_of_lightning.cpp:53

References Initialize().

Member Function Documentation

◆ CheckAchievementCriteriaMeet()

bool instance_halls_of_lightning::instance_halls_of_lightning_InstanceMapScript::CheckAchievementCriteriaMeet ( uint32  criteria_id,
Player const *  ,
Unit const *  ,
uint32   
)
inlineoverridevirtual

Reimplemented from InstanceScript.

128 {
129 switch (criteria_id)
130 {
131 case 7321: //Shatter Resistant (2042)
132 return volkhanAchievement;
133 case 6835: // Lightning Struck (1834)
135 }
136 return false;
137 }
bool bjarngrimAchievement
Definition: instance_halls_of_lightning.cpp:51
bool volkhanAchievement
Definition: instance_halls_of_lightning.cpp:50

References bjarngrimAchievement, and volkhanAchievement.

◆ GetData()

uint32 instance_halls_of_lightning::instance_halls_of_lightning_InstanceMapScript::GetData ( uint32  uiType) const
inlineoverridevirtual

Reimplemented from ZoneScript.

194 {
195 return m_auiEncounter[uiType];
196 }
uint32 m_auiEncounter[MAX_ENCOUNTER]
Definition: instance_halls_of_lightning.cpp:37

References m_auiEncounter.

◆ GetGuidData()

ObjectGuid instance_halls_of_lightning::instance_halls_of_lightning_InstanceMapScript::GetGuidData ( uint32  uiData) const
inlineoverridevirtual

Reimplemented from InstanceScript.

199 {
200 switch (uiData)
201 {
202 case TYPE_BJARNGRIM:
204 case TYPE_VOLKHAN:
205 return m_uiVolkhanGUID;
206 case TYPE_IONAR:
207 return m_uiIonarGUID;
208 case TYPE_LOKEN:
209 return m_uiLokenGUID;
210 }
211
212 return ObjectGuid::Empty;
213 }
@ TYPE_IONAR
Definition: halls_of_lightning.h:30
@ TYPE_BJARNGRIM
Definition: halls_of_lightning.h:29
@ TYPE_VOLKHAN
Definition: halls_of_lightning.h:32
@ TYPE_LOKEN
Definition: halls_of_lightning.h:31
static ObjectGuid const Empty
Definition: ObjectGuid.h:120
ObjectGuid m_uiVolkhanGUID
Definition: instance_halls_of_lightning.cpp:42
ObjectGuid m_uiIonarGUID
Definition: instance_halls_of_lightning.cpp:40
ObjectGuid m_uiLokenGUID
Definition: instance_halls_of_lightning.cpp:41
ObjectGuid m_uiGeneralBjarngrimGUID
Definition: instance_halls_of_lightning.cpp:39

References ObjectGuid::Empty, m_uiGeneralBjarngrimGUID, m_uiIonarGUID, m_uiLokenGUID, m_uiVolkhanGUID, TYPE_BJARNGRIM, TYPE_IONAR, TYPE_LOKEN, and TYPE_VOLKHAN.

◆ Initialize()

void instance_halls_of_lightning::instance_halls_of_lightning_InstanceMapScript::Initialize ( )
inlineoverridevirtual

Reimplemented from InstanceScript.

54 {
56 memset(&m_auiEncounter, 0, sizeof(m_auiEncounter));
57
58 volkhanAchievement = false;
60 }
#define DataHeader
Definition: blackrock_depths.h:23
void SetHeaders(std::string const &dataHeaders)
Definition: InstanceScript.cpp:138

References bjarngrimAchievement, DataHeader, m_auiEncounter, InstanceScript::SetHeaders(), and volkhanAchievement.

Referenced by instance_halls_of_lightning_InstanceMapScript().

◆ IsEncounterInProgress()

bool instance_halls_of_lightning::instance_halls_of_lightning_InstanceMapScript::IsEncounterInProgress ( ) const
inlineoverridevirtual

Reimplemented from InstanceScript.

63 {
64 for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
65 {
67 {
68 return true;
69 }
70 }
71 return false;
72 }
std::uint8_t uint8
Definition: Define.h:109
@ IN_PROGRESS
Definition: InstanceScript.h:58
@ TYPE_LOKEN_INTRO
Definition: halls_of_lightning.h:33
#define MAX_ENCOUNTER
Definition: violet_hold.h:21

References IN_PROGRESS, m_auiEncounter, MAX_ENCOUNTER, and TYPE_LOKEN_INTRO.

◆ OnCreatureCreate()

void instance_halls_of_lightning::instance_halls_of_lightning_InstanceMapScript::OnCreatureCreate ( Creature pCreature)
inlineoverridevirtual

Reimplemented from InstanceScript.

75 {
76 switch (pCreature->GetEntry())
77 {
78 case NPC_BJARNGRIM:
79 m_uiGeneralBjarngrimGUID = pCreature->GetGUID();
80 break;
81 case NPC_VOLKHAN:
82 m_uiVolkhanGUID = pCreature->GetGUID();
83 break;
84 case NPC_IONAR:
85 m_uiIonarGUID = pCreature->GetGUID();
86 break;
87 case NPC_LOKEN:
88 m_uiLokenGUID = pCreature->GetGUID();
89 break;
90 }
91 }
@ NPC_BJARNGRIM
Definition: halls_of_lightning.h:42
@ NPC_LOKEN
Definition: halls_of_lightning.h:45
@ NPC_IONAR
Definition: halls_of_lightning.h:44
@ NPC_VOLKHAN
Definition: halls_of_lightning.h:43
uint32 GetEntry() const
Definition: Object.h:112
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:109

References Object::GetEntry(), Object::GetGUID(), m_uiGeneralBjarngrimGUID, m_uiIonarGUID, m_uiLokenGUID, m_uiVolkhanGUID, NPC_BJARNGRIM, NPC_IONAR, NPC_LOKEN, and NPC_VOLKHAN.

◆ OnGameObjectCreate()

void instance_halls_of_lightning::instance_halls_of_lightning_InstanceMapScript::OnGameObjectCreate ( GameObject pGo)
inlineoverridevirtual

Reimplemented from InstanceScript.

94 {
95 switch (pGo->GetEntry())
96 {
101
102 break;
103 case GO_VOLKHAN_DOOR:
107
108 break;
109 case GO_IONAR_DOOR:
110 m_uiIonarDoorGUID = pGo->GetGUID();
113
114 break;
115 case GO_LOKEN_DOOR:
116 m_uiLokenDoorGUID = pGo->GetGUID();
119
120 break;
121 case GO_LOKEN_THRONE:
123 break;
124 }
125 }
@ DONE
Definition: InstanceScript.h:60
@ GO_STATE_ACTIVE
Definition: GameObjectData.h:690
@ GO_LOKEN_THRONE
Definition: halls_of_lightning.h:54
@ GO_VOLKHAN_DOOR
Definition: halls_of_lightning.h:51
@ GO_LOKEN_DOOR
Definition: halls_of_lightning.h:53
@ GO_IONAR_DOOR
Definition: halls_of_lightning.h:52
@ GO_BJARNGRIM_DOOR
Definition: halls_of_lightning.h:50
void SetGoState(GOState state)
Definition: GameObject.cpp:2477
ObjectGuid m_uiIonarDoorGUID
Definition: instance_halls_of_lightning.cpp:46
ObjectGuid m_uiLokenGlobeGUID
Definition: instance_halls_of_lightning.cpp:48
ObjectGuid m_uiLokenDoorGUID
Definition: instance_halls_of_lightning.cpp:47
ObjectGuid m_uiVolkhanDoorGUID
Definition: instance_halls_of_lightning.cpp:45
ObjectGuid m_uiBjarngrimDoorGUID
Definition: instance_halls_of_lightning.cpp:44

References DONE, Object::GetEntry(), Object::GetGUID(), GO_BJARNGRIM_DOOR, GO_IONAR_DOOR, GO_LOKEN_DOOR, GO_LOKEN_THRONE, GO_STATE_ACTIVE, GO_VOLKHAN_DOOR, m_auiEncounter, m_uiBjarngrimDoorGUID, m_uiIonarDoorGUID, m_uiLokenDoorGUID, m_uiLokenGlobeGUID, m_uiVolkhanDoorGUID, GameObject::SetGoState(), TYPE_BJARNGRIM, TYPE_IONAR, TYPE_LOKEN, and TYPE_VOLKHAN.

◆ ReadSaveDataMore()

void instance_halls_of_lightning::instance_halls_of_lightning_InstanceMapScript::ReadSaveDataMore ( std::istringstream &  data)
inlineoverridevirtual

Reimplemented from InstanceScript.

178 {
179 data >> m_auiEncounter[0];
180 data >> m_auiEncounter[1];
181 data >> m_auiEncounter[2];
182 data >> m_auiEncounter[3];
183 }

References m_auiEncounter.

◆ SetData()

void instance_halls_of_lightning::instance_halls_of_lightning_InstanceMapScript::SetData ( uint32  uiType,
uint32  uiData 
)
inlineoverridevirtual

Reimplemented from ZoneScript.

140 {
141 m_auiEncounter[uiType] = uiData;
142 if (uiType == TYPE_LOKEN_INTRO)
143 SaveToDB();
144
145 // Achievements
146 if (uiType == DATA_BJARNGRIM_ACHIEVEMENT)
147 bjarngrimAchievement = (bool)uiData;
148 else if (uiType == DATA_VOLKHAN_ACHIEVEMENT)
149 volkhanAchievement = (bool)uiData;
150
151 if (uiData != DONE)
152 return;
153
154 switch (uiType)
155 {
156 case TYPE_BJARNGRIM:
158 break;
159 case TYPE_VOLKHAN:
161 break;
162 case TYPE_IONAR:
164 break;
165 case TYPE_LOKEN:
167 //Appears to be type 5 GO with animation. Need to figure out how this work, code below only placeholder
169 pGlobe->SetGoState(GO_STATE_ACTIVE);
170
171 break;
172 }
173
174 SaveToDB();
175 }
@ DATA_VOLKHAN_ACHIEVEMENT
Definition: halls_of_lightning.h:37
@ DATA_BJARNGRIM_ACHIEVEMENT
Definition: halls_of_lightning.h:36
Definition: GameObject.h:121
void HandleGameObject(ObjectGuid guid, bool open, GameObject *go=nullptr)
Definition: InstanceScript.cpp:110
Map * instance
Definition: InstanceScript.h:148
void SaveToDB()
Definition: InstanceScript.cpp:41
GameObject * GetGameObject(ObjectGuid const guid)
Definition: Map.cpp:3319

References bjarngrimAchievement, DATA_BJARNGRIM_ACHIEVEMENT, DATA_VOLKHAN_ACHIEVEMENT, DONE, Map::GetGameObject(), GO_STATE_ACTIVE, InstanceScript::HandleGameObject(), InstanceScript::instance, m_auiEncounter, m_uiBjarngrimDoorGUID, m_uiIonarDoorGUID, m_uiLokenDoorGUID, m_uiLokenGlobeGUID, m_uiVolkhanDoorGUID, InstanceScript::SaveToDB(), TYPE_BJARNGRIM, TYPE_IONAR, TYPE_LOKEN, TYPE_LOKEN_INTRO, TYPE_VOLKHAN, and volkhanAchievement.

◆ WriteSaveDataMore()

void instance_halls_of_lightning::instance_halls_of_lightning_InstanceMapScript::WriteSaveDataMore ( std::ostringstream &  data)
inlineoverridevirtual

Reimplemented from InstanceScript.

186 {
187 data << m_auiEncounter[0] << ' '
188 << m_auiEncounter[1] << ' '
189 << m_auiEncounter[2] << ' '
190 << m_auiEncounter[3] << ' ';
191 }

References m_auiEncounter.

Member Data Documentation

◆ bjarngrimAchievement

bool instance_halls_of_lightning::instance_halls_of_lightning_InstanceMapScript::bjarngrimAchievement

◆ m_auiEncounter

uint32 instance_halls_of_lightning::instance_halls_of_lightning_InstanceMapScript::m_auiEncounter[MAX_ENCOUNTER]

◆ m_uiBjarngrimDoorGUID

ObjectGuid instance_halls_of_lightning::instance_halls_of_lightning_InstanceMapScript::m_uiBjarngrimDoorGUID

Referenced by OnGameObjectCreate(), and SetData().

◆ m_uiGeneralBjarngrimGUID

ObjectGuid instance_halls_of_lightning::instance_halls_of_lightning_InstanceMapScript::m_uiGeneralBjarngrimGUID

Referenced by GetGuidData(), and OnCreatureCreate().

◆ m_uiIonarDoorGUID

ObjectGuid instance_halls_of_lightning::instance_halls_of_lightning_InstanceMapScript::m_uiIonarDoorGUID

Referenced by OnGameObjectCreate(), and SetData().

◆ m_uiIonarGUID

ObjectGuid instance_halls_of_lightning::instance_halls_of_lightning_InstanceMapScript::m_uiIonarGUID

Referenced by GetGuidData(), and OnCreatureCreate().

◆ m_uiLokenDoorGUID

ObjectGuid instance_halls_of_lightning::instance_halls_of_lightning_InstanceMapScript::m_uiLokenDoorGUID

Referenced by OnGameObjectCreate(), and SetData().

◆ m_uiLokenGlobeGUID

ObjectGuid instance_halls_of_lightning::instance_halls_of_lightning_InstanceMapScript::m_uiLokenGlobeGUID

Referenced by OnGameObjectCreate(), and SetData().

◆ m_uiLokenGUID

ObjectGuid instance_halls_of_lightning::instance_halls_of_lightning_InstanceMapScript::m_uiLokenGUID

Referenced by GetGuidData(), and OnCreatureCreate().

◆ m_uiVolkhanDoorGUID

ObjectGuid instance_halls_of_lightning::instance_halls_of_lightning_InstanceMapScript::m_uiVolkhanDoorGUID

Referenced by OnGameObjectCreate(), and SetData().

◆ m_uiVolkhanGUID

ObjectGuid instance_halls_of_lightning::instance_halls_of_lightning_InstanceMapScript::m_uiVolkhanGUID

Referenced by GetGuidData(), and OnCreatureCreate().

◆ volkhanAchievement

bool instance_halls_of_lightning::instance_halls_of_lightning_InstanceMapScript::volkhanAchievement