AzeorthCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
instance_ulduar::instance_ulduar_InstanceMapScript Struct Reference
Inheritance diagram for instance_ulduar::instance_ulduar_InstanceMapScript:
InstanceScript ZoneScript

Public Member Functions

 instance_ulduar_InstanceMapScript (Map *pMap)
 
void Initialize () override
 
void FillInitialWorldStates (WorldPacket &packet) override
 
void OnPlayerEnter (Player *player) override
 
bool IsEncounterInProgress () const override
 
void ProcessEvent (WorldObject *, uint32 eventId) override
 
void SpawnHodirChests (Difficulty diff, Creature *hodir)
 
void OnCreatureCreate (Creature *creature) override
 
void OnCreatureRemove (Creature *creature) override
 
void OpenIfDone (uint32 encounter, GameObject *go, GOState state)
 
void ShowKeeperGossip (uint8 type, Creature *cr, ObjectGuid guid=ObjectGuid::Empty)
 
void OnGameObjectCreate (GameObject *gameObject) override
 
void setChestsLootable (uint32 boss)
 
void SetData (uint32 type, uint32 data) override
 
ObjectGuid GetGuidData (uint32 data) const override
 
uint32 GetData (uint32 type) const override
 
void OnUnitDeath (Unit *unit) override
 
std::string GetSaveData () override
 
void Load (const char *strIn) override
 
void Update (uint32 diff) override
 
void SpawnLeviathanEncounterVehicles (uint8 mode)
 
bool CheckAchievementCriteriaMeet (uint32 criteria_id, Player const *, Unit const *, uint32) 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)
 
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)
 
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
 
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)
 
- 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]
 
uint32 C_of_Ulduar_MASK
 
int m_difficulty
 
ObjectGuid m_uiLeviathanGUID
 
ObjectGuid m_uiIgnisGUID
 
ObjectGuid m_uiRazorscaleGUID
 
ObjectGuid m_uiXT002GUID
 
ObjectGuid m_auiAssemblyGUIDs [3]
 
ObjectGuid m_uiKologarnGUID
 
ObjectGuid m_uiAuriayaGUID
 
ObjectGuid m_uiMimironGUID
 
ObjectGuid m_uiHodirGUID
 
ObjectGuid m_uiThorimGUID
 
ObjectGuid m_uiFreyaGUID
 
ObjectGuid m_uiVezaxGUID
 
ObjectGuid m_uiYoggSaronGUID
 
ObjectGuid m_uiAlgalonGUID
 
ObjectGuid m_leviathanDoorsGUID
 
ObjectGuid m_leviathanVisualTowers [4][2]
 
ObjectGuid m_RepairSGUID [2]
 
ObjectGuid m_lightningWalls [2]
 
bool m_leviathanTowers [4]
 
GuidList _leviathanVehicles
 
uint32 m_unbrokenAchievement
 
uint32 m_mageBarrier
 
ObjectGuid m_RazorscaleHarpoonFireStateGUID [4]
 
ObjectGuid m_xt002DoorsGUID
 
ObjectGuid KologarnDoorGUID
 
ObjectGuid m_assemblyDoorsGUID
 
ObjectGuid m_archivumDoorsGUID
 
ObjectGuid m_thorimGameobjectsGUID [5]
 
bool hmHodir
 
ObjectGuid m_hodirNormalChest
 
ObjectGuid m_hodirHardmodeChest
 
Position normalChestPosition = { 1967.152588f, -204.188461f, 432.686951f, 5.50957f }
 
Position hardChestPosition = { 2035.94600f, -202.084885f, 432.686859f, 3.164077f }
 
ObjectGuid m_MimironDoor [3]
 
ObjectGuid m_MimironLeviathanMKIIguid
 
ObjectGuid m_MimironVX001guid
 
ObjectGuid m_MimironACUguid
 
ObjectGuid m_FreyaElder [3]
 
uint32 m_conspeedatoryAttempt
 
ObjectGuid m_saraGUID
 
ObjectGuid m_yoggsaronBrainGUID
 
ObjectGuid m_yoggsaronDoorsGUID
 
ObjectGuid m_algalonSigilDoorGUID [3]
 
ObjectGuid m_algalonFloorGUID [2]
 
ObjectGuid m_algalonUniverseGUID
 
ObjectGuid m_algalonTrapdoorGUID
 
ObjectGuid m_brannBronzebeardAlgGUID
 
ObjectGuid m_brannBronzebeardBaseCamp
 
uint32 m_algalonTimer
 
EventMap _events
 
bool m_mimironTramUsed
 
ObjectGuid m_mimironTramGUID
 
ObjectGuid m_keepersgateGUID
 
ObjectGuid m_keepersGossipGUID [4]
 
- Public Attributes inherited from InstanceScript
Mapinstance
 

Additional Inherited Members

- Static Public Member Functions inherited from InstanceScript
static std::string GetBossStateName (uint8 state)
 
- Protected Member Functions inherited from InstanceScript
void SetBossNumber (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)
 
void AddObject (GameObject *obj, bool add)
 
void AddObject (WorldObject *obj, uint32 type, bool add)
 
void AddDoor (GameObject *door, bool add)
 
void AddMinion (Creature *minion, bool add)
 
void UpdateDoorState (GameObject *door)
 
void UpdateMinionState (Creature *minion, EncounterState state)
 
std::string LoadBossState (char const *data)
 
std::string GetBossSaveData ()
 

Detailed Description

Constructor & Destructor Documentation

◆ instance_ulduar_InstanceMapScript()

instance_ulduar::instance_ulduar_InstanceMapScript::instance_ulduar_InstanceMapScript ( Map pMap)
inline
40 : InstanceScript(pMap)
41 {
42 Initialize();
43 // 0: 10 man difficulty
44 // 1: 25 man difficulty
45 m_difficulty = (pMap->Is25ManRaid() ? 0 : 1);
46 };
Definition: InstanceScript.h:140
bool Is25ManRaid() const
Definition: Map.h:452
void Initialize() override
Definition: instance_ulduar.cpp:133
int m_difficulty
Definition: instance_ulduar.cpp:51

References Initialize(), Map::Is25ManRaid(), and m_difficulty.

Member Function Documentation

◆ CheckAchievementCriteriaMeet()

bool instance_ulduar::instance_ulduar_InstanceMapScript::CheckAchievementCriteriaMeet ( uint32  criteria_id,
Player const *  ,
Unit const *  ,
uint32   
)
inlineoverridevirtual

Reimplemented from InstanceScript.

1155 {
1156 switch (criteria_id)
1157 {
1158 case 10042:
1159 case 10352:
1160 return (C_of_Ulduar_MASK & (1 << TYPE_LEVIATHAN)) == 0;
1161 case 10342:
1162 case 10355:
1163 return (C_of_Ulduar_MASK & (1 << TYPE_IGNIS)) == 0;
1164 case 10340:
1165 case 10353:
1166 return (C_of_Ulduar_MASK & (1 << TYPE_RAZORSCALE)) == 0;
1167 case 10341:
1168 case 10354:
1169 return (C_of_Ulduar_MASK & (1 << TYPE_XT002)) == 0;
1170 case 10598:
1171 case 10599:
1172 return (C_of_Ulduar_MASK & (1 << TYPE_ASSEMBLY)) == 0;
1173 case 10348:
1174 case 10357:
1175 return (C_of_Ulduar_MASK & (1 << TYPE_KOLOGARN)) == 0;
1176 case 10351:
1177 case 10363:
1178 return (C_of_Ulduar_MASK & (1 << TYPE_AURIAYA)) == 0;
1179 case 10439:
1180 case 10719:
1181 return (C_of_Ulduar_MASK & (1 << TYPE_HODIR)) == 0;
1182 case 10403:
1183 case 10404:
1184 return (C_of_Ulduar_MASK & (1 << TYPE_THORIM)) == 0;
1185 case 10582:
1186 case 10583:
1187 return (C_of_Ulduar_MASK & (1 << TYPE_FREYA)) == 0;
1188 case 10347:
1189 case 10361:
1190 return (C_of_Ulduar_MASK & (1 << TYPE_MIMIRON)) == 0;
1191 case 10349:
1192 case 10362:
1193 return (C_of_Ulduar_MASK & (1 << TYPE_VEZAX)) == 0;
1194 case 10350:
1195 case 10364:
1196 return (C_of_Ulduar_MASK & (1 << TYPE_YOGGSARON)) == 0;
1197 }
1198 return false;
1199 }
@ TYPE_IGNIS
Definition: ulduar.h:34
@ TYPE_VEZAX
Definition: ulduar.h:44
@ TYPE_XT002
Definition: ulduar.h:36
@ TYPE_HODIR
Definition: ulduar.h:41
@ TYPE_ASSEMBLY
Definition: ulduar.h:37
@ TYPE_KOLOGARN
Definition: ulduar.h:38
@ TYPE_AURIAYA
Definition: ulduar.h:39
@ TYPE_RAZORSCALE
Definition: ulduar.h:35
@ TYPE_FREYA
Definition: ulduar.h:40
@ TYPE_LEVIATHAN
Definition: ulduar.h:33
@ TYPE_MIMIRON
Definition: ulduar.h:42
@ TYPE_THORIM
Definition: ulduar.h:43
@ TYPE_YOGGSARON
Definition: ulduar.h:45
uint32 C_of_Ulduar_MASK
Definition: instance_ulduar.cpp:49

References C_of_Ulduar_MASK, TYPE_ASSEMBLY, TYPE_AURIAYA, TYPE_FREYA, TYPE_HODIR, TYPE_IGNIS, TYPE_KOLOGARN, TYPE_LEVIATHAN, TYPE_MIMIRON, TYPE_RAZORSCALE, TYPE_THORIM, TYPE_VEZAX, TYPE_XT002, and TYPE_YOGGSARON.

◆ FillInitialWorldStates()

void instance_ulduar::instance_ulduar_InstanceMapScript::FillInitialWorldStates ( WorldPacket packet)
inlineoverridevirtual

Reimplemented from InstanceScript.

162 {
164 packet << uint32(WORLD_STATE_ALGALON_DESPAWN_TIMER) << uint32(std::min<uint32>(m_algalonTimer, 60));
165 }
std::uint32_t uint32
Definition: Define.h:108
@ WORLD_STATE_ALGALON_TIMER_ENABLED
Definition: ulduar.h:274
uint32 m_algalonTimer
Definition: instance_ulduar.cpp:124

References m_algalonTimer, and WORLD_STATE_ALGALON_TIMER_ENABLED.

◆ GetData()

uint32 instance_ulduar::instance_ulduar_InstanceMapScript::GetData ( uint32  type) const
inlineoverridevirtual

Reimplemented from ZoneScript.

979 {
980 switch(type)
981 {
982 case TYPE_LEVIATHAN:
983 case TYPE_IGNIS:
984 case TYPE_RAZORSCALE:
985 case TYPE_XT002:
986 case TYPE_ASSEMBLY:
987 case TYPE_KOLOGARN:
988 case TYPE_AURIAYA:
989 case TYPE_MIMIRON:
990 case TYPE_HODIR:
991 case TYPE_THORIM:
992 case TYPE_FREYA:
993 case TYPE_VEZAX:
994 case TYPE_YOGGSARON:
995 case TYPE_ALGALON:
996 case TYPE_WATCHERS:
997 return m_auiEncounter[type];
998
1004
1005 case DATA_MAGE_BARRIER:
1006 return m_mageBarrier;
1007
1009 return m_unbrokenAchievement;
1010
1011 case DATA_CALL_TRAM:
1012 return m_mimironTramUsed;
1013 }
1014
1015 return 0;
1016 }
@ EVENT_TOWER_OF_STORM_DESTROYED
Definition: ulduar.h:261
@ EVENT_TOWER_OF_LIFE_DESTROYED
Definition: ulduar.h:264
@ EVENT_TOWER_OF_FLAMES_DESTROYED
Definition: ulduar.h:263
@ EVENT_TOWER_OF_FROST_DESTROYED
Definition: ulduar.h:262
@ DATA_MAGE_BARRIER
Definition: ulduar.h:102
@ DATA_UNBROKEN_ACHIEVEMENT
Definition: ulduar.h:60
@ DATA_CALL_TRAM
Definition: ulduar.h:99
@ TYPE_WATCHERS
Definition: ulduar.h:47
@ TYPE_ALGALON
Definition: ulduar.h:46
bool m_leviathanTowers[4]
Definition: instance_ulduar.cpp:74
bool m_mimironTramUsed
Definition: instance_ulduar.cpp:128
uint32 m_mageBarrier
Definition: instance_ulduar.cpp:77
uint32 m_auiEncounter[MAX_ENCOUNTER]
Definition: instance_ulduar.cpp:48
uint32 m_unbrokenAchievement
Definition: instance_ulduar.cpp:76

