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

Public Member Functions

 instance_halls_of_reflection_InstanceMapScript (Map *pMap)
 
void Initialize () override
 
bool IsEncounterInProgress () const override
 
void OnCreatureCreate (Creature *creature) override
 
void OnGameObjectCreate (GameObject *go) override
 
void SetData (uint32 type, uint32 data) override
 
uint32 GetData (uint32 type) const override
 
ObjectGuid GetGuidData (uint32 type) const override
 
void ReadSaveDataMore (std::istringstream &data) override
 
void WriteSaveDataMore (std::ostringstream &data) override
 
void OnUnitDeath (Unit *unit) override
 
void RandomizeCompositionsAndShow ()
 
void AddWave1 ()
 
void DoWipe1 ()
 
void Update (uint32 diff) 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 EncounterMask
 
TeamId TeamIdInInstance
 
ObjectGuid NPC_FalricGUID
 
ObjectGuid NPC_MarwynGUID
 
ObjectGuid NPC_LichKingIntroGUID
 
ObjectGuid NPC_LeaderIntroGUID
 
ObjectGuid NPC_GuardGUID
 
ObjectGuid NPC_UtherGUID
 
ObjectGuid NPC_LichKingGUID
 
ObjectGuid NPC_LeaderGUID
 
ObjectGuid NPC_IceWallTargetGUID [4]
 
ObjectGuid NPC_AltarBunnyGUID
 
ObjectGuid NPC_QuelDelarGUID
 
ObjectGuid NPC_ShipCaptainGUID
 
ObjectGuid GO_FrostmourneGUID
 
ObjectGuid GO_FrostmourneAltarGUID
 
ObjectGuid GO_FrontDoorGUID
 
ObjectGuid GO_ArthasDoorGUID
 
ObjectGuid GO_CaveInGUID
 
ObjectGuid GO_DoorBeforeThroneGUID
 
ObjectGuid GO_DoorAfterThroneGUID
 
ObjectGuid GO_IceWallGUID
 
ObjectGuid NPC_TrashGUID [NUM_OF_TRASH]
 
bool TrashActive [NUM_OF_TRASH]
 
uint8 TrashCounter
 
uint32 chosenComposition [8][5]
 
uint8 WaveNumber
 
uint32 NextWaveTimer
 
uint16 CheckPlayersTimer
 
uint16 ResumeFirstEventTimer
 
uint8 ResumeFirstEventStep
 
bool bFinished5Waves
 
uint8 reqKillCount
 
bool IsDuringLKFight
 
uint32 BatteredHiltStatus
 
ObjectGuid NPC_FrostswornGeneralGUID
 
ObjectGuid NPC_SpiritualReflectionGUID [5]
 
uint32 outroTimer
 
uint8 outroStep
 
MotionTransportT1
 
- 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_reflection_InstanceMapScript()

instance_halls_of_reflection::instance_halls_of_reflection_InstanceMapScript::instance_halls_of_reflection_InstanceMapScript ( Map pMap)
inline
140 : InstanceScript(pMap)
141 {
143 };
#define DataHeader
Definition: blackrock_depths.h:23
Definition: InstanceScript.h:142
void SetHeaders(std::string const &dataHeaders)
Definition: InstanceScript.cpp:138

References DataHeader, and InstanceScript::SetHeaders().

Member Function Documentation

◆ AddWave1()

void instance_halls_of_reflection::instance_halls_of_reflection_InstanceMapScript::AddWave1 ( )
inline
815 {
816 if (WaveNumber >= 10)
817 return;
818
819 ++WaveNumber;
820 if (WaveNumber >= 6)
821 bFinished5Waves = true;
822
826
827 // some of them could go back to spawn due to vanish, etc.
828 // on activating next wave make those attack again
829 for (uint8 i = 0; i < NUM_OF_TRASH; ++i)
830 if (TrashActive[i])
832 if (c->IsAlive() && !c->IsInCombat())
833 c->AI()->DoAction(1);
834
835 if (WaveNumber == 5 || WaveNumber == 10)
836 {
837 NextWaveTimer = 0;
838 if (WaveNumber == 5)
839 {
841 {
842 if (falric->IsAlive())
843 falric->AI()->DoAction(1);
844 else
845 NextWaveTimer = 1;
846 }
847 }
848 else
849 {
851 if (marwyn->IsAlive()) // should always be true, but just in case
852 marwyn->AI()->DoAction(1);
853 }
854 }
855 else
856 {
857 NextWaveTimer = 150000;
858
859 uint8 num_to_activate = 5;
860 if (WaveNumber <= 2)
861 num_to_activate = 3;
862 else if (WaveNumber <= 4)
863 num_to_activate = 4;
864 reqKillCount += num_to_activate;
865 for (uint8 i = 0; i < num_to_activate; ++i)
866 {
867 uint32 entry = chosenComposition[WaveNumber - (WaveNumber > 5 ? 2 : 1)][i];
868 bool forward = !!urand(0, 1);
869 for (int8 j = (forward ? 0 : NUM_OF_TRASH - 1); (forward ? j<NUM_OF_TRASH : j >= 0); (forward ? ++j : --j))
870 if (!TrashActive[j])
872 if (c->GetEntry() == entry)
873 {
874 TrashActive[j] = true;
875 c->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
876 c->SetImmuneToAll(false);
877 c->AI()->DoAction(1);
878 break;
879 }
880 }
881 }
882 }
uint32 urand(uint32 min, uint32 max)
Definition: Random.cpp:44
std::uint8_t uint8
Definition: Define.h:109
std::uint32_t uint32
Definition: Define.h:107
std::int8_t int8
Definition: Define.h:105
@ UNIT_FLAG_NOT_SELECTABLE
Definition: UnitDefines.h:254
#define NUM_OF_TRASH
Definition: halls_of_reflection.h:117
@ WORLD_STATE_HOR_COUNTER
Definition: halls_of_reflection.h:105
@ WORLD_STATE_HOR_WAVE_COUNT
Definition: halls_of_reflection.h:106
Definition: Creature.h:46
void HandleGameObject(ObjectGuid guid, bool open, GameObject *go=nullptr)
Definition: InstanceScript.cpp:110
Map * instance
Definition: InstanceScript.h:148
void DoUpdateWorldState(uint32 worldstateId, uint32 worldstateValue)
Definition: InstanceScript.cpp:577
Creature * GetCreature(ObjectGuid const guid)
Definition: Map.cpp:3314
bool bFinished5Waves
Definition: instance_halls_of_reflection.cpp:177
uint8 reqKillCount
Definition: instance_halls_of_reflection.cpp:178
ObjectGuid NPC_FalricGUID
Definition: instance_halls_of_reflection.cpp:147
bool TrashActive[NUM_OF_TRASH]
Definition: instance_halls_of_reflection.cpp:169
ObjectGuid NPC_TrashGUID[NUM_OF_TRASH]
Definition: instance_halls_of_reflection.cpp:168
ObjectGuid NPC_MarwynGUID
Definition: instance_halls_of_reflection.cpp:148
uint8 WaveNumber
Definition: instance_halls_of_reflection.cpp:172
ObjectGuid GO_FrontDoorGUID
Definition: instance_halls_of_reflection.cpp:161
uint32 chosenComposition[8][5]
Definition: instance_halls_of_reflection.cpp:171
uint32 NextWaveTimer
Definition: instance_halls_of_reflection.cpp:173

References bFinished5Waves, chosenComposition, InstanceScript::DoUpdateWorldState(), Map::GetCreature(), GO_FrontDoorGUID, InstanceScript::HandleGameObject(), InstanceScript::instance, NextWaveTimer, NPC_FalricGUID, NPC_MarwynGUID, NPC_TrashGUID, NUM_OF_TRASH, reqKillCount, TrashActive, UNIT_FLAG_NOT_SELECTABLE, urand(), WaveNumber, WORLD_STATE_HOR_COUNTER, and WORLD_STATE_HOR_WAVE_COUNT.

Referenced by SetData(), and Update().

◆ DoWipe1()

void instance_halls_of_reflection::instance_halls_of_reflection_InstanceMapScript::DoWipe1 ( )
inline
885 {
886 if (!WaveNumber)
887 return;
888
892
894 WaveNumber = 0;
895 NextWaveTimer = 0;
896 memset(&chosenComposition, 0, sizeof(chosenComposition));
897
898 for (uint8 i = 0; i < NUM_OF_TRASH; ++i)
899 if (TrashActive[i])
901 {
902 c->GetThreatMgr().ClearAllThreat();
903 c->CombatStop(true);
904 c->InterruptNonMeleeSpells(true);
905 c->SetUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
906 c->SetImmuneToAll(true);
907 c->Respawn(true);
908 c->UpdatePosition(c->GetHomePosition(), true);
909 c->StopMovingOnCurrentPos();
910 }
911 memset(&TrashActive, 0, sizeof(TrashActive));
913 falric->AI()->EnterEvadeMode();
915 marwyn->AI()->EnterEvadeMode();
916
919 reqKillCount = 0;
920 }
uint8 TrashCounter
Definition: instance_halls_of_reflection.cpp:170
uint8 ResumeFirstEventStep
Definition: instance_halls_of_reflection.cpp:176
uint16 ResumeFirstEventTimer
Definition: instance_halls_of_reflection.cpp:175

References chosenComposition, InstanceScript::DoUpdateWorldState(), Map::GetCreature(), GO_FrontDoorGUID, InstanceScript::HandleGameObject(), InstanceScript::instance, NextWaveTimer, NPC_FalricGUID, NPC_MarwynGUID, NPC_TrashGUID, NUM_OF_TRASH, reqKillCount, ResumeFirstEventStep, ResumeFirstEventTimer, TrashActive, TrashCounter, UNIT_FLAG_NOT_SELECTABLE, WaveNumber, WORLD_STATE_HOR_COUNTER, and WORLD_STATE_HOR_WAVE_COUNT.