References DATA_CALL_TRAM, DATA_MAGE_BARRIER, DATA_UNBROKEN_ACHIEVEMENT, EVENT_TOWER_OF_FLAMES_DESTROYED, EVENT_TOWER_OF_FROST_DESTROYED, EVENT_TOWER_OF_LIFE_DESTROYED, EVENT_TOWER_OF_STORM_DESTROYED, m_auiEncounter, m_leviathanTowers, m_mageBarrier, m_mimironTramUsed, m_unbrokenAchievement, TYPE_ALGALON, TYPE_ASSEMBLY, TYPE_AURIAYA, TYPE_FREYA, TYPE_HODIR, TYPE_IGNIS, TYPE_KOLOGARN, TYPE_LEVIATHAN, TYPE_MIMIRON, TYPE_RAZORSCALE, TYPE_THORIM, TYPE_VEZAX, TYPE_WATCHERS, TYPE_XT002, and TYPE_YOGGSARON.

Referenced by Load(), OnCreatureCreate(), OnGameObjectCreate(), OnUnitDeath(), OpenIfDone(), SetData(), and ShowKeeperGossip().

◆ GetGuidData()

ObjectGuid instance_ulduar::instance_ulduar_InstanceMapScript::GetGuidData ( uint32  data) const
inlineoverridevirtual

Reimplemented from InstanceScript.

854 {
855 switch (data)
856 {
857 // Bosses
858 case TYPE_LEVIATHAN:
859 return m_uiLeviathanGUID;
860 case TYPE_IGNIS:
861 return m_uiIgnisGUID;
862 case TYPE_RAZORSCALE:
863 return m_uiRazorscaleGUID;
864 case TYPE_XT002:
865 return m_uiXT002GUID;
866 case TYPE_KOLOGARN:
867 return m_uiKologarnGUID;
868 case TYPE_AURIAYA:
869 return m_uiAuriayaGUID;
870 case TYPE_MIMIRON:
871 return m_uiMimironGUID;
872 case TYPE_HODIR:
873 return m_uiHodirGUID;
874 case TYPE_THORIM:
875 return m_uiThorimGUID;
876 case TYPE_FREYA:
877 return m_uiFreyaGUID;
878 case TYPE_VEZAX:
879 return m_uiVezaxGUID;
880 case TYPE_YOGGSARON:
881 return m_uiYoggSaronGUID;
882 case TYPE_ALGALON:
883 return m_uiAlgalonGUID;
885 return m_auiAssemblyGUIDs[0];
886 case DATA_MOLGEIM:
887 return m_auiAssemblyGUIDs[1];
888 case DATA_BRUNDIR:
889 return m_auiAssemblyGUIDs[2];
890
891 // Flame Leviathan
893 return m_RepairSGUID[0];
895 return m_RepairSGUID[1];
897 return m_lightningWalls[0];
899 return m_lightningWalls[1];
902
903 // Razorscales Harpoon Fire State GUIDs
908 return m_RazorscaleHarpoonFireStateGUID[data - 200];
909
910 // XT-002
911 case GO_XT002_DOORS:
912 return m_xt002DoorsGUID;
913 // XT-002
915 return KologarnDoorGUID;
916 // Thorim
923
924 // Hodir chests
928 return m_hodirNormalChest;
929
930 // Freya Elders
934 return m_FreyaElder[data - NPC_ELDER_IRONBRANCH];
935
936 // Mimiron's first vehicle (spawned by default)
940 return m_MimironVX001guid;
941 case DATA_MIMIRON_ACU:
942 return m_MimironACUguid;
946 return m_MimironDoor[data - 311];
947
948 // Yogg-Saron
951 case NPC_SARA:
952 return m_saraGUID;
955
956 // Algalon the Observer
958 return m_algalonSigilDoorGUID[0];
960 return m_algalonSigilDoorGUID[1];
962 return m_algalonSigilDoorGUID[2];
964 return m_algalonFloorGUID[0];
966 return m_algalonFloorGUID[1];
973 }
974
975 return ObjectGuid::Empty;
976 }
@ DATA_MIMIRON_VX001
Definition: ulduar.h:70
@ DATA_THORIM_FIRST_DOORS
Definition: ulduar.h:82
@ DATA_MOLGEIM
Definition: ulduar.h:87
@ DATA_THORIM_LEVER
Definition: ulduar.h:80
@ DATA_LIGHTNING_WALL2
Definition: ulduar.h:57
@ DATA_BRUNDIR
Definition: ulduar.h:88
@ DATA_HARPOON_FIRE_STATE_1
Definition: ulduar.h:63
@ DATA_HARPOON_FIRE_STATE_2
Definition: ulduar.h:64
@ DATA_GO_MIMIRON_DOOR_1
Definition: ulduar.h:74
@ DATA_THORIM_FENCE
Definition: ulduar.h:81
@ DATA_REPAIR_STATION1
Definition: ulduar.h:58
@ DATA_THORIM_SECOND_DOORS
Definition: ulduar.h:83
@ DATA_STEELBREAKER
Definition: ulduar.h:86
@ DATA_HARPOON_FIRE_STATE_3
Definition: ulduar.h:65
@ DATA_LIGHTNING_WALL1
Definition: ulduar.h:56
@ DATA_GO_MIMIRON_DOOR_2
Definition: ulduar.h:75
@ DATA_GO_MIMIRON_DOOR_3
Definition: ulduar.h:76
@ DATA_MIMIRON_LEVIATHAN_MKII
Definition: ulduar.h:69
@ DATA_HARPOON_FIRE_STATE_4
Definition: ulduar.h:66
@ DATA_MIMIRON_ACU
Definition: ulduar.h:71
@ DATA_THORIM_LEVER_GATE
Definition: ulduar.h:79
@ DATA_REPAIR_STATION2
Definition: ulduar.h:59
@ GO_DOODAD_UL_SIGILDOOR_03
Definition: ulduar.h:245
@ GO_DOODAD_UL_UNIVERSEGLOBE01
Definition: ulduar.h:248
@ GO_YOGG_SARON_DOORS
Definition: ulduar.h:238
@ GO_DOODAD_UL_SIGILDOOR_01
Definition: ulduar.h:243
@ GO_LEVIATHAN_DOORS
Definition: ulduar.h:196
@ GO_HODIR_CHEST_NORMAL
Definition: ulduar.h:181
@ GO_DOODAD_UL_SIGILDOOR_02
Definition: ulduar.h:244
@ GO_KOLOGARN_DOORS
Definition: ulduar.h:213
@ GO_DOODAD_UL_ULDUAR_TRAPDOOR_03
Definition: ulduar.h:249
@ GO_XT002_DOORS
Definition: ulduar.h:215
@ GO_DOODAD_UL_UNIVERSEFLOOR_01
Definition: ulduar.h:246
@ GO_HODIR_CHEST_HARD
Definition: ulduar.h:183
@ GO_DOODAD_UL_UNIVERSEFLOOR_02
Definition: ulduar.h:247
@ NPC_ELDER_BRIGHTLEAF
Definition: ulduar.h:138
@ NPC_BRAIN_OF_YOGG_SARON
Definition: ulduar.h:126
@ NPC_SARA
Definition: ulduar.h:124
@ NPC_ELDER_IRONBRANCH
Definition: ulduar.h:140
@ NPC_ELDER_STONEBARK
Definition: ulduar.h:139
@ NPC_BRANN_BRONZBEARD_ALG
Definition: ulduar.h:161
static ObjectGuid const Empty
Definition: ObjectGuid.h:122
ObjectGuid m_MimironDoor[3]
Definition: instance_ulduar.cpp:103
ObjectGuid m_uiFreyaGUID
Definition: instance_ulduar.cpp:64
ObjectGuid m_lightningWalls[2]
Definition: instance_ulduar.cpp:73
ObjectGuid m_uiAlgalonGUID
Definition: instance_ulduar.cpp:67
ObjectGuid m_uiMimironGUID
Definition: instance_ulduar.cpp:61
ObjectGuid m_yoggsaronDoorsGUID
Definition: instance_ulduar.cpp:115
ObjectGuid m_algalonFloorGUID[2]
Definition: instance_ulduar.cpp:119
ObjectGuid m_algalonTrapdoorGUID
Definition: instance_ulduar.cpp:121
ObjectGuid m_saraGUID
Definition: instance_ulduar.cpp:113
ObjectGuid m_brannBronzebeardAlgGUID
Definition: instance_ulduar.cpp:122
ObjectGuid m_RazorscaleHarpoonFireStateGUID[4]
Definition: instance_ulduar.cpp:80
ObjectGuid m_FreyaElder[3]
Definition: instance_ulduar.cpp:109
ObjectGuid m_xt002DoorsGUID
Definition: instance_ulduar.cpp:83
ObjectGuid m_MimironLeviathanMKIIguid
Definition: instance_ulduar.cpp:104
ObjectGuid m_uiIgnisGUID
Definition: instance_ulduar.cpp:55
ObjectGuid m_RepairSGUID[2]
Definition: instance_ulduar.cpp:72
ObjectGuid m_uiKologarnGUID
Definition: instance_ulduar.cpp:59
ObjectGuid m_uiVezaxGUID
Definition: instance_ulduar.cpp:65
ObjectGuid m_uiYoggSaronGUID
Definition: instance_ulduar.cpp:66
ObjectGuid m_algalonSigilDoorGUID[3]
Definition: instance_ulduar.cpp:118
ObjectGuid m_yoggsaronBrainGUID
Definition: instance_ulduar.cpp:114
ObjectGuid m_uiThorimGUID
Definition: instance_ulduar.cpp:63
ObjectGuid m_hodirNormalChest
Definition: instance_ulduar.cpp:97
ObjectGuid m_MimironACUguid
Definition: instance_ulduar.cpp:106
ObjectGuid m_MimironVX001guid
Definition: instance_ulduar.cpp:105
ObjectGuid m_auiAssemblyGUIDs[3]
Definition: instance_ulduar.cpp:58
ObjectGuid m_uiLeviathanGUID
Definition: instance_ulduar.cpp:54
ObjectGuid KologarnDoorGUID
Definition: instance_ulduar.cpp:86
ObjectGuid m_uiHodirGUID
Definition: instance_ulduar.cpp:62
ObjectGuid m_uiAuriayaGUID
Definition: instance_ulduar.cpp:60
ObjectGuid m_leviathanDoorsGUID
Definition: instance_ulduar.cpp:70
ObjectGuid m_uiRazorscaleGUID
Definition: instance_ulduar.cpp:56
ObjectGuid m_algalonUniverseGUID
Definition: instance_ulduar.cpp:120
ObjectGuid m_uiXT002GUID
Definition: instance_ulduar.cpp:57
ObjectGuid m_thorimGameobjectsGUID[5]
Definition: instance_ulduar.cpp:93
ObjectGuid m_hodirHardmodeChest
Definition: instance_ulduar.cpp:98