Referenced by SetData(), and Update().

◆ GetData()

uint32 instance_halls_of_reflection::instance_halls_of_reflection_InstanceMapScript::GetData ( uint32  type) const
inlineoverridevirtual

Reimplemented from ZoneScript.

669 {
670 switch (type)
671 {
672 case DATA_INTRO:
673 case DATA_FALRIC:
674 case DATA_MARWYN:
676 case DATA_LK_INTRO:
677 case DATA_LICH_KING:
678 return EncounterMask & (1 << type);
679 case DATA_WAVE_NUMBER:
680 return (uint32)WaveNumber;
682 return BatteredHiltStatus;
683 }
684
685 return 0;
686 }
@ DATA_FROSTSWORN_GENERAL
Definition: halls_of_reflection.h:33
@ DATA_LICH_KING
Definition: halls_of_reflection.h:35
@ DATA_MARWYN
Definition: halls_of_reflection.h:32
@ DATA_BATTERED_HILT
Definition: halls_of_reflection.h:36
@ DATA_FALRIC
Definition: halls_of_reflection.h:31
@ DATA_WAVE_NUMBER
Definition: halls_of_reflection.h:45
@ DATA_LK_INTRO
Definition: halls_of_reflection.h:34
@ DATA_INTRO
Definition: halls_of_reflection.h:30
uint32 BatteredHiltStatus
Definition: instance_halls_of_reflection.cpp:180
uint32 EncounterMask
Definition: instance_halls_of_reflection.cpp:145

References BatteredHiltStatus, DATA_BATTERED_HILT, DATA_FALRIC, DATA_FROSTSWORN_GENERAL, DATA_INTRO, DATA_LICH_KING, DATA_LK_INTRO, DATA_MARWYN, DATA_WAVE_NUMBER, EncounterMask, and WaveNumber.

◆ GetGuidData()

ObjectGuid instance_halls_of_reflection::instance_halls_of_reflection_InstanceMapScript::GetGuidData ( uint32  type) const
inlineoverridevirtual

Reimplemented from InstanceScript.

689 {
690 switch (type)
691 {
693 return NPC_GuardGUID;
696 case NPC_UTHER:
697 return NPC_UtherGUID;
698 case DATA_FALRIC:
699 return NPC_FalricGUID;
700 case DATA_MARWYN:
701 return NPC_MarwynGUID;
703 return NPC_LichKingGUID;
705 return NPC_LeaderGUID;
707 case NPC_ICE_WALL_TARGET+1:
708 case NPC_ICE_WALL_TARGET+2:
709 case NPC_ICE_WALL_TARGET+3:
711 case GO_FROSTMOURNE:
712 return GO_FrostmourneGUID;
713 case GO_ARTHAS_DOOR:
714 return GO_ArthasDoorGUID;
715 case GO_FRONT_DOOR:
716 return GO_FrontDoorGUID;
717 }
718 return ObjectGuid::Empty;
719 }
@ NPC_SYLVANAS_PART2
Definition: forge_of_souls.h:41
@ GO_FRONT_DOOR
Definition: halls_of_reflection.h:88
@ GO_FROSTMOURNE
Definition: halls_of_reflection.h:86
@ GO_ARTHAS_DOOR
Definition: halls_of_reflection.h:89
@ NPC_DARK_RANGER_LORALEN
Definition: halls_of_reflection.h:62
@ NPC_LICH_KING_EVENT
Definition: halls_of_reflection.h:53
@ NPC_LICH_KING_BOSS
Definition: halls_of_reflection.h:54
@ NPC_ICE_WALL_TARGET
Definition: halls_of_reflection.h:75
@ NPC_UTHER
Definition: culling_of_stratholme.h:56
static ObjectGuid const Empty
Definition: ObjectGuid.h:120
ObjectGuid GO_FrostmourneGUID
Definition: instance_halls_of_reflection.cpp:159
ObjectGuid NPC_LeaderGUID
Definition: instance_halls_of_reflection.cpp:154
ObjectGuid NPC_LichKingIntroGUID
Definition: instance_halls_of_reflection.cpp:149
ObjectGuid NPC_IceWallTargetGUID[4]
Definition: instance_halls_of_reflection.cpp:155
ObjectGuid NPC_UtherGUID
Definition: instance_halls_of_reflection.cpp:152
ObjectGuid NPC_GuardGUID
Definition: instance_halls_of_reflection.cpp:151
ObjectGuid GO_ArthasDoorGUID
Definition: instance_halls_of_reflection.cpp:162
ObjectGuid NPC_LichKingGUID
Definition: instance_halls_of_reflection.cpp:153

References DATA_FALRIC, DATA_MARWYN, ObjectGuid::Empty, GO_ARTHAS_DOOR, GO_ArthasDoorGUID, GO_FRONT_DOOR, GO_FrontDoorGUID, GO_FROSTMOURNE, GO_FrostmourneGUID, NPC_DARK_RANGER_LORALEN, NPC_FalricGUID, NPC_GuardGUID, NPC_ICE_WALL_TARGET, NPC_IceWallTargetGUID, NPC_LeaderGUID, NPC_LICH_KING_BOSS, NPC_LICH_KING_EVENT, NPC_LichKingGUID, NPC_LichKingIntroGUID, NPC_MarwynGUID, NPC_SYLVANAS_PART2, NPC_UTHER, and NPC_UtherGUID.

◆ Initialize()

void instance_halls_of_reflection::instance_halls_of_reflection_InstanceMapScript::Initialize ( )
inlineoverridevirtual

Reimplemented from InstanceScript.

190 {
191 EncounterMask = 0;
193 memset(&TrashActive, 0, sizeof(TrashActive));
194 TrashCounter = 0;
195 memset(&chosenComposition, 0, sizeof(chosenComposition));
196 WaveNumber = 0;
197 NextWaveTimer = 0;
198 CheckPlayersTimer = 5000;
201 bFinished5Waves = false;
202 reqKillCount = 0;
203 IsDuringLKFight = false;
205
206 outroTimer = 0;
207 outroStep = 0;
208 T1 = nullptr;
209 }
@ TEAM_NEUTRAL
Definition: SharedDefines.h:762
uint32 outroTimer
Definition: instance_halls_of_reflection.cpp:185
MotionTransport * T1
Definition: instance_halls_of_reflection.cpp:187
uint8 outroStep
Definition: instance_halls_of_reflection.cpp:186
TeamId TeamIdInInstance
Definition: instance_halls_of_reflection.cpp:146
bool IsDuringLKFight
Definition: instance_halls_of_reflection.cpp:179
uint16 CheckPlayersTimer
Definition: instance_halls_of_reflection.cpp:174

References BatteredHiltStatus, bFinished5Waves, CheckPlayersTimer, chosenComposition, EncounterMask, IsDuringLKFight, NextWaveTimer, outroStep, outroTimer, reqKillCount, ResumeFirstEventStep, ResumeFirstEventTimer, T1, TEAM_NEUTRAL, TeamIdInInstance, TrashActive, TrashCounter, and WaveNumber.

◆ IsEncounterInProgress()

bool instance_halls_of_reflection::instance_halls_of_reflection_InstanceMapScript::IsEncounterInProgress ( ) const
inlineoverridevirtual

Reimplemented from InstanceScript.

212 {
213 return (instance->HavePlayers() && WaveNumber) || IsDuringLKFight; // during LK fight npcs are active and will unset this variable
214 }
bool HavePlayers() const
Definition: Map.h:477

References Map::HavePlayers(), InstanceScript::instance, IsDuringLKFight, and WaveNumber.

◆ OnCreatureCreate()

void instance_halls_of_reflection::instance_halls_of_reflection_InstanceMapScript::OnCreatureCreate ( Creature creature)
inlineoverridevirtual

Reimplemented from InstanceScript.