References DATA_BRUNDIR, DATA_GO_MIMIRON_DOOR_1, DATA_GO_MIMIRON_DOOR_2, DATA_GO_MIMIRON_DOOR_3, DATA_HARPOON_FIRE_STATE_1, DATA_HARPOON_FIRE_STATE_2, DATA_HARPOON_FIRE_STATE_3, DATA_HARPOON_FIRE_STATE_4, DATA_LIGHTNING_WALL1, DATA_LIGHTNING_WALL2, DATA_MIMIRON_ACU, DATA_MIMIRON_LEVIATHAN_MKII, DATA_MIMIRON_VX001, DATA_MOLGEIM, DATA_REPAIR_STATION1, DATA_REPAIR_STATION2, DATA_STEELBREAKER, DATA_THORIM_FENCE, DATA_THORIM_FIRST_DOORS, DATA_THORIM_LEVER, DATA_THORIM_LEVER_GATE, DATA_THORIM_SECOND_DOORS, ObjectGuid::Empty, GO_DOODAD_UL_SIGILDOOR_01, GO_DOODAD_UL_SIGILDOOR_02, GO_DOODAD_UL_SIGILDOOR_03, GO_DOODAD_UL_ULDUAR_TRAPDOOR_03, GO_DOODAD_UL_UNIVERSEFLOOR_01, GO_DOODAD_UL_UNIVERSEFLOOR_02, GO_DOODAD_UL_UNIVERSEGLOBE01, GO_HODIR_CHEST_HARD, GO_HODIR_CHEST_NORMAL, GO_KOLOGARN_DOORS, GO_LEVIATHAN_DOORS, GO_XT002_DOORS, GO_YOGG_SARON_DOORS, KologarnDoorGUID, m_algalonFloorGUID, m_algalonSigilDoorGUID, m_algalonTrapdoorGUID, m_algalonUniverseGUID, m_auiAssemblyGUIDs, m_brannBronzebeardAlgGUID, m_FreyaElder, m_hodirHardmodeChest, m_hodirNormalChest, m_leviathanDoorsGUID, m_lightningWalls, m_MimironACUguid, m_MimironDoor, m_MimironLeviathanMKIIguid, m_MimironVX001guid, m_RazorscaleHarpoonFireStateGUID, m_RepairSGUID, m_saraGUID, m_thorimGameobjectsGUID, m_uiAlgalonGUID, m_uiAuriayaGUID, m_uiFreyaGUID, m_uiHodirGUID, m_uiIgnisGUID, m_uiKologarnGUID, m_uiLeviathanGUID, m_uiMimironGUID, m_uiRazorscaleGUID, m_uiThorimGUID, m_uiVezaxGUID, m_uiXT002GUID, m_uiYoggSaronGUID, m_xt002DoorsGUID, m_yoggsaronBrainGUID, m_yoggsaronDoorsGUID, NPC_BRAIN_OF_YOGG_SARON, NPC_BRANN_BRONZBEARD_ALG, NPC_ELDER_BRIGHTLEAF, NPC_ELDER_IRONBRANCH, NPC_ELDER_STONEBARK, NPC_SARA, TYPE_ALGALON, TYPE_AURIAYA, TYPE_FREYA, TYPE_HODIR, TYPE_IGNIS, TYPE_KOLOGARN, TYPE_LEVIATHAN, TYPE_MIMIRON, TYPE_RAZORSCALE, TYPE_THORIM, TYPE_VEZAX, TYPE_XT002, and TYPE_YOGGSARON.

Referenced by SetData().

◆ GetSaveData()

std::string instance_ulduar::instance_ulduar_InstanceMapScript::GetSaveData ( )
inlineoverridevirtual

Reimplemented from InstanceScript.

1060 {
1062
1063 std::ostringstream saveStream;
1064 saveStream << "U U " << m_auiEncounter[0] << ' ' << m_auiEncounter[1] << ' ' << m_auiEncounter[2] << ' ' << m_auiEncounter[3] << ' '
1065 << m_auiEncounter[4] << ' ' << m_auiEncounter[5] << ' ' << m_auiEncounter[6] << ' ' << m_auiEncounter[7] << ' '
1066 << m_auiEncounter[8] << ' ' << m_auiEncounter[9] << ' ' << m_auiEncounter[10] << ' ' << m_auiEncounter[11] << ' '
1067 << m_auiEncounter[12] << ' ' << m_auiEncounter[13] << ' ' << m_auiEncounter[14] << ' ' << m_conspeedatoryAttempt << ' '
1068 << m_unbrokenAchievement << ' ' << m_algalonTimer << ' ' << C_of_Ulduar_MASK << ' ' << m_mageBarrier;
1069
1071 return saveStream.str();
1072 }
#define OUT_SAVE_INST_DATA_COMPLETE
Definition: InstanceScript.h:28
#define OUT_SAVE_INST_DATA
Definition: InstanceScript.h:27
uint32 m_conspeedatoryAttempt
Definition: instance_ulduar.cpp:110

References C_of_Ulduar_MASK, m_algalonTimer, m_auiEncounter, m_conspeedatoryAttempt, m_mageBarrier, m_unbrokenAchievement, OUT_SAVE_INST_DATA, and OUT_SAVE_INST_DATA_COMPLETE.

◆ Initialize()

void instance_ulduar::instance_ulduar_InstanceMapScript::Initialize ( )
inlineoverridevirtual

Reimplemented from InstanceScript.

134 {
135 // Bosses
136 memset(&m_auiEncounter, 0, sizeof(m_auiEncounter));
138
139 // Flame Leviathan
140 for (uint8 i = 0; i < 4; ++i)
141 m_leviathanTowers[i] = true;
142
143 _leviathanVehicles.clear();
145 m_mageBarrier = 0;
146
147 // Hodir
148 hmHodir = true; // If players fail the Hardmode then becomes false
149
150 // Freya
152
153 // Algalon
154 m_algalonTimer = 0;
155
156 // Shared
157 _events.Reset();
158 m_mimironTramUsed = false;
159 }
std::uint8_t uint8
Definition: Define.h:110
void Reset()
Definition: EventMap.cpp:21
bool hmHodir
Definition: instance_ulduar.cpp:96
GuidList _leviathanVehicles
Definition: instance_ulduar.cpp:75
EventMap _events
Definition: instance_ulduar.cpp:127

References _events, _leviathanVehicles, C_of_Ulduar_MASK, hmHodir, m_algalonTimer, m_auiEncounter, m_conspeedatoryAttempt, m_leviathanTowers, m_mageBarrier, m_mimironTramUsed, m_unbrokenAchievement, and EventMap::Reset().

Referenced by instance_ulduar_InstanceMapScript().

◆ IsEncounterInProgress()

bool instance_ulduar::instance_ulduar_InstanceMapScript::IsEncounterInProgress ( ) const
inlineoverridevirtual

Reimplemented from InstanceScript.

194 {
195 for (uint8 i = 0; i < (MAX_ENCOUNTER - 1); ++i)
196 {
197 if (m_auiEncounter[i] == IN_PROGRESS)
198 return true;
199 }
200
201 // Leviathan does not use IN_PROGRESS type, instead SPECIAL is set and never reset,
202 // Check if he is in combat.
204 if (l->IsInCombat())
205 return true;
206
207 return false;
208 }
@ IN_PROGRESS
Definition: InstanceScript.h:57
#define MAX_ENCOUNTER
Definition: violet_hold.h:21
Definition: Unit.h:1290
Map * instance
Definition: InstanceScript.h:146
Creature * GetCreature(ObjectGuid const guid)
Definition: Map.cpp:3290

References Map::GetCreature(), IN_PROGRESS, InstanceScript::instance, m_auiEncounter, m_uiLeviathanGUID, and MAX_ENCOUNTER.

◆ Load()

void instance_ulduar::instance_ulduar_InstanceMapScript::Load ( const char *  strIn)
inlineoverridevirtual

Reimplemented from InstanceScript.

1075 {
1076 if (!strIn)
1077 {
1079 return;
1080 }
1081
1082 OUT_LOAD_INST_DATA(strIn);
1083
1084 char dataHead1, dataHead2;
1085
1086 std::istringstream loadStream(strIn);
1087 loadStream >> dataHead1 >> dataHead2;
1088
1089 if (dataHead1 == 'U' && dataHead2 == 'U')
1090 {
1091 for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
1092 {
1093 loadStream >> m_auiEncounter[i];
1094
1095 if (m_auiEncounter[i] == IN_PROGRESS && i != TYPE_WATCHERS)
1097 }
1098
1099 // Achievements
1100 loadStream >> m_conspeedatoryAttempt;
1101 loadStream >> m_unbrokenAchievement;
1102
1103 // Algalon
1104 loadStream >> m_algalonTimer;
1107
1109 {
1112 }
1113
1114 // achievement Conqueror/Champion of Ulduar
1115 loadStream >> C_of_Ulduar_MASK;
1116
1117 //Base Camp - Mage Barrier status
1118 loadStream >> m_mageBarrier;
1119 }
1120
1122 }
#define OUT_LOAD_INST_DATA_FAIL
Definition: InstanceScript.h:31
@ DONE
Definition: InstanceScript.h:59
@ NOT_STARTED
Definition: InstanceScript.h:56
#define OUT_LOAD_INST_DATA_COMPLETE
Definition: InstanceScript.h:30
#define OUT_LOAD_INST_DATA(a)
Definition: InstanceScript.h:29
@ WORLD_STATE_ALGALON_DESPAWN_TIMER
Definition: ulduar.h:273
@ TIMER_ALGALON_SUMMONED
Definition: ulduar.h:283
@ TIMER_ALGALON_TO_SUMMON
Definition: ulduar.h:282
void DoUpdateWorldState(uint32 worldstateId, uint32 worldstateValue)
Definition: InstanceScript.cpp:418
uint32 GetData(uint32 type) const override
Definition: instance_ulduar.cpp:978

References C_of_Ulduar_MASK, DONE, InstanceScript::DoUpdateWorldState(), GetData(), IN_PROGRESS, m_algalonTimer, m_auiEncounter, m_conspeedatoryAttempt, m_mageBarrier, m_unbrokenAchievement, MAX_ENCOUNTER, NOT_STARTED, OUT_LOAD_INST_DATA, OUT_LOAD_INST_DATA_COMPLETE, OUT_LOAD_INST_DATA_FAIL, TIMER_ALGALON_SUMMONED, TIMER_ALGALON_TO_SUMMON, TYPE_ALGALON, TYPE_WATCHERS, WORLD_STATE_ALGALON_DESPAWN_TIMER, and WORLD_STATE_ALGALON_TIMER_ENABLED.

◆ OnCreatureCreate()

void instance_ulduar::instance_ulduar_InstanceMapScript::OnCreatureCreate ( Creature creature)
inlineoverridevirtual

These creatures are summoned by something else than Algalon but need to be controlled/despawned by him - so they need to be registered in his summon list

Reimplemented from InstanceScript.