217 {
219 {
220 Map::PlayerList const& players = instance->GetPlayers();
221 if (!players.IsEmpty())
222 for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
223 if (Player* p = itr->GetSource())
224 if (!p->IsGameMaster())
225 {
226 TeamIdInInstance = p->GetTeamId();
227 break;
228 }
229 }
230
231 switch (creature->GetEntry())
232 {
234 creature->SetVisible(false);
235 creature->SetSpeed(MOVE_RUN, 1.1);
236 NPC_LeaderIntroGUID = creature->GetGUID();
238 creature->UpdateEntry(NPC_JAINA_PART1);
241 break;
243 creature->SetVisible(false);
244 NPC_GuardGUID = creature->GetGUID();
247 break;
248 case NPC_UTHER:
249 creature->SetVisible(false);
250 NPC_UtherGUID = creature->GetGUID();
251 creature->SetReactState(REACT_PASSIVE);
252 break;
254 creature->SetVisible(false);
255 NPC_LichKingIntroGUID = creature->GetGUID();
256 creature->SetReactState(REACT_PASSIVE);
258 break;
259 case NPC_FALRIC:
260 creature->SetVisible(false);
261 NPC_FalricGUID = creature->GetGUID();
263 break;
264 case NPC_MARWYN:
265 creature->SetVisible(false);
266 NPC_MarwynGUID = creature->GetGUID();
268 break;
270 case NPC_WAVE_FOOTMAN:
272 case NPC_WAVE_PRIEST:
273 case NPC_WAVE_MAGE:
275 NPC_TrashGUID[TrashCounter++] = creature->GetGUID();
276 if (!(EncounterMask & (1 << DATA_MARWYN)) && !creature->IsAlive())
277 creature->Respawn();
278 creature->SetVisible(false);
279 break;
281 if (!(EncounterMask & (1 << DATA_MARWYN)))
282 {
283 creature->SetVisible(false);
284 creature->SetReactState(REACT_PASSIVE);
285 }
287 break;
289 for (uint8 i = 0; i < 5; ++i)
291 {
292 NPC_SpiritualReflectionGUID[i] = creature->GetGUID();
293 break;
294 }
295 creature->SetVisible(false);
296 break;
299 creature->SetVisible(false);
300 if (!(EncounterMask & (1 << DATA_LK_INTRO)))
301 {
302 creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_ATTACK2HTIGHT); //the fight cannot be in the form of an emote, it is causing bugs
303 creature->CastSpell(creature, SPELL_SOUL_REAPER, true);
304 }
305 else if (!(EncounterMask & (1 << DATA_LICH_KING)))
307 else
308 creature->SetVisible(false);
309
310 NPC_LichKingGUID = creature->GetGUID();
311 creature->SetHealth((creature->GetMaxHealth() * 3) / 4);
313 break;
315 if (!creature->IsAlive())
316 creature->Respawn();
317 NPC_LeaderGUID = creature->GetGUID();
318 creature->SetWalk(false);
319 creature->SetSheath(SHEATH_STATE_MELEE);
321 creature->UpdateEntry(NPC_JAINA_PART2);
322 creature->SetWalk(false);
323 creature->SetHealth(creature->GetMaxHealth() / 20);
325 creature->SetVisible(false);
326 if (!(EncounterMask & (1 << DATA_LK_INTRO)))
327 {
328 creature->SetSheath(SHEATH_STATE_MELEE);
329 creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, TeamIdInInstance == TEAM_ALLIANCE ? EMOTE_ONESHOT_ATTACK2HTIGHT : EMOTE_ONESHOT_ATTACK1H); //the fight cannot be in the form of an emote, it is causing bugs.
332 }
333 else if (!(EncounterMask & (1 << DATA_LICH_KING)))
334 {
337 creature->UpdatePosition(LeaderEscapePos, true);
338 creature->StopMovingOnCurrentPos();
339 }
340 else
341 {
342 instance->LoadGrid(PathWaypoints[PATH_WP_COUNT - 1].GetPositionX(), PathWaypoints[PATH_WP_COUNT - 1].GetPositionY());
343 creature->UpdatePosition(PathWaypoints[PATH_WP_COUNT - 1], true);
344 creature->StopMovingOnCurrentPos();
345 }
346 creature->SetSheath(SHEATH_STATE_MELEE);
348 break;
350 if (creature->GetPositionX() > 5525.0f)
351 NPC_IceWallTargetGUID[0] = creature->GetGUID();
352 else if (creature->GetPositionX() > 5475.0f)
353 NPC_IceWallTargetGUID[1] = creature->GetGUID();
354 else if (creature->GetPositionX() > 5400.0f)
355 NPC_IceWallTargetGUID[2] = creature->GetGUID();
356 else
357 NPC_IceWallTargetGUID[3] = creature->GetGUID();
358 break;
359 case NPC_ALTAR_BUNNY:
360 NPC_AltarBunnyGUID = creature->GetGUID();
361 break;
362 case NPC_QUEL_DELAR:
363 NPC_QuelDelarGUID = creature->GetGUID();
364 creature->SetReactState(REACT_PASSIVE);
365 break;
368 NPC_ShipCaptainGUID = creature->GetGUID();
369 break;
370 }
371 }
@ REACT_PASSIVE
Definition: Unit.h:548
@ MOVEMENTFLAG_WALKING
Definition: UnitDefines.h:352
@ UNIT_NPC_FLAG_GOSSIP
Definition: UnitDefines.h:294
@ UNIT_NPC_FLAG_QUESTGIVER
Definition: UnitDefines.h:295
@ SHEATH_STATE_MELEE
Definition: UnitDefines.h:106
@ MOVE_RUN
Definition: UnitDefines.h:329
@ UNIT_NPC_EMOTESTATE
Definition: UpdateFields.h:140
@ NPC_JAINA_PART1
Definition: forge_of_souls.h:42
@ NPC_JAINA_PART2
Definition: forge_of_souls.h:43
@ NPC_SYLVANAS_PART1
Definition: forge_of_souls.h:40
const Position PathWaypoints[PATH_WP_COUNT]
Definition: halls_of_reflection.h:342
@ NPC_HIGH_CAPTAIN_JUSTIN_BARLETT
Definition: halls_of_reflection.h:77
@ NPC_SKY_REAVER_KORM_BLACKSKAR
Definition: halls_of_reflection.h:78
@ NPC_ALTAR_BUNNY
Definition: halls_of_reflection.h:79
@ NPC_WAVE_FOOTMAN
Definition: halls_of_reflection.h:70
@ NPC_SPIRITUAL_REFLECTION
Definition: halls_of_reflection.h:74
@ NPC_WAVE_PRIEST
Definition: halls_of_reflection.h:66
@ NPC_ARCHMAGE_KORELN
Definition: halls_of_reflection.h:63
@ NPC_FALRIC
Definition: halls_of_reflection.h:51
@ NPC_WAVE_MAGE
Definition: halls_of_reflection.h:67
@ NPC_QUEL_DELAR
Definition: halls_of_reflection.h:80
@ NPC_WAVE_MERCENARY
Definition: halls_of_reflection.h:69
@ NPC_WAVE_RIFLEMAN
Definition: halls_of_reflection.h:71
@ NPC_MARWYN
Definition: halls_of_reflection.h:52
@ NPC_FROSTSWORN_GENERAL
Definition: halls_of_reflection.h:73
@ SPELL_JAINA_ICE_PRISON
Definition: halls_of_reflection.h:282
@ SPELL_SYLVANAS_CLOAK_OF_DARKNESS
Definition: halls_of_reflection.h:281
@ SPELL_SOUL_REAPER
Definition: halls_of_reflection.h:267
@ SPELL_SYLVANAS_DARK_BINDING
Definition: halls_of_reflection.h:283
@ SPELL_JAINA_ICE_BARRIER
Definition: halls_of_reflection.h:280
const Position LeaderEscapePos
Definition: halls_of_reflection.h:331
#define PATH_WP_COUNT
Definition: halls_of_reflection.h:339
@ EMOTE_ONESHOT_ATTACK2HTIGHT
Definition: SharedDefines.h:1927
@ EMOTE_ONESHOT_ATTACK1H
Definition: SharedDefines.h:1926
@ TEAM_ALLIANCE
Definition: SharedDefines.h:760
bool IsEmpty() const
Definition: LinkedList.h:97
Definition: LinkedList.h:139
void Respawn(bool force=false)
Definition: Creature.cpp:2030
bool UpdateEntry(uint32 entry, const CreatureData *data=nullptr, bool changelevel=true, bool updateAI=false)
Definition: Creature.cpp:538
void SetReactState(ReactStates state)
A creature can have 3 ReactStates : Agressive, Passive, Neutral.
Definition: Creature.h:97
bool SetWalk(bool enable) override
Enable or disable the creature's walk mode by removing: MOVEMENTFLAG_WALKING. Infom also the client.
Definition: Creature.cpp:3178
uint32 GetEntry() const
Definition: Object.h:112
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:109
float GetPositionX() const
Definition: Position.h:117
Definition: Player.h:1064
void SetVisible(bool x)
Definition: Unit.cpp:14189
uint32 GetMaxHealth() const
Definition: Unit.h:870
Aura * AddAura(uint32 spellId, Unit *target)
Definition: Unit.cpp:18819
bool IsAlive() const
Definition: Unit.h:1204
void RemoveNpcFlag(NPCFlags flags)
Definition: Unit.h:696
void SetHealth(uint32 val)
Definition: Unit.cpp:15433
virtual void SetSheath(SheathState sheathed)
Definition: Unit.h:945
virtual bool UpdatePosition(float x, float y, float z, float ang, bool teleport=false)
Definition: Unit.cpp:19983
void AddUnitMovementFlag(uint32 f)
Definition: Unit.h:1611
void SetNpcFlag(NPCFlags flags)
Definition: Unit.h:695
SpellCastResult CastSpell(SpellCastTargets const &targets, SpellInfo const *spellInfo, CustomSpellValues const *value, TriggerCastFlags triggerFlags=TRIGGERED_NONE, Item *castItem=nullptr, AuraEffect const *triggeredByAura=nullptr, ObjectGuid originalCaster=ObjectGuid::Empty)
Definition: Unit.cpp:1168
void StopMovingOnCurrentPos()
Definition: Unit.cpp:16645
void SetSpeed(UnitMoveType mtype, float rate, bool forced=false)
Definition: Unit.cpp:14383
void RemoveUnitMovementFlag(uint32 f)
Definition: Unit.h:1612
void SetUInt32Value(uint16 index, uint32 value)
Definition: Unit.cpp:21256
void LoadGrid(float x, float y)
Definition: Map.cpp:492
PlayerList const & GetPlayers() const
Definition: Map.h:486
Definition: MapRefMgr.h:26
iterator begin()
Definition: MapRefMgr.h:36
iterator end()
Definition: MapRefMgr.h:37
ObjectGuid NPC_FrostswornGeneralGUID
Definition: instance_halls_of_reflection.cpp:182
ObjectGuid NPC_QuelDelarGUID
Definition: instance_halls_of_reflection.cpp:157
ObjectGuid NPC_SpiritualReflectionGUID[5]
Definition: instance_halls_of_reflection.cpp:183
ObjectGuid NPC_ShipCaptainGUID
Definition: instance_halls_of_reflection.cpp:158
ObjectGuid NPC_AltarBunnyGUID
Definition: instance_halls_of_reflection.cpp:156
ObjectGuid NPC_LeaderIntroGUID
Definition: instance_halls_of_reflection.cpp:150