289 {
290 switch(creature->GetEntry())
291 {
292 case NPC_LEVIATHAN:
293 m_uiLeviathanGUID = creature->GetGUID();
294 break;
295 case NPC_IGNIS:
296 m_uiIgnisGUID = creature->GetGUID();
297 break;
298 case NPC_RAZORSCALE:
299 m_uiRazorscaleGUID = creature->GetGUID();
300 break;
301 case NPC_XT002:
302 m_uiXT002GUID = creature->GetGUID();
303 break;
304 case NPC_STEELBREAKER:
305 m_auiAssemblyGUIDs[0] = creature->GetGUID();
306 break;
307 case NPC_MOLGEIM:
308 m_auiAssemblyGUIDs[1] = creature->GetGUID();
309 break;
310 case NPC_BRUNDIR:
311 m_auiAssemblyGUIDs[2] = creature->GetGUID();
312 break;
313 case NPC_KOLOGARN:
314 m_uiKologarnGUID = creature->GetGUID();
315 if (GetData(TYPE_KOLOGARN) == DONE)
316 {
317 creature->SetDisableGravity(true);
318 creature->SetPosition(creature->GetHomePosition());
319 creature->setDeathState(JUST_DIED);
320 creature->StopMovingOnCurrentPos();
321 }
322 break;
323 case NPC_AURIAYA:
324 m_uiAuriayaGUID = creature->GetGUID();
325 break;
326 case NPC_MIMIRON:
327 m_uiMimironGUID = creature->GetGUID();
328 break;
329 case NPC_HODIR:
330 m_uiHodirGUID = creature->GetGUID();
332 {
334 }
335 break;
336 case NPC_THORIM:
337 m_uiThorimGUID = creature->GetGUID();
338 break;
339 case NPC_FREYA:
340 m_uiFreyaGUID = creature->GetGUID();
341 break;
342 case NPC_VEZAX:
343 m_uiVezaxGUID = creature->GetGUID();
344 break;
345 case NPC_YOGGSARON:
346 m_uiYoggSaronGUID = creature->GetGUID();
347 break;
348 case NPC_ALGALON:
349 m_uiAlgalonGUID = creature->GetGUID();
350 break;
352 {
353 if( creature->GetPositionX() > 595 )
355 else if( creature->GetPositionX() > 585 )
357 else if( creature->GetPositionX() > 575 )
359 else
361 }
362 break;
365 break;
367 m_MimironVX001guid = creature->GetGUID();
368 break;
369 case NPC_MIMIRON_ACU:
370 m_MimironACUguid = creature->GetGUID();
371 break;
372 case NPC_FREYA_GOSSIP:
374 ShowKeeperGossip(TYPE_FREYA, creature);
375 break;
376 case NPC_HODIR_GOSSIP:
378 ShowKeeperGossip(TYPE_HODIR, creature);
379 break;
382 ShowKeeperGossip(TYPE_THORIM, creature);
383 break;
387 break;
391 m_FreyaElder[creature->GetEntry() - NPC_ELDER_IRONBRANCH] = creature->GetGUID();
392 break;
393 case NPC_SARA:
394 m_saraGUID = creature->GetGUID();
395 break;
397 m_yoggsaronBrainGUID = creature->GetGUID();
398 break;
401 break;
404 break;
413 algalon->AI()->JustSummoned(creature);
414 break;
415 }
416 }
@ NPC_FREYA
Definition: ScriptedCreature.cpp:545
@ JUST_DIED
Definition: Unit.h:317
@ NPC_VEZAX
Definition: ulduar.h:123
@ NPC_THORIM_GOSSIP
Definition: ulduar.h:145
@ NPC_MIMIRON_ACU
Definition: ulduar.h:135
@ NPC_FREYA_GOSSIP
Definition: ulduar.h:143
@ NPC_YOGGSARON
Definition: ulduar.h:125
@ NPC_MOLGEIM
Definition: ulduar.h:115
@ NPC_ALGALON_STALKER_ASTEROID_TARGET_01
Definition: ulduar.h:169
@ NPC_BRUNDIR
Definition: ulduar.h:116
@ NPC_UNLEASHED_DARK_MATTER
Definition: ulduar.h:171
@ NPC_THORIM
Definition: ulduar.h:121
@ NPC_MIMIRON_GOSSIP
Definition: ulduar.h:146
@ NPC_ALGALON
Definition: ulduar.h:127
@ NPC_XT002
Definition: ulduar.h:113
@ NPC_HARPOON_FIRE_STATE
Definition: ulduar.h:130
@ NPC_HODIR
Definition: ulduar.h:120
@ NPC_MIMIRON_LEVIATHAN_MKII
Definition: ulduar.h:133
@ NPC_IGNIS
Definition: ulduar.h:111
@ NPC_LEVIATHAN
Definition: ulduar.h:110
@ NPC_ALGALON_STALKER_ASTEROID_TARGET_02
Definition: ulduar.h:170
@ NPC_STEELBREAKER
Definition: ulduar.h:114
@ NPC_HODIR_GOSSIP
Definition: ulduar.h:144
@ NPC_BRANN_BASE_CAMP
Definition: ulduar.h:158
@ NPC_KOLOGARN
Definition: ulduar.h:117
@ NPC_AURIAYA
Definition: ulduar.h:118
@ NPC_RAZORSCALE
Definition: ulduar.h:112
@ NPC_ALGALON_VOID_ZONE_VISUAL_STALKER
Definition: ulduar.h:168
@ NPC_MIMIRON_VX001
Definition: ulduar.h:134
@ NPC_MIMIRON
Definition: ulduar.h:119
Definition: Creature.h:46
void setDeathState(DeathState s, bool despawn=false) override
Set DeathState.
Definition: Creature.cpp:1963
bool SetDisableGravity(bool disable, bool packetOnly=false, bool updateAnimationTier=true) override
Definition: Creature.cpp:3197
void GetHomePosition(float &x, float &y, float &z, float &ori) const
Definition: Creature.h:322
void SetPosition(float x, float y, float z, float o)
Set creature position.
Definition: Creature.cpp:3160
uint32 GetEntry() const
Definition: Object.h:109
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:106
float GetPositionX() const
Definition: Position.h:117
void StopMovingOnCurrentPos()
Definition: Unit.cpp:17631
Difficulty GetDifficulty() const
Definition: Map.h:442
void ShowKeeperGossip(uint8 type, Creature *cr, ObjectGuid guid=ObjectGuid::Empty)
Definition: instance_ulduar.cpp:435
void SpawnHodirChests(Difficulty diff, Creature *hodir)
Definition: instance_ulduar.cpp:217
ObjectGuid m_brannBronzebeardBaseCamp
Definition: instance_ulduar.cpp:123
ObjectGuid m_keepersGossipGUID[4]
Definition: instance_ulduar.cpp:131

References DONE, Map::GetCreature(), GetData(), Map::GetDifficulty(), Object::GetEntry(), Object::GetGUID(), Creature::GetHomePosition(), Position::GetPositionX(), InstanceScript::instance, JUST_DIED, m_auiAssemblyGUIDs, m_auiEncounter, m_brannBronzebeardAlgGUID, m_brannBronzebeardBaseCamp, m_FreyaElder, m_keepersGossipGUID, m_MimironACUguid, m_MimironLeviathanMKIIguid, m_MimironVX001guid, m_RazorscaleHarpoonFireStateGUID, m_saraGUID, m_uiAlgalonGUID, m_uiAuriayaGUID, m_uiFreyaGUID, m_uiHodirGUID, m_uiIgnisGUID, m_uiKologarnGUID, m_uiLeviathanGUID, m_uiMimironGUID, m_uiRazorscaleGUID, m_uiThorimGUID, m_uiVezaxGUID, m_uiXT002GUID, m_uiYoggSaronGUID, m_yoggsaronBrainGUID, NPC_ALGALON, NPC_ALGALON_STALKER_ASTEROID_TARGET_01, NPC_ALGALON_STALKER_ASTEROID_TARGET_02, NPC_ALGALON_VOID_ZONE_VISUAL_STALKER, NPC_AURIAYA, NPC_BRAIN_OF_YOGG_SARON, NPC_BRANN_BASE_CAMP, NPC_BRANN_BRONZBEARD_ALG, NPC_BRUNDIR, NPC_ELDER_BRIGHTLEAF, NPC_ELDER_IRONBRANCH, NPC_ELDER_STONEBARK, NPC_FREYA, NPC_FREYA_GOSSIP, NPC_HARPOON_FIRE_STATE, NPC_HODIR, NPC_HODIR_GOSSIP, NPC_IGNIS, NPC_KOLOGARN, NPC_LEVIATHAN, NPC_MIMIRON, NPC_MIMIRON_ACU, NPC_MIMIRON_GOSSIP, NPC_MIMIRON_LEVIATHAN_MKII, NPC_MIMIRON_VX001, NPC_MOLGEIM, NPC_RAZORSCALE, NPC_SARA, NPC_STEELBREAKER, NPC_THORIM, NPC_THORIM_GOSSIP, NPC_UNLEASHED_DARK_MATTER, NPC_VEZAX, NPC_XT002, NPC_YOGGSARON, Creature::setDeathState(), Creature::SetDisableGravity(), Creature::SetPosition(), ShowKeeperGossip(), SpawnHodirChests(), Unit::StopMovingOnCurrentPos(), TYPE_FREYA, TYPE_HODIR, TYPE_KOLOGARN, TYPE_MIMIRON, and TYPE_THORIM.

◆ OnCreatureRemove()

void instance_ulduar::instance_ulduar_InstanceMapScript::OnCreatureRemove ( Creature creature)
inlineoverridevirtual

Reimplemented from InstanceScript.

419 {
420 switch (creature->GetEntry())
421 {
423 if (m_brannBronzebeardAlgGUID == creature->GetGUID())
425 break;
426 }
427 }
void Clear()
Definition: ObjectGuid.h:140

References ObjectGuid::Clear(), Object::GetEntry(), Object::GetGUID(), m_brannBronzebeardAlgGUID, and NPC_BRANN_BRONZBEARD_ALG.

◆ OnGameObjectCreate()

void instance_ulduar::instance_ulduar_InstanceMapScript::OnGameObjectCreate ( GameObject gameObject)
inlineoverridevirtual

Reimplemented from InstanceScript.

449 {
450 switch (gameObject->GetEntry())
451 {
452 // Flame Leviathan
454 {
455 if(m_RepairSGUID[0])
456 m_RepairSGUID[1] = gameObject->GetGUID();
457 else
458 m_RepairSGUID[0] = gameObject->GetGUID();
459 break;
460 }
462 m_lightningWalls[0] = gameObject->GetGUID();
464 break;
466 m_lightningWalls[1] = gameObject->GetGUID();
467 break;
470 m_leviathanVisualTowers[3][0] = gameObject->GetGUID();
471 break;
474 m_leviathanVisualTowers[0][0] = gameObject->GetGUID();
475 break;
478 m_leviathanVisualTowers[2][0] = gameObject->GetGUID();
479 break;
482 m_leviathanVisualTowers[1][0] = gameObject->GetGUID();
483 break;
486 m_leviathanVisualTowers[3][1] = gameObject->GetGUID();
487 break;
490 m_leviathanVisualTowers[0][1] = gameObject->GetGUID();
491 break;
494 m_leviathanVisualTowers[2][1] = gameObject->GetGUID();
495 break;
498 m_leviathanVisualTowers[1][1] = gameObject->GetGUID();
499 break;
503 m_leviathanDoorsGUID = gameObject->GetGUID();
504 break;
505 // XT-002, Kologarn, Assembly of Iron
506 case GO_XT002_DOORS:
507 m_xt002DoorsGUID = gameObject->GetGUID();
508 break;
510 KologarnDoorGUID = gameObject->GetGUID();
511 break;
514 break;
516 m_assemblyDoorsGUID = gameObject->GetGUID();
517 break;
519 m_archivumDoorsGUID = gameObject->GetGUID();
521 break;
522 // Thorim
525 break;
526 case GO_ARENA_LEVER:
528 break;
529 case GO_ARENA_FENCE:
531 break;
534 break;
537 break;
538 // Yogg-Saron
540 m_yoggsaronDoorsGUID = gameObject->GetGUID();
541 break;
542 case GO_KEEPERS_GATE:
544 {
545 instance->LoadGrid(1903.0f, 248.0f);
547 }
548
549 m_keepersgateGUID = gameObject->GetGUID();
550 break;
551 // Mimiron, Hodir, Vezax
553 gameObject->EnableCollision(false);
554 break;
556 m_MimironDoor[0] = gameObject->GetGUID();
557 break;
559 m_MimironDoor[1] = gameObject->GetGUID();
560 break;
562 m_MimironDoor[2] = gameObject->GetGUID();
563 break;
565 case GO_HODIR_DOOR:
566 if (GetData(TYPE_HODIR) == DONE)
567 if( gameObject->GetGoState() != GO_STATE_ACTIVE )
568 {
569 gameObject->SetLootState(GO_READY);
570 gameObject->UseDoorOrButton(0, false);
571 }
572 break;
573 case GO_VEZAX_DOOR:
574 if( GetData(TYPE_VEZAX) == DONE )
575 if( gameObject->GetGoState() != GO_STATE_ACTIVE )
576 {
577 gameObject->SetLootState(GO_READY);
578 gameObject->UseDoorOrButton(0, false);
579 }
580 break;
581 case GO_SNOW_MOUND:
582 gameObject->EnableCollision(false);
583 break;
584 case GO_MIMIRON_TRAM:
585 if (GetData(TYPE_MIMIRON) == DONE)
586 m_mimironTramUsed = true;
587 m_mimironTramGUID = gameObject->GetGUID();
588 break;
589 // Algalon the Observer
592 if (m_algalonTimer)
594 break;
596 m_algalonSigilDoorGUID[0] = gameObject->GetGUID();
597 if (m_algalonTimer)
598 gameObject->SetGoState(GO_STATE_ACTIVE);
599 break;
601 m_algalonSigilDoorGUID[1] = gameObject->GetGUID();
602 if (m_algalonTimer)
603 gameObject->SetGoState(GO_STATE_ACTIVE);
604 break;
606 m_algalonSigilDoorGUID[2] = gameObject->GetGUID();
607 break;
609 m_algalonFloorGUID[0] = gameObject->GetGUID();
610 break;
612 m_algalonFloorGUID[1] = gameObject->GetGUID();
613 break;
615 m_algalonUniverseGUID = gameObject->GetGUID();
616 break;
618 m_algalonTrapdoorGUID = gameObject->GetGUID();
619 break;
620 // Herbs
621 case 191019: // Adder's Tongue
622 case 190176: // Frost Lotus
623 case 190171: // Lichbloom
624 case 190170: // Talandra's Rose
625 case 189973: // Goldclover
626 if (GetData(TYPE_FREYA) == DONE)
627 gameObject->SetRespawnTime(7 * DAY);
628 break;
629 }
630 }
constexpr auto DAY
Definition: Common.h:58
@ GO_READY
Definition: GameObject.h:801
@ GO_STATE_READY
Definition: GameObject.h:735
@ GO_STATE_ACTIVE
Definition: GameObject.h:734
@ GO_STATE_ACTIVE_ALTERNATIVE
Definition: GameObject.h:736
@ GO_MIMIRON_ELEVATOR
Definition: ulduar.h:219
@ GO_ARCHIVUM_DOORS
Definition: ulduar.h:210
@ GO_KOLOGARN_BRIDGE
Definition: ulduar.h:212
@ GO_VEZAX_DOOR
Definition: ulduar.h:226
@ GO_THORIMS_TARGETTING_CRYSTAL
Definition: ulduar.h:202
@ GO_MIMIRONS_TARGETTING_CRYSTAL
Definition: ulduar.h:199
@ GO_FREYAS_GENERATOR
Definition: ulduar.h:204
@ GO_SECOND_COLOSSUS_DOORS
Definition: ulduar.h:235
@ GO_HODIRS_GENERATOR
Definition: ulduar.h:205
@ GO_CELESTIAL_PLANETARIUM_ACCESS_25
Definition: ulduar.h:242
@ GO_ARENA_FENCE
Definition: ulduar.h:233
@ GO_ARENA_LEVER_GATE
Definition: ulduar.h:231
@ GO_ASSEMBLY_DOORS
Definition: ulduar.h:211
@ GO_HODIR_FROZEN_DOOR
Definition: ulduar.h:223
@ GO_KEEPERS_GATE
Definition: ulduar.h:214
@ GO_THORIMS_GENERATOR
Definition: ulduar.h:206
@ GO_REPAIR_STATION_TRAP
Definition: ulduar.h:195
@ GO_MIMIRON_DOOR_3
Definition: ulduar.h:222
@ GO_MIMIRON_DOOR_1
Definition: ulduar.h:220
@ GO_ARENA_LEVER
Definition: ulduar.h:232
@ GO_HODIR_DOOR
Definition: ulduar.h:224
@ GO_HODIRS_TARGETTING_CRYSTAL
Definition: ulduar.h:201
@ GO_SNOW_MOUND
Definition: ulduar.h:228
@ GO_FIRST_COLOSSUS_DOORS
Definition: ulduar.h:234
@ GO_MIMIRONS_GENERATOR
Definition: ulduar.h:203
@ GO_LIGHTNING_WALL1
Definition: ulduar.h:197
@ GO_CELESTIAL_PLANETARIUM_ACCESS_10
Definition: ulduar.h:241
@ GO_LIGHTNING_WALL2
Definition: ulduar.h:198
@ GO_MIMIRON_TRAM
Definition: ulduar.h:216
@ GO_MIMIRON_DOOR_2
Definition: ulduar.h:221
@ GO_FREYAS_TARGETTING_CRYSTAL
Definition: ulduar.h:200
@ GO_FLAG_IN_USE
Definition: SharedDefines.h:1575
@ GO_FLAG_LOCKED
Definition: SharedDefines.h:1576
void SetGoState(GOState state)
Definition: GameObject.cpp:2441
void SetGameObjectFlag(GameObjectFlags flags)
Definition: GameObject.h:911
void UseDoorOrButton(uint32 time_to_restore=0, bool alternative=false, Unit *user=nullptr)
Definition: GameObject.cpp:1400
GOState GetGoState() const
Definition: GameObject.h:898
void EnableCollision(bool enable)
Definition: GameObject.cpp:2623
void SetLootState(LootState s, Unit *unit=nullptr)
Definition: GameObject.cpp:2413
void SetRespawnTime(int32 respawn)
Definition: GameObject.cpp:1274
void RemoveGameObjectFlag(GameObjectFlags flags)
Definition: GameObject.h:912
void LoadGrid(float x, float y)
Definition: Map.cpp:494
ObjectGuid m_assemblyDoorsGUID
Definition: instance_ulduar.cpp:89
void OpenIfDone(uint32 encounter, GameObject *go, GOState state)
Definition: instance_ulduar.cpp:429
ObjectGuid m_mimironTramGUID
Definition: instance_ulduar.cpp:129
ObjectGuid m_archivumDoorsGUID
Definition: instance_ulduar.cpp:90
ObjectGuid m_keepersgateGUID
Definition: instance_ulduar.cpp:130
ObjectGuid m_leviathanVisualTowers[4][2]
Definition: instance_ulduar.cpp:71

References DATA_THORIM_FENCE, DATA_THORIM_FIRST_DOORS, DATA_THORIM_LEVER, DATA_THORIM_LEVER_GATE, DATA_THORIM_SECOND_DOORS, DAY, DONE, GameObject::EnableCollision(), GetData(), Object::GetEntry(), GameObject::GetGoState(), Object::GetGUID(), GO_ARCHIVUM_DOORS, GO_ARENA_FENCE, GO_ARENA_LEVER, GO_ARENA_LEVER_GATE, GO_ASSEMBLY_DOORS, GO_CELESTIAL_PLANETARIUM_ACCESS_10, GO_CELESTIAL_PLANETARIUM_ACCESS_25, GO_DOODAD_UL_SIGILDOOR_01, GO_DOODAD_UL_SIGILDOOR_02, GO_DOODAD_UL_SIGILDOOR_03, GO_DOODAD_UL_ULDUAR_TRAPDOOR_03, GO_DOODAD_UL_UNIVERSEFLOOR_01, GO_DOODAD_UL_UNIVERSEFLOOR_02, GO_DOODAD_UL_UNIVERSEGLOBE01, GO_FIRST_COLOSSUS_DOORS, GO_FLAG_IN_USE, GO_FLAG_LOCKED, GO_FREYAS_GENERATOR, GO_FREYAS_TARGETTING_CRYSTAL, GO_HODIR_DOOR, GO_HODIR_FROZEN_DOOR, GO_HODIRS_GENERATOR, GO_HODIRS_TARGETTING_CRYSTAL, GO_KEEPERS_GATE, GO_KOLOGARN_BRIDGE, GO_KOLOGARN_DOORS, GO_LEVIATHAN_DOORS, GO_LIGHTNING_WALL1, GO_LIGHTNING_WALL2, GO_MIMIRON_DOOR_1, GO_MIMIRON_DOOR_2, GO_MIMIRON_DOOR_3, GO_MIMIRON_ELEVATOR, GO_MIMIRON_TRAM, GO_MIMIRONS_GENERATOR, GO_MIMIRONS_TARGETTING_CRYSTAL, GO_READY, GO_REPAIR_STATION_TRAP, GO_SECOND_COLOSSUS_DOORS, GO_SNOW_MOUND, GO_STATE_ACTIVE, GO_STATE_ACTIVE_ALTERNATIVE, GO_STATE_READY, GO_THORIMS_GENERATOR, GO_THORIMS_TARGETTING_CRYSTAL, GO_VEZAX_DOOR, GO_XT002_DOORS, GO_YOGG_SARON_DOORS, InstanceScript::instance, KologarnDoorGUID, Map::LoadGrid(), m_algalonFloorGUID, m_algalonSigilDoorGUID, m_algalonTimer, m_algalonTrapdoorGUID, m_algalonUniverseGUID, m_archivumDoorsGUID, m_assemblyDoorsGUID, m_keepersgateGUID, m_leviathanDoorsGUID, m_leviathanVisualTowers, m_lightningWalls, m_MimironDoor, m_mimironTramGUID, m_mimironTramUsed, m_RepairSGUID, m_thorimGameobjectsGUID, m_xt002DoorsGUID, m_yoggsaronDoorsGUID, OpenIfDone(), GameObject::RemoveGameObjectFlag(), GameObject::SetGameObjectFlag(), GameObject::SetGoState(), GameObject::SetLootState(), GameObject::SetRespawnTime(), TYPE_ASSEMBLY, TYPE_FREYA, TYPE_HODIR, TYPE_KOLOGARN, TYPE_LEVIATHAN, TYPE_MIMIRON, TYPE_THORIM, TYPE_VEZAX, and GameObject::UseDoorOrButton().

◆ OnPlayerEnter()

void instance_ulduar::instance_ulduar_InstanceMapScript::OnPlayerEnter ( Player player)
inlineoverridevirtual

Reimplemented from InstanceScript.

168 {
169 // mimiron tram:
170 instance->LoadGrid(2307.0f, 284.632f);
172 player->UpdateVisibilityOf(MimironTram);
173
175 {
177 if (!algalon)
178 return;
179
180 if (m_algalonTimer <= 60)
181 {
183 algalon->AI()->DoAction(ACTION_INIT_ALGALON);
184 }
185 else // if (m_algalonTimer = TIMER_ALGALON_TO_SUMMON)
186 {
188 algalon->SetImmuneToPC(false);
189 }
190 }
191 }
Position const AlgalonLandPos
Definition: ulduar.h:295
@ ACTION_INIT_ALGALON
Definition: ulduar.h:278
@ EVENT_UPDATE_ALGALON_TIMER
Definition: ulduar.h:276
void RescheduleEvent(uint32 eventId, uint32 time, uint32 groupId=0, uint32 phase=0)
Definition: EventMap.cpp:81
virtual void DoAction(int32)
Definition: UnitAI.h:196
CreatureAI * AI() const
Definition: Creature.h:134
Definition: TemporarySummon.h:40
Definition: GameObject.h:813
void UpdateVisibilityOf(WorldObject *target)
Definition: PlayerUpdates.cpp:1670
void SetImmuneToPC(bool apply, bool keepCombat=false)
Definition: Unit.cpp:14367
TempSummon * SummonCreature(uint32 entry, Position const &pos, SummonPropertiesEntry const *properties=nullptr, uint32 duration=0, WorldObject *summoner=nullptr, uint32 spellId=0, uint32 vehId=0)
Definition: Object.cpp:2117
GameObject * GetGameObject(ObjectGuid const guid)
Definition: Map.cpp:3295