References Unit::AddAura(), Unit::AddUnitMovementFlag(), MapRefMgr::begin(), Unit::CastSpell(), DATA_FROSTSWORN_GENERAL, DATA_LICH_KING, DATA_LK_INTRO, DATA_MARWYN, EMOTE_ONESHOT_ATTACK1H, EMOTE_ONESHOT_ATTACK2HTIGHT, EncounterMask, MapRefMgr::end(), Object::GetEntry(), Object::GetGUID(), Unit::GetMaxHealth(), Map::GetPlayers(), Position::GetPositionX(), InstanceScript::instance, Unit::IsAlive(), LinkedListHead::IsEmpty(), LeaderEscapePos, Map::LoadGrid(), MOVE_RUN, MOVEMENTFLAG_WALKING, NPC_ALTAR_BUNNY, NPC_AltarBunnyGUID, NPC_ARCHMAGE_KORELN, NPC_DARK_RANGER_LORALEN, NPC_FALRIC, NPC_FalricGUID, NPC_FROSTSWORN_GENERAL, NPC_FrostswornGeneralGUID, NPC_GuardGUID, NPC_HIGH_CAPTAIN_JUSTIN_BARLETT, NPC_ICE_WALL_TARGET, NPC_IceWallTargetGUID, NPC_JAINA_PART1, NPC_JAINA_PART2, NPC_LeaderGUID, NPC_LeaderIntroGUID, NPC_LICH_KING_BOSS, NPC_LICH_KING_EVENT, NPC_LichKingGUID, NPC_LichKingIntroGUID, NPC_MARWYN, NPC_MarwynGUID, NPC_QUEL_DELAR, NPC_QuelDelarGUID, NPC_ShipCaptainGUID, NPC_SKY_REAVER_KORM_BLACKSKAR, NPC_SPIRITUAL_REFLECTION, NPC_SpiritualReflectionGUID, NPC_SYLVANAS_PART1, NPC_SYLVANAS_PART2, NPC_TrashGUID, NPC_UTHER, NPC_UtherGUID, NPC_WAVE_FOOTMAN, NPC_WAVE_MAGE, NPC_WAVE_MERCENARY, NPC_WAVE_PRIEST, NPC_WAVE_RIFLEMAN, NUM_OF_TRASH, PATH_WP_COUNT, PathWaypoints, REACT_PASSIVE, Unit::RemoveNpcFlag(), Unit::RemoveUnitMovementFlag(), Creature::Respawn(), Unit::SetHealth(), Unit::SetNpcFlag(), Creature::SetReactState(), Unit::SetSheath(), Unit::SetSpeed(), Unit::SetUInt32Value(), Unit::SetVisible(), Creature::SetWalk(), SHEATH_STATE_MELEE, SPELL_JAINA_ICE_BARRIER, SPELL_JAINA_ICE_PRISON, SPELL_SOUL_REAPER, SPELL_SYLVANAS_CLOAK_OF_DARKNESS, SPELL_SYLVANAS_DARK_BINDING, Unit::StopMovingOnCurrentPos(), TEAM_ALLIANCE, TEAM_NEUTRAL, TeamIdInInstance, TrashCounter, UNIT_NPC_EMOTESTATE, UNIT_NPC_FLAG_GOSSIP, UNIT_NPC_FLAG_QUESTGIVER, Creature::UpdateEntry(), and Unit::UpdatePosition().

◆ OnGameObjectCreate()

void instance_halls_of_reflection::instance_halls_of_reflection_InstanceMapScript::OnGameObjectCreate ( GameObject go)
inlineoverridevirtual

Reimplemented from InstanceScript.

374 {
375 switch (go->GetEntry())
376 {
377 case GO_FROSTMOURNE:
380 if (EncounterMask & (1 << DATA_INTRO))
381 go->SetPhaseMask(2, true);
382 break;
385 break;
386 case GO_FRONT_DOOR:
389 break;
390 case GO_ARTHAS_DOOR:
393 break;
394 case GO_CAVE_IN:
395 GO_CaveInGUID = go->GetGUID();
396 break;
399 break;
402 break;
403 case GO_ICE_WALL:
404 GO_IceWallGUID = go->GetGUID();
405 break;
406 }
407 }
@ GO_CAVE_IN
Definition: halls_of_reflection.h:90
@ GO_ICE_WALL
Definition: halls_of_reflection.h:93
@ GO_DOOR_BEFORE_THRONE
Definition: halls_of_reflection.h:91
@ GO_FROSTMOURNE_ALTAR
Definition: halls_of_reflection.h:87
@ GO_DOOR_AFTER_THRONE
Definition: halls_of_reflection.h:92
void SetPhaseMask(uint32 newPhaseMask, bool update) override
Definition: GameObject.cpp:2596
ObjectGuid GO_FrostmourneAltarGUID
Definition: instance_halls_of_reflection.cpp:160
ObjectGuid GO_DoorAfterThroneGUID
Definition: instance_halls_of_reflection.cpp:165
ObjectGuid GO_CaveInGUID
Definition: instance_halls_of_reflection.cpp:163
ObjectGuid GO_IceWallGUID
Definition: instance_halls_of_reflection.cpp:166
ObjectGuid GO_DoorBeforeThroneGUID
Definition: instance_halls_of_reflection.cpp:164

References DATA_INTRO, DATA_MARWYN, ObjectGuid::Empty, EncounterMask, Object::GetEntry(), Object::GetGUID(), GO_ARTHAS_DOOR, GO_ArthasDoorGUID, GO_CAVE_IN, GO_CaveInGUID, GO_DOOR_AFTER_THRONE, GO_DOOR_BEFORE_THRONE, GO_DoorAfterThroneGUID, GO_DoorBeforeThroneGUID, GO_FRONT_DOOR, GO_FrontDoorGUID, GO_FROSTMOURNE, GO_FROSTMOURNE_ALTAR, GO_FrostmourneAltarGUID, GO_FrostmourneGUID, GO_ICE_WALL, GO_IceWallGUID, InstanceScript::HandleGameObject(), and GameObject::SetPhaseMask().

◆ OnUnitDeath()

void instance_halls_of_reflection::instance_halls_of_reflection_InstanceMapScript::OnUnitDeath ( Unit unit)
inlineoverridevirtual

Reimplemented from ZoneScript.

733 {
735 if (unit->GetEntry() == NPC_WAVE_MERCENARY || unit->GetEntry() == NPC_WAVE_FOOTMAN || unit->GetEntry() == NPC_WAVE_RIFLEMAN || unit->GetEntry() == NPC_WAVE_PRIEST || unit->GetEntry() == NPC_WAVE_MAGE)
736 if ((--reqKillCount) == 0 && WaveNumber % 5 && NextWaveTimer > 5000)
737 NextWaveTimer = 5000;
738
739 if (unit->GetEntry() == NPC_QUEL_DELAR)
741 {
742 c->SetStandState(UNIT_STAND_STATE_STAND);
743 c->SetWalk(false);
744 c->GetMotionMaster()->MovePoint(0, 5313.92f, 1989.36f, 707.70f);
745 c->m_Events.AddEvent(new UtherBatteredHiltEvent(*c, 9), c->m_Events.CalculateTime(7000));
746 }
747 }
@ UNIT_STAND_STATE_STAND
Definition: UnitDefines.h:32
Definition: instance_halls_of_reflection.cpp:25

References Map::GetCreature(), Object::GetEntry(), InstanceScript::instance, NextWaveTimer, NPC_QUEL_DELAR, NPC_UtherGUID, NPC_WAVE_FOOTMAN, NPC_WAVE_MAGE, NPC_WAVE_MERCENARY, NPC_WAVE_PRIEST, NPC_WAVE_RIFLEMAN, reqKillCount, UNIT_STAND_STATE_STAND, and WaveNumber.

◆ RandomizeCompositionsAndShow()

void instance_halls_of_reflection::instance_halls_of_reflection_InstanceMapScript::RandomizeCompositionsAndShow ( )
inline
750 {
751 uint8 r1 = urand(0, 1), r2 = urand(2, 3);
752 for (uint8 i = 0; i < 5; ++i)
753 {
755 chosenComposition[1][i] = allowedCompositions[r1 == 0 ? 1 : 0][i];
757 chosenComposition[3][i] = allowedCompositions[r2 == 2 ? 3 : 2][i];
758 }
759 bool left[4] = {true, true, true, true};
760 for (uint8 k = 4; k > 0; --k)
761 {
762 uint8 r = urand(0, k - 1);
763 uint8 ur = 0;
764 for (uint8 j = 0; j < 4; ++j)
765 if (left[j])
766 {
767 if (ur == r)
768 {
769 left[j] = false;
770 for (uint8 i = 0; i < 5; ++i)
771 chosenComposition[8 - k][i] = allowedCompositions[j + 4][i];
772 break;
773 }
774 ++ur;
775 }
776 }
777 if (bFinished5Waves)
778 {
779 for (; WaveNumber < 4; ++WaveNumber)
780 {
781 uint8 num_to_activate;
782 if (WaveNumber <= 1)
783 num_to_activate = 3;
784 else
785 num_to_activate = 4;
786
787 for (uint8 i = 0; i < num_to_activate; ++i)
788 {
790 bool forward = !!urand(0, 1);
791 for (int8 j = (forward ? 0 : NUM_OF_TRASH - 1); (forward ? j<NUM_OF_TRASH : j >= 0); (forward ? ++j : --j))
792 if (!TrashActive[j])
794 if (c->GetEntry() == entry)
795 {
796 TrashActive[j] = true;
797 Unit::Kill(c, c);
798 break;
799 }
800 }
801 }
802 WaveNumber = 5;
803 }
804
805 for (uint8 i = 0; i < NUM_OF_TRASH; ++i)
806 if (!TrashActive[i])
808 {
809 c->SetVisible(true);
810 c->CastSpell(c, SPELL_WELL_OF_SOULS_VISUAL, false);
811 }
812 }
const uint32 allowedCompositions[8][5]
Definition: halls_of_reflection.h:302
@ SPELL_WELL_OF_SOULS_VISUAL
Definition: halls_of_reflection.h:262
static void Kill(Unit *killer, Unit *victim, bool durabilityLoss=true, WeaponAttackType attackType=BASE_ATTACK, SpellInfo const *spellProto=nullptr, Spell const *spell=nullptr)
Definition: Unit.cpp:17658

References allowedCompositions, bFinished5Waves, chosenComposition, Map::GetCreature(), InstanceScript::instance, Unit::Kill(), NPC_TrashGUID, NUM_OF_TRASH, SPELL_WELL_OF_SOULS_VISUAL, TrashActive, urand(), and WaveNumber.

Referenced by SetData().

◆ ReadSaveDataMore()

void instance_halls_of_reflection::instance_halls_of_reflection_InstanceMapScript::ReadSaveDataMore ( std::istringstream &  data)
inlineoverridevirtual

Reimplemented from InstanceScript.

722 {
723 data >> EncounterMask;
725 }
@ BHSF_NONE
Definition: halls_of_reflection.h:111
@ BHSF_FINISHED
Definition: halls_of_reflection.h:114

References BatteredHiltStatus, BHSF_FINISHED, BHSF_NONE, DATA_BATTERED_HILT, and EncounterMask.

◆ SetData()

void instance_halls_of_reflection::instance_halls_of_reflection_InstanceMapScript::SetData ( uint32  type,
uint32  data 
)
inlineoverridevirtual

Reimplemented from ZoneScript.

410 {
411 switch (type)
412 {
413 case DATA_INTRO:
414 EncounterMask |= (1 << DATA_INTRO);
415 AddWave1();
416 break;
419 break;
420 case DATA_FALRIC:
421 if (WaveNumber)
422 {
423 if (data == NOT_STARTED)
424 DoWipe1();
425 else if (data == DONE)
426 {
427 NextWaveTimer = 60000;
428 EncounterMask |= (1 << DATA_FALRIC);
429 }
430 }
431 break;
432 case DATA_MARWYN:
433 if (WaveNumber)
434 {
435 if (data == NOT_STARTED)
436 DoWipe1();
437 else if (data == DONE)
438 {
439 EncounterMask |= (1 << DATA_MARWYN);
443 {
444 c->SetVisible(true);
445 c->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_NONE);
446 c->SetReactState(REACT_AGGRESSIVE);
447 }
449 {
450 c->HandleEmoteCommand(EMOTE_ONESHOT_EMERGE);
451 }
452 WaveNumber = 0;
454
455 // give quest
456 Map::PlayerList const& pl = instance->GetPlayers();
457 for (Map::PlayerList::const_iterator itr = pl.begin(); itr != pl.end(); ++itr)
458 if (Player* p = itr->GetSource())
459 p->CastSpell(p, p->GetTeamId() == TEAM_ALLIANCE ? SPELL_HOR_START_QUEST_ALLY : SPELL_HOR_START_QUEST_HORDE, true);
460 }
461 }
462 break;
465 if (data == DONE)
466 {
468 c->SetVisible(true);
470 c->SetVisible(true);
471 }
472 break;
474 {
475 uint8 i = 0;
476 Map::PlayerList const& pl = instance->GetPlayers();
477 for (Map::PlayerList::const_iterator itr = pl.begin(); itr != pl.end(); ++itr)
478 if (Player* p = itr->GetSource())
479 if (p->IsAlive() && !p->IsGameMaster())
481 {
482 if (!c->IsAlive())
483 c->Respawn();
484 c->SetCanFly(true);
485 c->SetDisableGravity(true);
486 c->SetVisible(true);
487
488 Item* i;
489 i = p->GetWeaponForAttack(BASE_ATTACK);
491 i = p->GetWeaponForAttack(OFF_ATTACK);
493 i = p->GetWeaponForAttack(RANGED_ATTACK);
495 p->CastSpell(c, SPELL_HOR_CLONE, true);
496 p->CastSpell(c, SPELL_HOR_CLONE_NAME, true);
497 }
498 }
499 break;
502 for (uint8 i = 0; i < 5; ++i)
504 if (c->IsVisible())
505 {
506 c->SetInCombatWithZone();
507 c->SetCanFly(false);
508 c->SetDisableGravity(false);
509 c->GetMotionMaster()->MoveJump(fg->GetPositionX(), fg->GetPositionY(), fg->GetPositionZ(), 20.0f, 10.0f);
510 }
511 break;
513 for (uint8 i = 0; i < 5; ++i)
515 c->AI()->EnterEvadeMode();
516 break;
517 case DATA_LK_INTRO:
520 c->AI()->DoAction(ACTION_START_INTRO);
521 break;
523 IsDuringLKFight = true;
526 break;
528 if (!IsDuringLKFight)
529 {
530 break;
531 }
534 {
535 if (!c->IsAlive())
536 {
537 c->Respawn();
539 c->UpdateEntry(NPC_JAINA_PART2);
540 }
541 c->GetThreatMgr().ClearAllThreat();
542 c->CombatStop(true);
543 c->InterruptNonMeleeSpells(true);
544 c->GetMotionMaster()->Clear();
545 c->GetMotionMaster()->MoveIdle();
546 c->UpdatePosition(LeaderEscapePos, true);
547 c->StopMovingOnCurrentPos();
548 c->RemoveNpcFlag(UNIT_NPC_FLAG_QUESTGIVER);
549 c->SetNpcFlag(UNIT_NPC_FLAG_GOSSIP);
550 c->SetHealth(c->GetMaxHealth() / 20);
551 c->AI()->Reset();
552 c->setActive(false);
553 c->RemoveUnitMovementFlag(MOVEMENTFLAG_WALKING);
554 c->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_NONE);
555 }
557 {
558 c->GetThreatMgr().ClearAllThreat();
559 c->CombatStop(true);
560 c->InterruptNonMeleeSpells(true);
561 c->GetMotionMaster()->Clear();
562 c->GetMotionMaster()->MoveIdle();
563 c->UpdatePosition(c->GetHomePosition(), true);
564 c->StopMovingOnCurrentPos();
565 c->RemoveAllAuras();
567 c->AI()->Reset();
568 c->setActive(false);
569 c->RemoveUnitMovementFlag(MOVEMENTFLAG_WALKING);
570 c->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_NONE);
571 c->SetSpeed(MOVE_RUN, c->GetCreatureTemplate()->speed_run);
572 }
573 IsDuringLKFight = false;
574 outroTimer = 0;
575 outroStep = 0;
576 [[fallthrough]];
580 break;
581 case DATA_LICH_KING:
582 if (data == DONE)
583 {
584 instance->LoadGrid(PathWaypoints[0].GetPositionX(), PathWaypoints[0].GetPositionY());
587 c->setActive(false);
589 c->setActive(false);
590 IsDuringLKFight = false;
591 outroStep = 1;
592 outroTimer = 0;
593 }
594 break;
596 {
598 return;
599
600 switch (data)
601 {
602 case 1: // talked to leader
604 SaveToDB();
605 break;
606 case 2:
608 break;
611 c->CastSpell(c, 70720, true);
613 c->m_Events.AddEvent(new UtherBatteredHiltEvent(*c, 1), c->m_Events.CalculateTime(3000));
614 break;
615 case 3:
617 break;
620 {
621 c->m_Events.AddEvent(new UtherBatteredHiltEvent(*c, 3), c->m_Events.CalculateTime(5500));
622 }
623 break;
624 case 4:
626 {
627 c->RemoveUnitMovementFlag(MOVEMENTFLAG_WALKING);
628 c->SetSpeed(MOVE_RUN, 2.5f);
629 }
630 break;
631 case 5:
633 c->m_Events.AddEvent(new UtherBatteredHiltEvent(*c, 6), c->m_Events.CalculateTime(3000));
634 break;
635 case 6:
637 {
638 c->SetSpeed(MOVE_RUN, c->GetCreatureTemplate()->speed_run);
639 c->GetMotionMaster()->MoveLand(0, c->GetPositionX(), c->GetPositionY(), 707.70f, 7.0f);
640 }
641 break;
642 case 7:
644 {
645 c->SetReactState(REACT_AGGRESSIVE);
646 c->SetImmuneToAll(false);
647 c->RemoveAurasDueToSpell(70300);
648 }
649 break;
650 case 8:
652 c->SetInCombatWithZone();
653 break;
654 case 9:
657 SaveToDB();
658 break;
659 }
660 }
661 return;
662 }
663
664 if (data == DONE)
665 SaveToDB();
666 }
@ DONE
Definition: InstanceScript.h:60
@ NOT_STARTED
Definition: InstanceScript.h:57
@ REACT_AGGRESSIVE
Definition: Unit.h:550
@ OFF_ATTACK
Definition: Unit.h:210
@ BASE_ATTACK
Definition: Unit.h:209
@ RANGED_ATTACK
Definition: Unit.h:211
@ UNIT_VIRTUAL_ITEM_SLOT_ID
Definition: UpdateFields.h:116
@ BHSF_THROWN
Definition: halls_of_reflection.h:113
@ BHSF_STARTED
Definition: halls_of_reflection.h:112
@ SPELL_HOR_CLONE_NAME
Definition: halls_of_reflection.h:277
@ ACHIEV_RETREATING_TIMED_EVENT
Definition: halls_of_reflection.h:254
@ SPELL_HOR_CLONE
Definition: halls_of_reflection.h:276
@ SPELL_HOR_START_QUEST_HORDE
Definition: halls_of_reflection.h:259
@ SPELL_HOR_START_QUEST_ALLY
Definition: halls_of_reflection.h:258
@ ACTION_START_LK_FIGHT
Definition: halls_of_reflection.h:42
@ ACTION_SHOW_TRASH
Definition: halls_of_reflection.h:38
@ ACTION_SPIRITUAL_REFLECTIONS_HIDE
Definition: halls_of_reflection.h:41
@ ACTION_DELETE_ICE_WALL
Definition: halls_of_reflection.h:44
@ ACTION_STOP_LK_FIGHT
Definition: halls_of_reflection.h:43
@ ACTION_SPIRITUAL_REFLECTIONS_ACTIVATE
Definition: halls_of_reflection.h:40
@ ACTION_SPIRITUAL_REFLECTIONS_COPY
Definition: halls_of_reflection.h:39
@ ACTION_START_INTRO
Definition: boss_nightbane.cpp:57
@ EMOTE_ONESHOT_EMERGE
Definition: SharedDefines.h:2043
@ EMOTE_ONESHOT_NONE
Definition: SharedDefines.h:1894
@ ACHIEVEMENT_TIMED_TYPE_EVENT
Definition: DBCEnums.h:110
Definition: Item.h:220
void SetUInt32Value(uint16 index, uint32 value)
Definition: Object.cpp:650
void Clear()
Definition: ObjectGuid.h:138
float GetPositionY() const
Definition: Position.h:118
void SaveToDB()
Definition: InstanceScript.cpp:41
void DoStartTimedAchievement(AchievementCriteriaTimedTypes type, uint32 entry)
Definition: InstanceScript.cpp:621
void DoStopTimedAchievement(AchievementCriteriaTimedTypes type, uint32 entry)
Definition: InstanceScript.cpp:630
void DoWipe1()
Definition: instance_halls_of_reflection.cpp:884
void AddWave1()
Definition: instance_halls_of_reflection.cpp:814
void RandomizeCompositionsAndShow()
Definition: instance_halls_of_reflection.cpp:749