References _events, ACTION_INIT_ALGALON, Creature::AI(), AlgalonLandPos, UnitAI::DoAction(), EVENT_UPDATE_ALGALON_TIMER, Map::GetGameObject(), InstanceScript::instance, Map::LoadGrid(), m_algalonTimer, m_mimironTramGUID, m_uiAlgalonGUID, NPC_ALGALON, EventMap::RescheduleEvent(), Unit::SetImmuneToPC(), Map::SummonCreature(), TIMER_ALGALON_SUMMONED, TIMER_ALGALON_TO_SUMMON, and Player::UpdateVisibilityOf().

◆ OnUnitDeath()

void instance_ulduar::instance_ulduar_InstanceMapScript::OnUnitDeath ( Unit unit)
inlineoverridevirtual

Reimplemented from ZoneScript.

1019 {
1020 // Feeds on Tears achievement
1021 if (unit->GetTypeId() == TYPEID_PLAYER)
1022 {
1025 algalon->AI()->DoAction(ACTION_FEEDS_ON_TEARS_FAILED);
1026 }
1027 else if (unit->GetTypeId() == TYPEID_UNIT && unit->GetAreaId() == 4656 /*Conservatory of Life*/)
1028 {
1030 {
1031 DoStartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, 21597 /*CON-SPEED-ATORY_TIMED_CRITERIA*/);
1033 SaveToDB();
1034 }
1035 }
1036
1037 // achievement Champion/Conqueror of Ulduar
1038 if (unit->GetTypeId() == TYPEID_PLAYER)
1039 for (uint8 i = 0; i <= 12; ++i)
1040 {
1041 bool go = false;
1042 if (i == TYPE_LEVIATHAN)
1043 {
1045 if (c->IsInCombat())
1046 go = true;
1047 }
1048 else
1049 go = (m_auiEncounter[i] == IN_PROGRESS);
1050
1051 if (go && (C_of_Ulduar_MASK & (1 << i)) == 0)
1052 {
1053 C_of_Ulduar_MASK |= (1 << i);
1054 SaveToDB();
1055 }
1056 }
1057 }
@ TYPEID_UNIT
Definition: ObjectGuid.h:37
@ TYPEID_PLAYER
Definition: ObjectGuid.h:38
@ ACTION_FEEDS_ON_TEARS_FAILED
Definition: ulduar.h:277
@ ACHIEVEMENT_TIMED_TYPE_EVENT
Definition: DBCEnums.h:116
Seconds GetGameTime()
Definition: GameTime.cpp:38
TypeID GetTypeId() const
Definition: Object.h:121
uint32 GetAreaId() const
Definition: Object.cpp:3068
void SaveToDB()
Definition: InstanceScript.cpp:40
void DoStartTimedAchievement(AchievementCriteriaTimedTypes type, uint32 entry)
Definition: InstanceScript.cpp:464

References ACHIEVEMENT_TIMED_TYPE_EVENT, ACTION_FEEDS_ON_TEARS_FAILED, C_of_Ulduar_MASK, DAY, InstanceScript::DoStartTimedAchievement(), WorldObject::GetAreaId(), Map::GetCreature(), GetData(), GameTime::GetGameTime(), Object::GetTypeId(), IN_PROGRESS, InstanceScript::instance, m_auiEncounter, m_conspeedatoryAttempt, m_uiAlgalonGUID, m_uiLeviathanGUID, InstanceScript::SaveToDB(), TYPE_ALGALON, TYPE_LEVIATHAN, TYPEID_PLAYER, and TYPEID_UNIT.

◆ OpenIfDone()

void instance_ulduar::instance_ulduar_InstanceMapScript::OpenIfDone ( uint32  encounter,
GameObject go,
GOState  state 
)
inline
430 {
431 if (GetData(encounter) == DONE)
432 go->SetGoState(state);
433 }

References DONE, GetData(), and GameObject::SetGoState().

Referenced by OnGameObjectCreate().

◆ ProcessEvent()

void instance_ulduar::instance_ulduar_InstanceMapScript::ProcessEvent ( WorldObject ,
uint32  eventId 
)
inlineoverridevirtual

Reimplemented from ZoneScript.

211 {
212 // destory towers
214 SetData(eventId, 0);
215 }
void SetData(uint32 type, uint32 data) override
Definition: instance_ulduar.cpp:657

References EVENT_TOWER_OF_FLAMES_DESTROYED, EVENT_TOWER_OF_LIFE_DESTROYED, and SetData().

Referenced by SetData().

◆ setChestsLootable()

void instance_ulduar::instance_ulduar_InstanceMapScript::setChestsLootable ( uint32  boss)
inline
633 {
634 if (boss)
635 {
636 switch (boss)
637 {
638 case TYPE_HODIR:
639 if (hmHodir)
640 {
642 {
643 go->RemoveGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
644 go->SetLootRecipient(instance);
645 }
646 }
648 {
649 go->RemoveGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
650 go->SetLootRecipient(instance);
651 }
652 break;
653 }
654 }
655 }
@ GO_FLAG_NOT_SELECTABLE
Definition: SharedDefines.h:1579

References Map::GetGameObject(), GO_FLAG_NOT_SELECTABLE, hmHodir, InstanceScript::instance, m_hodirHardmodeChest, m_hodirNormalChest, and TYPE_HODIR.

Referenced by SetData().

◆ SetData()

void instance_ulduar::instance_ulduar_InstanceMapScript::SetData ( uint32  type,
uint32  data 
)
inlineoverridevirtual

Reimplemented from ZoneScript.

658 {
659 switch(type)
660 {
661 case TYPE_LEVIATHAN:
662 m_auiEncounter[type] = data;
663 if (data == DONE)
664 {
665 Map::PlayerList const& pList = instance->GetPlayers();
666 for (Map::PlayerList::const_iterator itr = pList.begin(); itr != pList.end(); ++itr)
667 {
668 if (Creature* vehicleCreature = itr->GetSource()->GetVehicleCreatureBase())
669 {
670 vehicleCreature->DespawnOrUnsummon();
671 }
672 }
673 }
674 break;
675 case TYPE_IGNIS:
676 case TYPE_RAZORSCALE:
677 case TYPE_XT002:
678 case TYPE_AURIAYA:
679 case TYPE_VEZAX:
680 case TYPE_YOGGSARON:
681 case TYPE_KOLOGARN:
682 m_auiEncounter[type] = data;
683 break;
684 case TYPE_ASSEMBLY:
686 go->SetGoState(data == IN_PROGRESS ? GO_STATE_READY : GO_STATE_ACTIVE);
688 go->SetGoState(data == DONE ? GO_STATE_ACTIVE : GO_STATE_READY);
689
690 m_auiEncounter[type] = data;
691 break;
692 case TYPE_MIMIRON:
693 case TYPE_HODIR:
694 case TYPE_THORIM:
695 case TYPE_FREYA:
696 m_auiEncounter[type] = data;
697 ShowKeeperGossip(type, nullptr, m_keepersGossipGUID[type - TYPE_FREYA]);
699 {
701 go->RemoveGameObjectFlag(GO_FLAG_LOCKED);
702 }
703 if (type == TYPE_MIMIRON && data == IN_PROGRESS) // after reaching him without tram and starting the fight
704 m_mimironTramUsed = true;
705 if (GetData(TYPE_HODIR) == DONE)
707 break;
710 {
711 hmHodir = false;
712 go->Delete();
714 }
715 break;
716 case TYPE_WATCHERS:
717 m_auiEncounter[type] |= 1 << data;
718 break;
719
721 m_mageBarrier = data;
722 break;
723
728 {
729 instance->LoadGrid(364.0f, -16.0f); //make sure leviathan is loaded
731 for (uint8 i = 0; i < 2; ++i)
732 {
734 {
735 gameObject->SetGoState(GO_STATE_ACTIVE);
736 }
737 }
738 return;
739 }
740
743 return;
746 SaveToDB();
747 return;
751 m_algalonTimer = 60;
753 SaveToDB();
754 return;
760 SaveToDB();
761 return;
762 case TYPE_ALGALON:
763 m_auiEncounter[type] = data;
765 {
766 go->SetGoState(data != IN_PROGRESS ? GO_STATE_ACTIVE : GO_STATE_READY);
767 go->EnableCollision(false);
768 }
770 {
771 go->SetGoState(data != IN_PROGRESS ? GO_STATE_ACTIVE : GO_STATE_READY);
772 go->EnableCollision(false);
773 }
775 {
776 go->SetGoState(data == IN_PROGRESS ? GO_STATE_ACTIVE : GO_STATE_READY);
777 go->EnableCollision(false);
778 }
780 {
781 go->SetGoState(data == IN_PROGRESS ? GO_STATE_ACTIVE : GO_STATE_READY);
782 go->EnableCollision(false);
783 }
785 {
786 go->SetGoState(data == IN_PROGRESS ? GO_STATE_ACTIVE : GO_STATE_READY);
787 go->EnableCollision(false);
788 }
789 break;
790
791 // Achievement
795 return;
796 case DATA_CALL_TRAM:
798 if (StaticTransport* t = MimironTram->ToStaticTransport())
799 {
800 if (data == 0 && t->GetGoState() == GO_STATE_ACTIVE && t->GetPathProgress() == t->GetPauseTime())
801 MimironTram->SetGoState(GO_STATE_READY);
802 if (data == 1 && t->GetGoState() == GO_STATE_READY && t->GetPathProgress() == 0)
803 MimironTram->SetGoState(GO_STATE_ACTIVE);
804 }
805 break;
808 {
809 cr->TextEmote("Go to your vehicles!", nullptr, true);
810 }
811 break;
817 break;
818 }
819
820 // take care of herbs
821 if (type == TYPE_FREYA && data == DONE)
822 {
823 std::list<GameObject*> goList;
825 {
826 freya->GetGameObjectListWithEntryInGrid(goList, 191019 /*Adder's Tongue*/, 333.0f);
827 freya->GetGameObjectListWithEntryInGrid(goList, 190176 /*Frost Lotus*/, 333.0f);
828 freya->GetGameObjectListWithEntryInGrid(goList, 190171 /*Lichbloom*/, 333.0f);
829 freya->GetGameObjectListWithEntryInGrid(goList, 190170 /*Talandra's Rose*/, 333.0f);
830 freya->GetGameObjectListWithEntryInGrid(goList, 189973 /*Goldclover*/, 333.0f);
831
832 for (std::list<GameObject*>::const_iterator itr = goList.begin(); itr != goList.end(); ++itr)
833 (*itr)->SetRespawnTime(7 * DAY);
834 }
835 }
836
837 if (data == DONE || type == TYPE_LEVIATHAN || type == TYPE_WATCHERS)
838 SaveToDB();
839
840 if (type > TYPE_LEVIATHAN && type < TYPE_WATCHERS && data == IN_PROGRESS)
841 {
842 Map::PlayerList const& pList = instance->GetPlayers();
843 for (Map::PlayerList::const_iterator itr = pList.begin(); itr != pList.end(); ++itr)
844 {
845 if (Creature* vehicleCreature = itr->GetSource()->GetVehicleCreatureBase())
846 {
847 vehicleCreature->DespawnOrUnsummon();
848 }
849 }
850 }
851 }
@ SPELL_DWARFAGEDDON
Definition: ulduar.h:291
@ TIMER_ALGALON_DEFEATED
Definition: ulduar.h:281
@ DATA_BRANN_MEMOTESAY
Definition: ulduar.h:103
@ DATA_DESPAWN_ALGALON
Definition: ulduar.h:92
@ DATA_BRANN_EASY_MODE
Definition: ulduar.h:104
@ DATA_ALGALON_DEFEATED
Definition: ulduar.h:93
@ DATA_VEHICLE_SPAWN
Definition: ulduar.h:55
@ DATA_DWARFAGEDDON
Definition: ulduar.h:96
@ DATA_ALGALON_SUMMON_STATE
Definition: ulduar.h:91
@ TYPE_HODIR_HM_FAIL
Definition: ulduar.h:48
@ ACHIEVEMENT_TIMED_TYPE_SPELL_TARGET
Definition: DBCEnums.h:119
@ ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET
Definition: DBCEnums.h:148
Definition: LinkedList.h:139
void CancelEvent(uint32 eventId)
Definition: EventMap.cpp:190
StaticTransport * ToStaticTransport()
Definition: GameObject.h:1019
Definition: Transport.h:112
Creature * GetVehicleCreatureBase() const
Definition: Unit.cpp:19635
void DoUpdateAchievementCriteria(AchievementCriteriaTypes type, uint32 miscValue1=0, uint32 miscValue2=0, Unit *unit=nullptr)
Definition: InstanceScript.cpp:453
PlayerList const & GetPlayers() const
Definition: Map.h:484
Definition: MapRefMgr.h:26
iterator begin()
Definition: MapRefMgr.h:36
iterator end()
Definition: MapRefMgr.h:37
void ProcessEvent(WorldObject *, uint32 eventId) override
Definition: instance_ulduar.cpp:210
void SpawnLeviathanEncounterVehicles(uint8 mode)
Definition: instance_ulduar.cpp:1245
void setChestsLootable(uint32 boss)
Definition: instance_ulduar.cpp:632
ObjectGuid GetGuidData(uint32 data) const override
Definition: instance_ulduar.cpp:853