References ACHIEV_RETREATING_TIMED_EVENT, ACHIEVEMENT_TIMED_TYPE_EVENT, ACTION_DELETE_ICE_WALL, ACTION_SHOW_TRASH, ACTION_SPIRITUAL_REFLECTIONS_ACTIVATE, ACTION_SPIRITUAL_REFLECTIONS_COPY, ACTION_SPIRITUAL_REFLECTIONS_HIDE, ACTION_START_INTRO, ACTION_START_LK_FIGHT, ACTION_STOP_LK_FIGHT, AddWave1(), BASE_ATTACK, BatteredHiltStatus, MapRefMgr::begin(), BHSF_FINISHED, BHSF_STARTED, BHSF_THROWN, ObjectGuid::Clear(), DATA_BATTERED_HILT, DATA_FALRIC, DATA_FROSTSWORN_GENERAL, DATA_INTRO, DATA_LICH_KING, DATA_LK_INTRO, DATA_MARWYN, DONE, InstanceScript::DoStartTimedAchievement(), InstanceScript::DoStopTimedAchievement(), InstanceScript::DoUpdateWorldState(), DoWipe1(), EMOTE_ONESHOT_EMERGE, EMOTE_ONESHOT_NONE, EncounterMask, MapRefMgr::end(), Map::GetCreature(), Object::GetEntry(), Map::GetPlayers(), Position::GetPositionX(), Position::GetPositionY(), GO_ArthasDoorGUID, GO_FrontDoorGUID, GO_IceWallGUID, InstanceScript::HandleGameObject(), InstanceScript::instance, IsDuringLKFight, LeaderEscapePos, Map::LoadGrid(), MOVE_RUN, MOVEMENTFLAG_WALKING, NextWaveTimer, NOT_STARTED, NPC_AltarBunnyGUID, NPC_FrostswornGeneralGUID, NPC_JAINA_PART2, NPC_LeaderGUID, NPC_LichKingGUID, NPC_QuelDelarGUID, NPC_SpiritualReflectionGUID, NPC_UtherGUID, OFF_ATTACK, outroStep, outroTimer, PathWaypoints, RandomizeCompositionsAndShow(), RANGED_ATTACK, REACT_AGGRESSIVE, InstanceScript::SaveToDB(), Object::SetUInt32Value(), SPELL_HOR_CLONE, SPELL_HOR_CLONE_NAME, SPELL_HOR_START_QUEST_ALLY, SPELL_HOR_START_QUEST_HORDE, SPELL_JAINA_ICE_PRISON, SPELL_SYLVANAS_DARK_BINDING, TEAM_ALLIANCE, TeamIdInInstance, UNIT_NPC_EMOTESTATE, UNIT_NPC_FLAG_GOSSIP, UNIT_NPC_FLAG_QUESTGIVER, UNIT_VIRTUAL_ITEM_SLOT_ID, WaveNumber, and WORLD_STATE_HOR_COUNTER.

Referenced by Update().

◆ Update()

void instance_halls_of_reflection::instance_halls_of_reflection_InstanceMapScript::Update ( uint32  diff)
inlineoverridevirtual

Reimplemented from InstanceScript.

923 {
924 if (!instance->HavePlayers())
925 return;
926
927 if (CheckPlayersTimer <= diff)
928 {
929 CheckPlayersTimer = 5000;
930 if ((EncounterMask & (1 << DATA_INTRO)) && !(EncounterMask & (1 << DATA_MARWYN))) // first event
931 {
932 Map::PlayerList const& pl = instance->GetPlayers();
934 {
935 bool allDead = true;
936 bool outOfRange = false;
937 for (Map::PlayerList::const_iterator itr = pl.begin(); itr != pl.end(); ++itr)
938 if (Player* p = itr->GetSource())
939 {
940 if (p->IsGameMaster())
941 continue;
942 if (p->IsAlive())
943 allDead = false;
944 if (p->GetExactDist2d(&CenterPos) > MAX_DIST_FROM_CENTER_IN_COMBAT)
945 {
946 outOfRange = true;
947 break;
948 }
949 }
950 if (allDead || outOfRange)
951 DoWipe1();
952 }
953 else if (!ResumeFirstEventTimer)
954 {
955 bool allInRangeAndAlive = (instance->GetPlayersCountExceptGMs() > 0);
956 for (Map::PlayerList::const_iterator itr = pl.begin(); itr != pl.end(); ++itr)
957 if (Player* p = itr->GetSource())
958 if (!p->IsGameMaster() && (p->GetExactDist2d(&CenterPos) > MAX_DIST_FROM_CENTER_TO_START || !p->IsAlive()))
959 {
960 allInRangeAndAlive = false;
961 break;
962 }
963 if (allInRangeAndAlive)
964 {
967 }
968 }
969 }
970 }
971 else
972 CheckPlayersTimer -= diff;
973
974 if (NextWaveTimer)
975 {
976 if (NextWaveTimer <= diff)
977 {
978 NextWaveTimer = 0;
979 AddWave1();
980 }
981 else
982 NextWaveTimer -= diff;
983 }
984
986 {
987 if (ResumeFirstEventTimer <= diff)
988 {
989 switch (ResumeFirstEventStep) // After a wipe
990 {
991 case 0:
993 {
994 pFalric->UpdatePosition(5274.9f, 2039.2f, 709.319f, 5.4619f, true);
995 pFalric->StopMovingOnCurrentPos();
996 pFalric->SetVisible(true);
997 if (pFalric->IsAlive())
998 {
999 pFalric->GetMotionMaster()->MovePoint(0, FalricMovePos);
1000 if (Aura* a = pFalric->AddAura(SPELL_SHADOWMOURNE_VISUAL, pFalric))
1001 a->SetDuration(8000);
1002 }
1003 }
1005 {
1006 pMarwyn->UpdatePosition(5343.77f, 1973.86f, 709.319f, 2.35173f, true);
1007 pMarwyn->StopMovingOnCurrentPos();
1008 pMarwyn->SetVisible(true);
1009 if (pMarwyn->IsAlive())
1010 {
1011 pMarwyn->GetMotionMaster()->MovePoint(0, MarwynMovePos);
1012 if (Aura* a = pMarwyn->AddAura(SPELL_SHADOWMOURNE_VISUAL, pMarwyn))
1013 a->SetDuration(8000);
1014 }
1015 pMarwyn->AI()->Talk(EMOTE_MARWYN_INTRO_SPIRIT);
1016 }
1018 ResumeFirstEventTimer = 7500;
1019 break;
1020 case 1:
1022 {
1023 if (pFalric->IsAlive())
1024 {
1025 pFalric->AI()->Talk(SAY_FALRIC_INTRO_2); // Between wave 1 and 4
1026 }
1027 else
1028 {
1030 {
1031 marwyn->AI()->Talk(SAY_MARWYN_WIPE_AFTER_FALRIC); // Between wave 6 and 9
1032 }
1033 }
1034 }
1038 NextWaveTimer = 7000;
1039 break;
1040 default:
1041 for (uint8 i = 0; i < NUM_OF_TRASH; ++i)
1043 c->SetVisible(false);
1045 falric->SetVisible(false);
1047 marwyn->SetVisible(false);
1050 break;
1051 }
1052 }
1053 else
1054 ResumeFirstEventTimer -= diff;
1055 }
1056 if (outroStep)
1057 {
1058 if (outroTimer <= diff)
1059 {
1060 switch (outroStep)
1061 {
1062 case 1:
1064 {
1065 lk->UpdatePosition(PathWaypoints[PATH_WP_COUNT - 2], true);
1066 lk->StopMovingOnCurrentPos();
1067 lk->RemoveAllAuras();
1069 if (!lk->IsVisible())
1070 lk->SetVisible(true);
1072 {
1073 leader->UpdatePosition(PathWaypoints[PATH_WP_COUNT - 1], true);
1074 leader->StopMovingOnCurrentPos();
1075 leader->RemoveAllAuras();
1076 leader->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_READY1H);
1077 if (!leader->IsVisible())
1078 leader->SetVisible(true);
1079 lk->CastSpell(leader, SPELL_HARVEST_SOUL, false);
1080 }
1081 }
1082 ++outroStep;
1083 outroTimer = 500;
1084 break;
1085 case 2:
1086 {
1088 T1 = sTransportMgr->CreateTransport(entry, 0, instance);
1089
1090 ++outroStep;
1091 outroTimer = TeamIdInInstance == TEAM_ALLIANCE ? 10000 : 10500;
1092 }
1093 break;
1094 case 3:
1095 if (T1)
1096 T1->EnableMovement(false);
1100 {
1101 c->RemoveAllAuras();
1102 c->CastSpell(c, SPELL_GUNSHIP_CANNON_FIRE_PERIODIC, true);
1103 }
1105 {
1106 c->InterruptNonMeleeSpells(true);
1107 c->RemoveAllAuras();
1108 }
1109 ++outroStep;
1110 outroTimer = 5000;
1111 break;
1112 case 4:
1114 ++outroStep;
1115 outroTimer = 3000;
1116 break;
1117 case 5:
1119 c->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_NONE);
1121 {
1122 c->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_NONE);
1123 c->GetThreatMgr().ClearAllThreat();
1124 c->CombatStop(true);
1125 c->InterruptNonMeleeSpells(true);
1126 c->SetVisible(false);
1127 }
1128 if (instance->IsHeroic())
1131 c->CastSpell(c, SPELL_ACHIEVEMENT_CHECK, true);
1132 ++outroStep;
1133 outroTimer = 1000;
1134 break;
1135 case 6:
1136 if (T1)
1137 T1->EnableMovement(true);
1138 ++outroStep;
1139 outroTimer = 3500;
1140 break;
1141 case 7:
1142 if (T1)
1143 T1->EnableMovement(false);
1145 {
1146 uint8 index = TeamIdInInstance == TEAM_ALLIANCE ? 0 : 1;
1147 for (uint8 i = 0; i < 3; ++i)
1148 if (StairsPos[index][i].GetPositionX())
1149 if (GameObject* go = leader->SummonGameObject(TeamIdInInstance == TEAM_ALLIANCE ? GO_STAIRS_ALLIANCE : GO_STAIRS_HORDE, StairsPos[index][i].GetPositionX(), StairsPos[index][i].GetPositionY(), StairsPos[index][i].GetPositionZ(), StairsPos[index][i].GetOrientation(), 0.0f, 0.0f, 0.0f, 0.0f, 86400, false))
1150 go->SetGameObjectFlag(GO_FLAG_INTERACT_COND | GO_FLAG_NOT_SELECTABLE);
1151 //Position pos = TeamIdInInstance == TEAM_ALLIANCE ? AllyPortalPos : HordePortalPos;
1152 //leader->SummonGameObject(GO_PORTAL_TO_DALARAN, pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), pos.GetOrientation(), 0.0f, 0.0f, 0.0f, 0.0f, 86400);
1153 //pos = TeamIdInInstance == TEAM_ALLIANCE ? AllyChestPos : HordeChestPos;
1154 //leader->SummonGameObject(instance->GetSpawnMode() ? GO_CHEST_HEROIC : GO_CHEST_NORMAL, pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), pos.GetOrientation(), 0.0f, 0.0f, 0.0f, 0.0f, 86400);
1155 }
1156 ++outroStep;
1157 outroTimer = 1000;
1158 break;
1159 case 8:
1163 {
1164 c->AddUnitMovementFlag(MOVEMENTFLAG_WALKING);
1165 c->GetMotionMaster()->MovePoint(0, WalkCaveInPos);
1166 c->SetNpcFlag(UNIT_NPC_FLAG_GOSSIP); // need gossip ID 10931
1167 }
1168 ++outroStep;
1169 outroTimer = 6000;
1170 break;
1171 case 9:
1175 ++outroStep;
1176 outroTimer = 11000;
1177 break;
1178 case 10:
1179 ++outroStep;
1180 outroTimer = 0;
1182 if (Player* p = itr->GetSource())
1183 p->KilledMonsterCredit(NPC_WRATH_OF_THE_LICH_KING_CREDIT);
1186 {
1187 c->AI()->Talk(SAY_JAINA_FINAL_2);
1188 outroTimer = 10000;
1189 }
1190 break;
1191 case 11:
1193 c->SetNpcFlag(UNIT_NPC_FLAG_QUESTGIVER);
1194 ++outroStep;
1195 outroTimer = 300 * 1000;
1196 break;
1197 case 12:
1198 outroStep = 0;
1199 outroTimer = 0;
1200 if (T1)
1201 T1->setActive(false);
1202 break;
1203 }
1204 }
1205 else
1206 outroTimer -= diff;
1207 }
1208 }
#define sTransportMgr
Definition: TransportMgr.h:163
const Position FalricMovePos
Definition: halls_of_reflection.h:329
@ GO_THE_SKYBREAKER
Definition: halls_of_reflection.h:94
@ GO_ORGRIMS_HAMMER
Definition: halls_of_reflection.h:95
@ GO_STAIRS_HORDE
Definition: halls_of_reflection.h:97
@ GO_STAIRS_ALLIANCE
Definition: halls_of_reflection.h:96
@ NPC_WRATH_OF_THE_LICH_KING_CREDIT
Definition: halls_of_reflection.h:76
const Position MarwynMovePos
Definition: halls_of_reflection.h:330
#define MAX_DIST_FROM_CENTER_IN_COMBAT
Definition: halls_of_reflection.h:118
@ SPELL_GUNSHIP_CANNON_FIRE_PERIODIC
Definition: halls_of_reflection.h:295
@ SPELL_HARVEST_SOUL
Definition: halls_of_reflection.h:290
@ SPELL_SHADOWMOURNE_VISUAL
Definition: halls_of_reflection.h:260
const Position StairsPos[2][3]
Definition: halls_of_reflection.h:379
@ SAY_JAINA_FINAL_2
Definition: halls_of_reflection.h:218
@ SAY_ONBOARD_ALLY
Definition: halls_of_reflection.h:222
@ EMOTE_MARWYN_INTRO_SPIRIT
Definition: halls_of_reflection.h:236
@ SAY_FALRIC_INTRO_2
Definition: halls_of_reflection.h:169
@ SAY_JAINA_FINAL_1
Definition: halls_of_reflection.h:217
@ SAY_FIRE_HORDE
Definition: halls_of_reflection.h:206
@ SAY_MARWYN_WIPE_AFTER_FALRIC
Definition: halls_of_reflection.h:238
@ SAY_ONBOARD_HORDE
Definition: halls_of_reflection.h:207
@ SAY_FIRE_ALLY
Definition: halls_of_reflection.h:221
@ SAY_SYLVANA_FINAL
Definition: halls_of_reflection.h:203
#define MAX_DIST_FROM_CENTER_TO_START
Definition: halls_of_reflection.h:119
const Position WalkCaveInPos
Definition: halls_of_reflection.h:333
const Position CenterPos
Definition: halls_of_reflection.h:314
@ SPELL_ACHIEVEMENT_CHECK
Definition: boss_tharon_ja.cpp:51
@ EMOTE_ONESHOT_CUSTOM_SPELL_02
Definition: SharedDefines.h:1998
@ EMOTE_ONESHOT_READY1H
Definition: SharedDefines.h:1932
@ GO_FLAG_INTERACT_COND
Definition: SharedDefines.h:1605
@ GO_FLAG_NOT_SELECTABLE
Definition: SharedDefines.h:1607
Definition: GameObject.h:121
void setActive(bool isActiveObject)
Definition: Object.cpp:1085
GameObject * SummonGameObject(uint32 entry, float x, float y, float z, float ang, float rotation0, float rotation1, float rotation2, float rotation3, uint32 respawnTime, bool checkTransport=true, GOSummonType summonType=GO_SUMMON_TIMED_OR_CORPSE_DESPAWN)
Definition: Object.cpp:2369
float GetPositionZ() const
Definition: Position.h:119
float GetOrientation() const
Definition: Position.h:120
void EnableMovement(bool enabled)
Definition: Transport.cpp:455
uint32 GetPlayersCountExceptGMs() const
Definition: Map.cpp:2745
InstanceMap * ToInstanceMap()
Definition: Map.h:546
bool IsHeroic() const
Definition: Map.h:452
void PermBindAllPlayers()
Definition: Map.cpp:3152
Definition: SpellAuras.h:87
void SetData(uint32 type, uint32 data) override
Definition: instance_halls_of_reflection.cpp:409