References _events, ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET, ACHIEVEMENT_TIMED_TYPE_SPELL_TARGET, MapRefMgr::begin(), EventMap::CancelEvent(), ObjectGuid::Clear(), DATA_ALGALON_DEFEATED, DATA_ALGALON_SUMMON_STATE, DATA_BRANN_EASY_MODE, DATA_BRANN_MEMOTESAY, DATA_CALL_TRAM, DATA_DESPAWN_ALGALON, DATA_DWARFAGEDDON, DATA_MAGE_BARRIER, DATA_UNBROKEN_ACHIEVEMENT, DATA_VEHICLE_SPAWN, DAY, DONE, InstanceScript::DoStartTimedAchievement(), InstanceScript::DoUpdateAchievementCriteria(), InstanceScript::DoUpdateWorldState(), MapRefMgr::end(), EVENT_TOWER_OF_FLAMES_DESTROYED, EVENT_TOWER_OF_FROST_DESTROYED, EVENT_TOWER_OF_LIFE_DESTROYED, EVENT_TOWER_OF_STORM_DESTROYED, EVENT_UPDATE_ALGALON_TIMER, Map::GetCreature(), GetData(), Map::GetGameObject(), GetGuidData(), Map::GetPlayers(), Unit::GetVehicleCreatureBase(), GO_DOODAD_UL_SIGILDOOR_03, GO_DOODAD_UL_ULDUAR_TRAPDOOR_03, GO_DOODAD_UL_UNIVERSEFLOOR_01, GO_DOODAD_UL_UNIVERSEFLOOR_02, GO_DOODAD_UL_UNIVERSEGLOBE01, GO_FLAG_LOCKED, GO_STATE_ACTIVE, GO_STATE_READY, hmHodir, IN_PROGRESS, InstanceScript::instance, Map::LoadGrid(), m_algalonTimer, m_archivumDoorsGUID, m_assemblyDoorsGUID, m_auiEncounter, m_brannBronzebeardBaseCamp, m_hodirHardmodeChest, m_keepersgateGUID, m_keepersGossipGUID, m_leviathanTowers, m_leviathanVisualTowers, m_mageBarrier, m_mimironTramGUID, m_mimironTramUsed, m_unbrokenAchievement, ProcessEvent(), EventMap::RescheduleEvent(), InstanceScript::SaveToDB(), setChestsLootable(), ShowKeeperGossip(), SpawnLeviathanEncounterVehicles(), SPELL_DWARFAGEDDON, TIMER_ALGALON_DEFEATED, TIMER_ALGALON_SUMMONED, GameObject::ToStaticTransport(), TYPE_ALGALON, TYPE_ASSEMBLY, TYPE_AURIAYA, TYPE_FREYA, TYPE_HODIR, TYPE_HODIR_HM_FAIL, TYPE_IGNIS, TYPE_KOLOGARN, TYPE_LEVIATHAN, TYPE_MIMIRON, TYPE_RAZORSCALE, TYPE_THORIM, TYPE_VEZAX, TYPE_WATCHERS, TYPE_XT002, TYPE_YOGGSARON, WORLD_STATE_ALGALON_DESPAWN_TIMER, and WORLD_STATE_ALGALON_TIMER_ENABLED.

Referenced by ProcessEvent(), and Update().

◆ ShowKeeperGossip()

void instance_ulduar::instance_ulduar_InstanceMapScript::ShowKeeperGossip ( uint8  type,
Creature cr,
ObjectGuid  guid = ObjectGuid::Empty 
)
inline
436 {
437 if (!cr)
438 {
439 cr = instance->GetCreature(guid);
440 if (!cr)
441 return;
442 }
443
444 bool on = (GetData(type) == DONE && !(GetData(TYPE_WATCHERS) & (1 << (type - TYPE_FREYA))));
445 cr->SetVisible(on);
446 }
void SetVisible(bool x)
Definition: Unit.cpp:14973

References DONE, Map::GetCreature(), GetData(), InstanceScript::instance, Unit::SetVisible(), TYPE_FREYA, and TYPE_WATCHERS.

Referenced by OnCreatureCreate(), and SetData().

◆ SpawnHodirChests()

void instance_ulduar::instance_ulduar_InstanceMapScript::SpawnHodirChests ( Difficulty  diff,
Creature hodir 
)
inline
218 {
219 switch (diff)
220 {
221 case RAID_DIFFICULTY_10MAN_NORMAL: // 10 man chest
222 {
224 {
225 if (GameObject* go = hodir->SummonGameObject(
230 normalChestPosition.GetOrientation(), 0, 0, 0, 0, 0))
231 {
232 m_hodirNormalChest = go->GetGUID();
233 go->SetGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
234 }
235 }
237 {
238 if (GameObject* go = hodir->SummonGameObject(
243 hardChestPosition.GetOrientation(), 0, 0, 0, 0, 0))
244 {
245 m_hodirHardmodeChest = go->GetGUID();
246 go->SetGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
247 hmHodir = true;
248 }
249 }
250 break;
251 }
252 case RAID_DIFFICULTY_25MAN_NORMAL: // 25 man chest
253 {
255 {
256 if (GameObject* go = hodir->SummonGameObject(
261 normalChestPosition.GetOrientation(), 0, 0, 0, 0, 0))
262 {
263 m_hodirNormalChest = go->GetGUID();
264 go->SetGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
265 }
266 }
268 {
269 if (GameObject* go = hodir->SummonGameObject(
274 hardChestPosition.GetOrientation(), 0, 0, 0, 0, 0))
275 {
276 m_hodirHardmodeChest = go->GetGUID();
277 go->SetGameObjectFlag(GO_FLAG_NOT_SELECTABLE);
278 hmHodir = true;
279 }
280 }
281 break;
282 }
283 default:
284 break;
285 }
286 }
@ GO_HODIR_CHEST_NORMAL_HERO
Definition: ulduar.h:182
@ GO_HODIR_CHEST_HARD_HERO
Definition: ulduar.h:184
@ RAID_DIFFICULTY_10MAN_NORMAL
Definition: DBCEnums.h:278
@ RAID_DIFFICULTY_25MAN_NORMAL
Definition: DBCEnums.h:279
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:2317
float GetPositionZ() const
Definition: Position.h:119
float GetOrientation() const
Definition: Position.h:120
float GetPositionY() const
Definition: Position.h:118
Position hardChestPosition
Definition: instance_ulduar.cpp:100
Position normalChestPosition
Definition: instance_ulduar.cpp:99

References Position::GetOrientation(), Position::GetPositionX(), Position::GetPositionY(), Position::GetPositionZ(), GO_FLAG_NOT_SELECTABLE, GO_HODIR_CHEST_HARD, GO_HODIR_CHEST_HARD_HERO, GO_HODIR_CHEST_NORMAL, GO_HODIR_CHEST_NORMAL_HERO, hardChestPosition, hmHodir, m_hodirHardmodeChest, m_hodirNormalChest, normalChestPosition, RAID_DIFFICULTY_10MAN_NORMAL, RAID_DIFFICULTY_25MAN_NORMAL, and WorldObject::SummonGameObject().

Referenced by OnCreatureCreate().

◆ SpawnLeviathanEncounterVehicles()

void instance_ulduar::instance_ulduar_InstanceMapScript::SpawnLeviathanEncounterVehicles ( uint8  mode)
1246{
1247 if (!_leviathanVehicles.empty())
1248 {
1249 for (ObjectGuid const& guid : _leviathanVehicles)
1250 {
1251 if (Creature* cr = instance->GetCreature(guid))
1252 {
1253 cr->DespawnOrUnsummon();
1254 }
1255 }
1256
1257 _leviathanVehicles.clear();
1258 }
1259
1260 if (mode < VEHICLE_POS_NONE)
1261 {
1262 for (uint8 i = 0; i < (instance->Is25ManRaid() ? 5 : 2); ++i)
1263 {
1265 {
1266 _leviathanVehicles.push_back(veh->GetGUID());
1267 }
1269 {
1270 _leviathanVehicles.push_back(veh->GetGUID());
1271 }
1273 {
1274 _leviathanVehicles.push_back(veh->GetGUID());
1275 }
1276 }
1277 }
1278}
const Position vehiclePositions[30]
Definition: instance_ulduar.cpp:1203
@ VEHICLE_POS_NONE
Definition: ulduar.h:259
@ NPC_SALVAGED_SIEGE_ENGINE
Definition: ulduar.h:153
@ NPC_VEHICLE_CHOPPER
Definition: ulduar.h:155
@ NPC_SALVAGED_DEMOLISHER
Definition: ulduar.h:156
Definition: ObjectGuid.h:120

References _leviathanVehicles, Map::GetCreature(), InstanceScript::instance, Map::Is25ManRaid(), NPC_SALVAGED_DEMOLISHER, NPC_SALVAGED_SIEGE_ENGINE, NPC_VEHICLE_CHOPPER, Map::SummonCreature(), VEHICLE_POS_NONE, and vehiclePositions.

Referenced by SetData().

◆ Update()

void instance_ulduar::instance_ulduar_InstanceMapScript::Update ( uint32  diff)
inlineoverridevirtual

Reimplemented from InstanceScript.

1125 {
1126 if (_events.Empty())
1127 return;
1128
1129 _events.Update(diff);
1130 switch (_events.ExecuteEvent())
1131 {
1134 {
1135 return;
1136 }
1137
1138 SaveToDB();
1140 if (m_algalonTimer)
1141 {
1142 _events.RepeatEvent(60000);
1143 return;
1144 }
1145
1148 algalon->AI()->DoAction(ACTION_DESPAWN_ALGALON);
1149 }
1150 }
@ ACTION_DESPAWN_ALGALON
Definition: ulduar.h:279
uint32 ExecuteEvent()
Definition: EventMap.cpp:114
void Update(uint32 time)
Definition: EventMap.h:54
bool Empty() const
Definition: EventMap.h:96
void RepeatEvent(uint32 time)
Definition: EventMap.cpp:99

References _events, ACTION_DESPAWN_ALGALON, DATA_ALGALON_DEFEATED, InstanceScript::DoUpdateWorldState(), EventMap::Empty(), EVENT_UPDATE_ALGALON_TIMER, EventMap::ExecuteEvent(), Map::GetCreature(), InstanceScript::instance, m_algalonTimer, m_uiAlgalonGUID, EventMap::RepeatEvent(), InstanceScript::SaveToDB(), SetData(), TIMER_ALGALON_DEFEATED, EventMap::Update(), and WORLD_STATE_ALGALON_DESPAWN_TIMER.

Member Data Documentation

◆ _events

EventMap instance_ulduar::instance_ulduar_InstanceMapScript::_events

◆ _leviathanVehicles

GuidList instance_ulduar::instance_ulduar_InstanceMapScript::_leviathanVehicles

◆ C_of_Ulduar_MASK

uint32 instance_ulduar::instance_ulduar_InstanceMapScript::C_of_Ulduar_MASK

◆ hardChestPosition

Position instance_ulduar::instance_ulduar_InstanceMapScript::hardChestPosition = { 2035.94600f, -202.084885f, 432.686859f, 3.164077f }

Referenced by SpawnHodirChests().

◆ hmHodir

bool instance_ulduar::instance_ulduar_InstanceMapScript::hmHodir

◆ KologarnDoorGUID

ObjectGuid instance_ulduar::instance_ulduar_InstanceMapScript::KologarnDoorGUID

Referenced by GetGuidData(), and OnGameObjectCreate().

◆ m_algalonFloorGUID

ObjectGuid instance_ulduar::instance_ulduar_InstanceMapScript::m_algalonFloorGUID[2]

Referenced by GetGuidData(), and OnGameObjectCreate().

◆ m_algalonSigilDoorGUID

ObjectGuid instance_ulduar::instance_ulduar_InstanceMapScript::m_algalonSigilDoorGUID[3]

Referenced by GetGuidData(), and OnGameObjectCreate().

◆ m_algalonTimer

uint32 instance_ulduar::instance_ulduar_InstanceMapScript::m_algalonTimer

◆ m_algalonTrapdoorGUID

ObjectGuid instance_ulduar::instance_ulduar_InstanceMapScript::m_algalonTrapdoorGUID

Referenced by GetGuidData(), and OnGameObjectCreate().

◆ m_algalonUniverseGUID

ObjectGuid instance_ulduar::instance_ulduar_InstanceMapScript::m_algalonUniverseGUID

Referenced by GetGuidData(), and OnGameObjectCreate().

◆ m_archivumDoorsGUID

ObjectGuid instance_ulduar::instance_ulduar_InstanceMapScript::m_archivumDoorsGUID

Referenced by OnGameObjectCreate(), and SetData().

◆ m_assemblyDoorsGUID

ObjectGuid instance_ulduar::instance_ulduar_InstanceMapScript::m_assemblyDoorsGUID

Referenced by OnGameObjectCreate(), and SetData().

◆ m_auiAssemblyGUIDs

ObjectGuid instance_ulduar::instance_ulduar_InstanceMapScript::m_auiAssemblyGUIDs[3]

Referenced by GetGuidData(), and OnCreatureCreate().

◆ m_auiEncounter

uint32 instance_ulduar::instance_ulduar_InstanceMapScript::m_auiEncounter[MAX_ENCOUNTER]

◆ m_brannBronzebeardAlgGUID

ObjectGuid instance_ulduar::instance_ulduar_InstanceMapScript::m_brannBronzebeardAlgGUID

◆ m_brannBronzebeardBaseCamp

ObjectGuid instance_ulduar::instance_ulduar_InstanceMapScript::m_brannBronzebeardBaseCamp

Referenced by OnCreatureCreate(), and SetData().

◆ m_conspeedatoryAttempt

uint32 instance_ulduar::instance_ulduar_InstanceMapScript::m_conspeedatoryAttempt

◆ m_difficulty

int instance_ulduar::instance_ulduar_InstanceMapScript::m_difficulty

◆ m_FreyaElder

ObjectGuid instance_ulduar::instance_ulduar_InstanceMapScript::m_FreyaElder[3]

Referenced by GetGuidData(), and OnCreatureCreate().

◆ m_hodirHardmodeChest

ObjectGuid instance_ulduar::instance_ulduar_InstanceMapScript::m_hodirHardmodeChest

◆ m_hodirNormalChest

ObjectGuid instance_ulduar::instance_ulduar_InstanceMapScript::m_hodirNormalChest

◆ m_keepersgateGUID

ObjectGuid instance_ulduar::instance_ulduar_InstanceMapScript::m_keepersgateGUID

Referenced by OnGameObjectCreate(), and SetData().

◆ m_keepersGossipGUID

ObjectGuid instance_ulduar::instance_ulduar_InstanceMapScript::m_keepersGossipGUID[4]

Referenced by OnCreatureCreate(), and SetData().

◆ m_leviathanDoorsGUID

ObjectGuid instance_ulduar::instance_ulduar_InstanceMapScript::m_leviathanDoorsGUID

Referenced by GetGuidData(), and OnGameObjectCreate().

◆ m_leviathanTowers

bool instance_ulduar::instance_ulduar_InstanceMapScript::m_leviathanTowers[4]

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

◆ m_leviathanVisualTowers

ObjectGuid instance_ulduar::instance_ulduar_InstanceMapScript::m_leviathanVisualTowers[4][2]

Referenced by OnGameObjectCreate(), and SetData().

◆ m_lightningWalls

ObjectGuid instance_ulduar::instance_ulduar_InstanceMapScript::m_lightningWalls[2]

Referenced by GetGuidData(), and OnGameObjectCreate().

◆ m_mageBarrier

uint32 instance_ulduar::instance_ulduar_InstanceMapScript::m_mageBarrier

◆ m_MimironACUguid

ObjectGuid instance_ulduar::instance_ulduar_InstanceMapScript::m_MimironACUguid

Referenced by GetGuidData(), and OnCreatureCreate().

◆ m_MimironDoor

ObjectGuid instance_ulduar::instance_ulduar_InstanceMapScript::m_MimironDoor[3]

Referenced by GetGuidData(), and OnGameObjectCreate().

◆ m_MimironLeviathanMKIIguid

ObjectGuid instance_ulduar::instance_ulduar_InstanceMapScript::m_MimironLeviathanMKIIguid

Referenced by GetGuidData(), and OnCreatureCreate().

◆ m_mimironTramGUID

ObjectGuid instance_ulduar::instance_ulduar_InstanceMapScript::m_mimironTramGUID

◆ m_mimironTramUsed

bool instance_ulduar::instance_ulduar_InstanceMapScript::m_mimironTramUsed

◆ m_MimironVX001guid

ObjectGuid instance_ulduar::instance_ulduar_InstanceMapScript::m_MimironVX001guid

Referenced by GetGuidData(), and OnCreatureCreate().

◆ m_RazorscaleHarpoonFireStateGUID

ObjectGuid instance_ulduar::instance_ulduar_InstanceMapScript::m_RazorscaleHarpoonFireStateGUID[4]

Referenced by GetGuidData(), and OnCreatureCreate().

◆ m_RepairSGUID

ObjectGuid instance_ulduar::instance_ulduar_InstanceMapScript::m_RepairSGUID[2]

Referenced by GetGuidData(), and OnGameObjectCreate().

◆ m_saraGUID

ObjectGuid instance_ulduar::instance_ulduar_InstanceMapScript::m_saraGUID

Referenced by GetGuidData(), and OnCreatureCreate().

◆ m_thorimGameobjectsGUID

ObjectGuid instance_ulduar::instance_ulduar_InstanceMapScript::m_thorimGameobjectsGUID[5]

Referenced by GetGuidData(), and OnGameObjectCreate().

◆ m_uiAlgalonGUID

ObjectGuid instance_ulduar::instance_ulduar_InstanceMapScript::m_uiAlgalonGUID

◆ m_uiAuriayaGUID

ObjectGuid instance_ulduar::instance_ulduar_InstanceMapScript::m_uiAuriayaGUID

Referenced by GetGuidData(), and OnCreatureCreate().

◆ m_uiFreyaGUID

ObjectGuid instance_ulduar::instance_ulduar_InstanceMapScript::m_uiFreyaGUID

Referenced by GetGuidData(), and OnCreatureCreate().

◆ m_uiHodirGUID

ObjectGuid instance_ulduar::instance_ulduar_InstanceMapScript::m_uiHodirGUID

Referenced by GetGuidData(), and OnCreatureCreate().

◆ m_uiIgnisGUID

ObjectGuid instance_ulduar::instance_ulduar_InstanceMapScript::m_uiIgnisGUID

Referenced by GetGuidData(), and OnCreatureCreate().

◆ m_uiKologarnGUID

ObjectGuid instance_ulduar::instance_ulduar_InstanceMapScript::m_uiKologarnGUID

Referenced by GetGuidData(), and OnCreatureCreate().

◆ m_uiLeviathanGUID

ObjectGuid instance_ulduar::instance_ulduar_InstanceMapScript::m_uiLeviathanGUID

◆ m_uiMimironGUID

ObjectGuid instance_ulduar::instance_ulduar_InstanceMapScript::m_uiMimironGUID

Referenced by GetGuidData(), and OnCreatureCreate().

◆ m_uiRazorscaleGUID

ObjectGuid instance_ulduar::instance_ulduar_InstanceMapScript::m_uiRazorscaleGUID

Referenced by GetGuidData(), and OnCreatureCreate().

◆ m_uiThorimGUID

ObjectGuid instance_ulduar::instance_ulduar_InstanceMapScript::m_uiThorimGUID

Referenced by GetGuidData(), and OnCreatureCreate().

◆ m_uiVezaxGUID

ObjectGuid instance_ulduar::instance_ulduar_InstanceMapScript::m_uiVezaxGUID

Referenced by GetGuidData(), and OnCreatureCreate().

◆ m_uiXT002GUID

ObjectGuid instance_ulduar::instance_ulduar_InstanceMapScript::m_uiXT002GUID

Referenced by GetGuidData(), and OnCreatureCreate().

◆ m_uiYoggSaronGUID

ObjectGuid instance_ulduar::instance_ulduar_InstanceMapScript::m_uiYoggSaronGUID

Referenced by GetGuidData(), and OnCreatureCreate().

◆ m_unbrokenAchievement

uint32 instance_ulduar::instance_ulduar_InstanceMapScript::m_unbrokenAchievement

◆ m_xt002DoorsGUID

ObjectGuid instance_ulduar::instance_ulduar_InstanceMapScript::m_xt002DoorsGUID

Referenced by GetGuidData(), and OnGameObjectCreate().

◆ m_yoggsaronBrainGUID

ObjectGuid instance_ulduar::instance_ulduar_InstanceMapScript::m_yoggsaronBrainGUID

Referenced by GetGuidData(), and OnCreatureCreate().

◆ m_yoggsaronDoorsGUID

ObjectGuid instance_ulduar::instance_ulduar_InstanceMapScript::m_yoggsaronDoorsGUID

Referenced by GetGuidData(), and OnGameObjectCreate().

◆ normalChestPosition

Position instance_ulduar::instance_ulduar_InstanceMapScript::normalChestPosition = { 1967.152588f, -204.188461f, 432.686951f, 5.50957f }

Referenced by SpawnHodirChests().