References ACTION_SHOW_TRASH, AddWave1(), MapRefMgr::begin(), CenterPos, CheckPlayersTimer, DATA_INTRO, DATA_MARWYN, DoWipe1(), EMOTE_MARWYN_INTRO_SPIRIT, EMOTE_ONESHOT_CUSTOM_SPELL_02, EMOTE_ONESHOT_NONE, EMOTE_ONESHOT_READY1H, MotionTransport::EnableMovement(), EncounterMask, MapRefMgr::end(), FalricMovePos, Map::GetCreature(), Position::GetOrientation(), Map::GetPlayers(), Map::GetPlayersCountExceptGMs(), Position::GetPositionX(), Position::GetPositionY(), Position::GetPositionZ(), GO_CaveInGUID, GO_FLAG_INTERACT_COND, GO_FLAG_NOT_SELECTABLE, GO_ORGRIMS_HAMMER, GO_STAIRS_ALLIANCE, GO_STAIRS_HORDE, GO_THE_SKYBREAKER, InstanceScript::HandleGameObject(), Map::HavePlayers(), InstanceScript::instance, Map::IsHeroic(), MarwynMovePos, MAX_DIST_FROM_CENTER_IN_COMBAT, MAX_DIST_FROM_CENTER_TO_START, MOVEMENTFLAG_WALKING, NextWaveTimer, NPC_FalricGUID, NPC_LeaderGUID, NPC_LichKingGUID, NPC_MarwynGUID, NPC_ShipCaptainGUID, NPC_TrashGUID, NPC_WRATH_OF_THE_LICH_KING_CREDIT, NUM_OF_TRASH, outroStep, outroTimer, PATH_WP_COUNT, PathWaypoints, InstanceMap::PermBindAllPlayers(), ResumeFirstEventStep, ResumeFirstEventTimer, SAY_FALRIC_INTRO_2, SAY_FIRE_ALLY, SAY_FIRE_HORDE, SAY_JAINA_FINAL_1, SAY_JAINA_FINAL_2, SAY_MARWYN_WIPE_AFTER_FALRIC, SAY_ONBOARD_ALLY, SAY_ONBOARD_HORDE, SAY_SYLVANA_FINAL, WorldObject::setActive(), SetData(), SPELL_ACHIEVEMENT_CHECK, SPELL_GUNSHIP_CANNON_FIRE_PERIODIC, SPELL_HARVEST_SOUL, SPELL_SHADOWMOURNE_VISUAL, StairsPos, sTransportMgr, WorldObject::SummonGameObject(), T1, TEAM_ALLIANCE, TeamIdInInstance, Map::ToInstanceMap(), UNIT_NPC_EMOTESTATE, UNIT_NPC_FLAG_GOSSIP, UNIT_NPC_FLAG_QUESTGIVER, WalkCaveInPos, and WaveNumber.

◆ WriteSaveDataMore()

void instance_halls_of_reflection::instance_halls_of_reflection_InstanceMapScript::WriteSaveDataMore ( std::ostringstream &  data)
inlineoverridevirtual

Reimplemented from InstanceScript.

728 {
729 data << EncounterMask;
730 }

References EncounterMask.

Member Data Documentation

◆ BatteredHiltStatus

uint32 instance_halls_of_reflection::instance_halls_of_reflection_InstanceMapScript::BatteredHiltStatus

◆ bFinished5Waves

bool instance_halls_of_reflection::instance_halls_of_reflection_InstanceMapScript::bFinished5Waves

◆ CheckPlayersTimer

uint16 instance_halls_of_reflection::instance_halls_of_reflection_InstanceMapScript::CheckPlayersTimer

Referenced by Initialize(), and Update().

◆ chosenComposition

uint32 instance_halls_of_reflection::instance_halls_of_reflection_InstanceMapScript::chosenComposition[8][5]

◆ EncounterMask

uint32 instance_halls_of_reflection::instance_halls_of_reflection_InstanceMapScript::EncounterMask

◆ GO_ArthasDoorGUID

ObjectGuid instance_halls_of_reflection::instance_halls_of_reflection_InstanceMapScript::GO_ArthasDoorGUID

◆ GO_CaveInGUID

ObjectGuid instance_halls_of_reflection::instance_halls_of_reflection_InstanceMapScript::GO_CaveInGUID

Referenced by OnGameObjectCreate(), and Update().

◆ GO_DoorAfterThroneGUID

ObjectGuid instance_halls_of_reflection::instance_halls_of_reflection_InstanceMapScript::GO_DoorAfterThroneGUID

Referenced by OnGameObjectCreate().

◆ GO_DoorBeforeThroneGUID

ObjectGuid instance_halls_of_reflection::instance_halls_of_reflection_InstanceMapScript::GO_DoorBeforeThroneGUID

Referenced by OnGameObjectCreate().

◆ GO_FrontDoorGUID

ObjectGuid instance_halls_of_reflection::instance_halls_of_reflection_InstanceMapScript::GO_FrontDoorGUID

◆ GO_FrostmourneAltarGUID

ObjectGuid instance_halls_of_reflection::instance_halls_of_reflection_InstanceMapScript::GO_FrostmourneAltarGUID

Referenced by OnGameObjectCreate().

◆ GO_FrostmourneGUID

ObjectGuid instance_halls_of_reflection::instance_halls_of_reflection_InstanceMapScript::GO_FrostmourneGUID

Referenced by GetGuidData(), and OnGameObjectCreate().

◆ GO_IceWallGUID

ObjectGuid instance_halls_of_reflection::instance_halls_of_reflection_InstanceMapScript::GO_IceWallGUID

Referenced by OnGameObjectCreate(), and SetData().

◆ IsDuringLKFight

bool instance_halls_of_reflection::instance_halls_of_reflection_InstanceMapScript::IsDuringLKFight

◆ NextWaveTimer

uint32 instance_halls_of_reflection::instance_halls_of_reflection_InstanceMapScript::NextWaveTimer

◆ NPC_AltarBunnyGUID

ObjectGuid instance_halls_of_reflection::instance_halls_of_reflection_InstanceMapScript::NPC_AltarBunnyGUID

Referenced by OnCreatureCreate(), and SetData().

◆ NPC_FalricGUID

ObjectGuid instance_halls_of_reflection::instance_halls_of_reflection_InstanceMapScript::NPC_FalricGUID

◆ NPC_FrostswornGeneralGUID

ObjectGuid instance_halls_of_reflection::instance_halls_of_reflection_InstanceMapScript::NPC_FrostswornGeneralGUID

Referenced by OnCreatureCreate(), and SetData().

◆ NPC_GuardGUID

ObjectGuid instance_halls_of_reflection::instance_halls_of_reflection_InstanceMapScript::NPC_GuardGUID

Referenced by GetGuidData(), and OnCreatureCreate().

◆ NPC_IceWallTargetGUID

ObjectGuid instance_halls_of_reflection::instance_halls_of_reflection_InstanceMapScript::NPC_IceWallTargetGUID[4]

Referenced by GetGuidData(), and OnCreatureCreate().

◆ NPC_LeaderGUID

ObjectGuid instance_halls_of_reflection::instance_halls_of_reflection_InstanceMapScript::NPC_LeaderGUID

◆ NPC_LeaderIntroGUID

ObjectGuid instance_halls_of_reflection::instance_halls_of_reflection_InstanceMapScript::NPC_LeaderIntroGUID

Referenced by OnCreatureCreate().

◆ NPC_LichKingGUID

ObjectGuid instance_halls_of_reflection::instance_halls_of_reflection_InstanceMapScript::NPC_LichKingGUID

◆ NPC_LichKingIntroGUID

ObjectGuid instance_halls_of_reflection::instance_halls_of_reflection_InstanceMapScript::NPC_LichKingIntroGUID

Referenced by GetGuidData(), and OnCreatureCreate().

◆ NPC_MarwynGUID

ObjectGuid instance_halls_of_reflection::instance_halls_of_reflection_InstanceMapScript::NPC_MarwynGUID

◆ NPC_QuelDelarGUID

ObjectGuid instance_halls_of_reflection::instance_halls_of_reflection_InstanceMapScript::NPC_QuelDelarGUID

Referenced by OnCreatureCreate(), and SetData().

◆ NPC_ShipCaptainGUID

ObjectGuid instance_halls_of_reflection::instance_halls_of_reflection_InstanceMapScript::NPC_ShipCaptainGUID

Referenced by OnCreatureCreate(), and Update().

◆ NPC_SpiritualReflectionGUID

ObjectGuid instance_halls_of_reflection::instance_halls_of_reflection_InstanceMapScript::NPC_SpiritualReflectionGUID[5]

Referenced by OnCreatureCreate(), and SetData().

◆ NPC_TrashGUID

ObjectGuid instance_halls_of_reflection::instance_halls_of_reflection_InstanceMapScript::NPC_TrashGUID[NUM_OF_TRASH]

◆ NPC_UtherGUID

ObjectGuid instance_halls_of_reflection::instance_halls_of_reflection_InstanceMapScript::NPC_UtherGUID

◆ outroStep

uint8 instance_halls_of_reflection::instance_halls_of_reflection_InstanceMapScript::outroStep

Referenced by Initialize(), SetData(), and Update().

◆ outroTimer

uint32 instance_halls_of_reflection::instance_halls_of_reflection_InstanceMapScript::outroTimer

Referenced by Initialize(), SetData(), and Update().

◆ reqKillCount

uint8 instance_halls_of_reflection::instance_halls_of_reflection_InstanceMapScript::reqKillCount

◆ ResumeFirstEventStep

uint8 instance_halls_of_reflection::instance_halls_of_reflection_InstanceMapScript::ResumeFirstEventStep

Referenced by DoWipe1(), Initialize(), and Update().

◆ ResumeFirstEventTimer

uint16 instance_halls_of_reflection::instance_halls_of_reflection_InstanceMapScript::ResumeFirstEventTimer

Referenced by DoWipe1(), Initialize(), and Update().

◆ T1

MotionTransport* instance_halls_of_reflection::instance_halls_of_reflection_InstanceMapScript::T1

Referenced by Initialize(), and Update().

◆ TeamIdInInstance

TeamId instance_halls_of_reflection::instance_halls_of_reflection_InstanceMapScript::TeamIdInInstance

◆ TrashActive

bool instance_halls_of_reflection::instance_halls_of_reflection_InstanceMapScript::TrashActive[NUM_OF_TRASH]

◆ TrashCounter

uint8 instance_halls_of_reflection::instance_halls_of_reflection_InstanceMapScript::TrashCounter

◆ WaveNumber

uint8 instance_halls_of_reflection::instance_halls_of_reflection_InstanceMapScript::WaveNumber