TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
instance_ulduar::instance_ulduar_InstanceMapScript Struct Reference

Public Member Functions

 instance_ulduar_InstanceMapScript (InstanceMap *map)
 
void FillInitialWorldStates (WorldPackets::WorldState::InitWorldStates &packet) override
 
void OnPlayerEnter (Player *player) override
 
void OnCreatureCreate (Creature *creature) override
 
void OnCreatureRemove (Creature *creature) override
 
void OnGameObjectCreate (GameObject *gameObject) override
 
void OnGameObjectRemove (GameObject *gameObject) override
 
void OnUnitDeath (Unit *unit) override
 
void ProcessEvent (WorldObject *, uint32 eventId) override
 
bool SetBossState (uint32 type, EncounterState state) override
 
void SetData (uint32 type, uint32 data) override
 
void SetGuidData (uint32, ObjectGuid) override
 
ObjectGuid GetGuidData (uint32 data) const override
 
uint32 GetData (uint32 type) const override
 
bool CheckAchievementCriteriaMeet (uint32 criteriaId, Player const *, Unit const *, uint32) override
 
void WriteSaveDataMore (std::ostringstream &data) override
 
void ReadSaveDataMore (std::istringstream &data) override
 
void Update (uint32 diff) override
 
void UpdateDoorState (GameObject *door) override
 
void AddDoor (GameObject *door, bool add) override
 
- Public Member Functions inherited from InstanceScript
 InstanceScript (Map *map)
 
virtual ~InstanceScript ()
 
virtual void Initialize ()
 
virtual void Load (char const *data)
 
virtual std::string GetSaveData ()
 
void SaveToDB ()
 
virtual bool IsEncounterInProgress () const
 
ObjectGuid GetObjectGuid (uint32 type) const
 
CreatureGetCreature (uint32 type)
 
GameObjectGetGameObject (uint32 type)
 
void HandleGameObject (ObjectGuid guid, bool open, GameObject *go=nullptr)
 
void DoUseDoorOrButton (ObjectGuid guid, uint32 withRestoreTime=0, bool useAlternativeState=false)
 
void DoCloseDoorOrButton (ObjectGuid guid)
 
void DoRespawnGameObject (ObjectGuid guid, uint32 timeToDespawn=MINUTE)
 
void DoUpdateWorldState (uint32 worldstateId, uint32 worldstateValue)
 
void DoSendNotifyToInstance (char const *format,...)
 
void DoUpdateAchievementCriteria (AchievementCriteriaTypes type, uint32 miscValue1=0, uint32 miscValue2=0, Unit *unit=NULL)
 
void DoStartTimedAchievement (AchievementCriteriaTimedTypes type, uint32 entry)
 
void DoStopTimedAchievement (AchievementCriteriaTimedTypes type, uint32 entry)
 
void DoRemoveAurasDueToSpellOnPlayers (uint32 spell)
 
void DoCastSpellOnPlayers (uint32 spell)
 
bool ServerAllowsTwoSideGroups ()
 
EncounterState GetBossState (uint32 id) const
 
CreatureBoundary constGetBossBoundary (uint32 id) const
 
virtual bool CheckRequiredBosses (uint32, Player const *=nullptr) const
 
void UpdateEncounterState (EncounterCreditType type, uint32 creditEntry, Unit *source)
 
void SetCompletedEncountersMask (uint32 newMask)
 
uint32 GetCompletedEncounterMask () const
 
void SendEncounterUnit (uint32 type, Unit *unit=NULL, uint8 param1=0, uint8 param2=0)
 
void UpdatePhasing ()
 
uint32 GetEncounterCount () 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 uint64 GetData64 (uint32) const
 
virtual void SetData64 (uint32, uint64)
 

Public Attributes

ObjectGuid LeviathanGUID
 
GuidVector LeviathanVehicleGUIDs
 
ObjectGuid IgnisGUID
 
ObjectGuid RazorscaleGUID
 
ObjectGuid RazorscaleController
 
ObjectGuid ExpeditionCommanderGUID
 
ObjectGuid XT002GUID
 
ObjectGuid XTToyPileGUIDs [4]
 
ObjectGuid AssemblyGUIDs [3]
 
ObjectGuid KologarnGUID
 
ObjectGuid AuriayaGUID
 
ObjectGuid HodirGUID
 
ObjectGuid ThorimGUID
 
ObjectGuid FreyaGUID
 
ObjectGuid ElderGUIDs [3]
 
ObjectGuid FreyaAchieveTriggerGUID
 
ObjectGuid MimironGUID
 
ObjectGuid MimironVehicleGUIDs [3]
 
ObjectGuid MimironComputerGUID
 
ObjectGuid MimironWorldTriggerGUID
 
ObjectGuid VezaxGUID
 
ObjectGuid YoggSaronGUID
 
ObjectGuid VoiceOfYoggSaronGUID
 
ObjectGuid SaraGUID
 
ObjectGuid BrainOfYoggSaronGUID
 
ObjectGuid KeeperGUIDs [4]
 
ObjectGuid AlgalonGUID
 
ObjectGuid BrannBronzebeardAlgGUID
 
ObjectGuid LeviathanGateGUID
 
ObjectGuid RazorHarpoonGUIDs [4]
 
ObjectGuid KologarnChestGUID
 
ObjectGuid KologarnBridgeGUID
 
ObjectGuid ThorimChestGUID
 
ObjectGuid HodirRareCacheGUID
 
ObjectGuid HodirChestGUID
 
ObjectGuid MimironTramGUID
 
ObjectGuid MimironElevatorGUID
 
ObjectGuid MimironButtonGUID
 
ObjectGuid BrainRoomDoorGUIDs [3]
 
ObjectGuid AlgalonSigilDoorGUID [3]
 
ObjectGuid AlgalonFloorGUID [2]
 
ObjectGuid AlgalonUniverseGUID
 
ObjectGuid AlgalonTrapdoorGUID
 
ObjectGuid GiftOfTheObserverGUID
 
uint32 TeamInInstance
 
uint32 HodirRareCacheData
 
uint32 ColossusData
 
uint8 elderCount
 
uint8 illusion
 
uint8 keepersCount
 
bool conSpeedAtory
 
bool lumberjacked
 
bool Unbroken
 
bool IsDriveMeCrazyEligible
 
- Public Attributes inherited from InstanceScript
Mapinstance
 

Private Attributes

EventMap _events
 
uint32 _algalonTimer
 
bool _summonAlgalon
 
bool _algalonSummoned
 
bool _summonObservationRingKeeper [4]
 
bool _summonYSKeeper [4]
 
uint32 _maxArmorItemLevel
 
uint32 _maxWeaponItemLevel
 
uint32 _CoUAchivePlayerDeathMask
 

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 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 AddMinion (Creature *minion, bool add)
 
void UpdateMinionState (Creature *minion, EncounterState state)
 
BossInfoGetBossInfo (uint32 id)
 
bool ReadSaveDataHeaders (std::istringstream &data)
 
void ReadSaveDataBossStates (std::istringstream &data)
 
void WriteSaveDataHeaders (std::ostringstream &data)
 
void WriteSaveDataBossStates (std::ostringstream &data)
 
bool _SkipCheckRequiredBosses (Player const *player=nullptr) const
 

Constructor & Destructor Documentation

instance_ulduar::instance_ulduar_InstanceMapScript::instance_ulduar_InstanceMapScript ( InstanceMap map)
inline
90  : InstanceScript(map)
91  {
97  LoadObjectData(creatureData, nullptr);
98 
99  _algalonTimer = 61;
100  _maxArmorItemLevel = 0;
102  TeamInInstance = 0;
103  HodirRareCacheData = 0;
104  ColossusData = 0;
105  elderCount = 0;
106  illusion = 0;
107  keepersCount = 0;
108  conSpeedAtory = false;
109  lumberjacked = false;
110  Unbroken = true;
111  IsDriveMeCrazyEligible = true;
112  _algalonSummoned = false;
113  _summonAlgalon = false;
115 
117  memset(_summonYSKeeper, 0, sizeof(_summonYSKeeper));
118  }
uint8 illusion
Definition: instance_ulduar.cpp:173
MinionData const minionData[]
Definition: instance_ulduar.cpp:66
void SetBossNumber(uint32 number)
Definition: InstanceScript.h:258
bool conSpeedAtory
Definition: instance_ulduar.cpp:175
bool Unbroken
Definition: instance_ulduar.cpp:177
uint8 elderCount
Definition: instance_ulduar.cpp:172
bool _summonAlgalon
Definition: instance_ulduar.cpp:1237
void SetHeaders(std::string const &dataHeaders)
Definition: InstanceScript.cpp:98
ObjectData const creatureData[]
Definition: instance_ulduar.cpp:74
#define DataHeader
Definition: baradin_hold.h:25
ColossusData
Definition: boss_drakkari_colossus.cpp:67
bool lumberjacked
Definition: instance_ulduar.cpp:176
InstanceScript(Map *map)
Definition: InstanceScript.h:144
void LoadMinionData(MinionData const *data)
Definition: InstanceScript.cpp:112
uint32 TeamInInstance
Definition: instance_ulduar.cpp:169
uint32 _CoUAchivePlayerDeathMask
Definition: instance_ulduar.cpp:1243
bool IsDriveMeCrazyEligible
Definition: instance_ulduar.cpp:178
#define MAX_ENCOUNTER
Definition: instance_blackrock_depths.cpp:25
bool _summonObservationRingKeeper[4]
Definition: instance_ulduar.cpp:1239
uint32 _algalonTimer
Definition: instance_ulduar.cpp:1236
bool _algalonSummoned
Definition: instance_ulduar.cpp:1238
void LoadDoorData(DoorData const *data)
Definition: InstanceScript.cpp:124
uint32 HodirRareCacheData
Definition: instance_ulduar.cpp:170
void LoadBossBoundaries(BossBoundaryData const &data)
Definition: InstanceScript.cpp:105
static BossBoundaryData const boundaries
Definition: instance_ulduar.cpp:27
void LoadObjectData(ObjectData const *creatureData, ObjectData const *gameObjectData)
Definition: InstanceScript.cpp:136
uint32 _maxWeaponItemLevel
Definition: instance_ulduar.cpp:1242
uint8 keepersCount
Definition: instance_ulduar.cpp:174
bool _summonYSKeeper[4]
Definition: instance_ulduar.cpp:1240
static DoorData const doorData[]
Definition: instance_ulduar.cpp:44
uint32 _maxArmorItemLevel
Definition: instance_ulduar.cpp:1241

+ Here is the call graph for this function:

Member Function Documentation

void instance_ulduar::instance_ulduar_InstanceMapScript::AddDoor ( GameObject door,
bool  add 
)
inlineoverridevirtual

Reimplemented from InstanceScript.

1217  {
1218  // Leviathan doors are South except the one it uses to enter the room
1219  // which is North and should not be used for boundary checks in BossAI::CheckBoundary()
1220  if (door->GetEntry() == GO_LEVIATHAN_DOOR && door->GetPositionX() > 400.f)
1221  {
1222  if (add)
1224  else
1226 
1227  if (add)
1228  UpdateDoorState(door);
1229  }
1230  else
1231  InstanceScript::AddDoor(door, add);
1232  }
Definition: InstanceScript.h:69
Definition: ulduar.h:32
GuidSet door[MAX_DOOR_TYPES]
Definition: InstanceScript.h:115
Definition: ulduar.h:203
BossInfo * GetBossInfo(uint32 id)
Definition: InstanceScript.cpp:207
void UpdateDoorState(GameObject *door) override
Definition: instance_ulduar.cpp:1206
ObjectGuid const & GetGUID() const
Definition: Object.h:105
uint32 GetEntry() const
Definition: Object.h:107
float GetPositionX() const
Definition: Position.h:104
virtual void AddDoor(GameObject *door, bool add)
Definition: InstanceScript.cpp:239

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Reimplemented from InstanceScript.

1033  {
1034  switch (criteriaId)
1035  {
1040  return illusion == STORMWIND_ILLUSION;
1043  return illusion == CHAMBER_ILLUSION;
1046  return illusion == ICECROWN_ILLUSION;
1049  return IsDriveMeCrazyEligible;
1052  return keepersCount <= 3;
1055  return keepersCount <= 2;
1058  return keepersCount <= 1;
1061  return keepersCount == 0;
1064  return (_CoUAchivePlayerDeathMask & (1 << BOSS_LEVIATHAN)) == 0;
1067  return (_CoUAchivePlayerDeathMask & (1 << BOSS_IGNIS)) == 0;
1070  return (_CoUAchivePlayerDeathMask & (1 << BOSS_RAZORSCALE)) == 0;
1073  return (_CoUAchivePlayerDeathMask & (1 << BOSS_XT002)) == 0;
1076  return (_CoUAchivePlayerDeathMask & (1 << BOSS_ASSEMBLY_OF_IRON)) == 0;
1079  return (_CoUAchivePlayerDeathMask & (1 << BOSS_KOLOGARN)) == 0;
1082  return (_CoUAchivePlayerDeathMask & (1 << BOSS_AURIAYA)) == 0;
1085  return (_CoUAchivePlayerDeathMask & (1 << BOSS_HODIR)) == 0;
1088  return (_CoUAchivePlayerDeathMask & (1 << BOSS_THORIM)) == 0;
1091  return (_CoUAchivePlayerDeathMask & (1 << BOSS_FREYA)) == 0;
1094  return (_CoUAchivePlayerDeathMask & (1 << BOSS_MIMIRON)) == 0;
1097  return (_CoUAchivePlayerDeathMask & (1 << BOSS_VEZAX)) == 0;
1100  return (_CoUAchivePlayerDeathMask & (1 << BOSS_YOGG_SARON)) == 0;
1101  }
1102 
1103  return false;
1104  }
Definition: ulduar.h:300
Definition: ulduar.h:36
Definition: ulduar.h:41
Definition: ulduar.h:327
Definition: ulduar.h:320
Definition: ulduar.h:420
Definition: ulduar.h:299
Definition: ulduar.h:40
Definition: ulduar.h:329
Definition: ulduar.h:315
uint8 illusion
Definition: instance_ulduar.cpp:173
Definition: ulduar.h:323
Definition: ulduar.h:339
Definition: ulduar.h:302
Definition: ulduar.h:38
Definition: ulduar.h:318
Definition: ulduar.h:32
Definition: ulduar.h:326
Definition: ulduar.h:33
Definition: ulduar.h:436
Definition: ulduar.h:324
Definition: ulduar.h:39
Definition: ulduar.h:304
Definition: ulduar.h:337
Definition: ulduar.h:341
Definition: ulduar.h:43
Definition: ulduar.h:328
Definition: ulduar.h:342
Definition: ulduar.h:321
Definition: ulduar.h:421
Definition: ulduar.h:34
Definition: ulduar.h:314
Definition: ulduar.h:301
Definition: ulduar.h:330
Definition: ulduar.h:303
Definition: ulduar.h:437
Definition: ulduar.h:332
Definition: ulduar.h:313
Definition: ulduar.h:306
Definition: ulduar.h:322
Definition: ulduar.h:35
Definition: ulduar.h:305
Definition: ulduar.h:333
Definition: ulduar.h:336
Definition: ulduar.h:325
uint32 _CoUAchivePlayerDeathMask
Definition: instance_ulduar.cpp:1243
Definition: ulduar.h:319
bool IsDriveMeCrazyEligible
Definition: instance_ulduar.cpp:178
Definition: ulduar.h:438
Definition: ulduar.h:338
Definition: ulduar.h:344
Definition: ulduar.h:44
Definition: ulduar.h:340
Definition: ulduar.h:335
Definition: ulduar.h:343
Definition: ulduar.h:42
uint32 _maxWeaponItemLevel
Definition: instance_ulduar.cpp:1242
uint8 keepersCount
Definition: instance_ulduar.cpp:174
Definition: ulduar.h:37
uint32 _maxArmorItemLevel
Definition: instance_ulduar.cpp:1241
Definition: ulduar.h:334
void instance_ulduar::instance_ulduar_InstanceMapScript::FillInitialWorldStates ( WorldPackets::WorldState::InitWorldStates packet)
inlineoverridevirtual

Reimplemented from InstanceScript.

181  {
183  packet.Worldstates.emplace_back(uint32(WORLD_STATE_ALGALON_DESPAWN_TIMER), int32(std::min<uint32>(_algalonTimer, 60)));
184  }
std::list< WorldStateInfo > Worldstates
Definition: WorldStatePackets.h:47
Definition: ulduar.h:412
Definition: ulduar.h:413
uint32 _algalonTimer
Definition: instance_ulduar.cpp:1236
int32_t int32
Definition: g3dmath.h:167
uint32_t uint32
Definition: g3dmath.h:168
uint32 instance_ulduar::instance_ulduar_InstanceMapScript::GetData ( uint32  type) const
inlineoverridevirtual

Reimplemented from ZoneScript.

1012  {
1013  switch (type)
1014  {
1015  case DATA_COLOSSUS:
1016  return ColossusData;
1017  case DATA_HODIR_RARE_CACHE:
1018  return HodirRareCacheData;
1019  case DATA_UNBROKEN:
1020  return uint32(Unbroken);
1021  case DATA_ILLUSION:
1022  return illusion;
1023  case DATA_KEEPERS_COUNT:
1024  return keepersCount;
1025  default:
1026  break;
1027  }
1028 
1029  return 0;
1030  }
uint8 illusion
Definition: instance_ulduar.cpp:173
Definition: ulduar.h:419
bool Unbroken
Definition: instance_ulduar.cpp:177
uint32 ColossusData
Definition: instance_ulduar.cpp:171
Definition: ulduar.h:350
Definition: ulduar.h:388
Definition: ulduar.h:368
uint32 HodirRareCacheData
Definition: instance_ulduar.cpp:170
uint32_t uint32
Definition: g3dmath.h:168
Definition: ulduar.h:390
uint8 keepersCount
Definition: instance_ulduar.cpp:174

+ Here is the caller graph for this function:

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

Reimplemented from InstanceScript.

882  {
883  switch (data)
884  {
885  case BOSS_LEVIATHAN:
886  return LeviathanGUID;
887  case BOSS_IGNIS:
888  return IgnisGUID;
889 
890  // Razorscale
891  case BOSS_RAZORSCALE:
892  return RazorscaleGUID;
894  return RazorscaleController;
897  case GO_RAZOR_HARPOON_1:
898  return RazorHarpoonGUIDs[0];
899  case GO_RAZOR_HARPOON_2:
900  return RazorHarpoonGUIDs[1];
901  case GO_RAZOR_HARPOON_3:
902  return RazorHarpoonGUIDs[2];
903  case GO_RAZOR_HARPOON_4:
904  return RazorHarpoonGUIDs[3];
905 
906  // XT-002 Deconstructor
907  case BOSS_XT002:
908  return XT002GUID;
909  case DATA_TOY_PILE_0:
910  case DATA_TOY_PILE_1:
911  case DATA_TOY_PILE_2:
912  case DATA_TOY_PILE_3:
913  return XTToyPileGUIDs[data - DATA_TOY_PILE_0];
914 
915  // Assembly of Iron
916  case DATA_STEELBREAKER:
917  return AssemblyGUIDs[0];
918  case DATA_MOLGEIM:
919  return AssemblyGUIDs[1];
920  case DATA_BRUNDIR:
921  return AssemblyGUIDs[2];
922 
923  case BOSS_KOLOGARN:
924  return KologarnGUID;
925  case BOSS_AURIAYA:
926  return AuriayaGUID;
927  case BOSS_HODIR:
928  return HodirGUID;
929  case BOSS_THORIM:
930  return ThorimGUID;
931 
932  // Freya
933  case BOSS_FREYA:
934  return FreyaGUID;
935  case BOSS_BRIGHTLEAF:
936  return ElderGUIDs[0];
937  case BOSS_IRONBRANCH:
938  return ElderGUIDs[1];
939  case BOSS_STONEBARK:
940  return ElderGUIDs[2];
941 
942  // Mimiron
943  case BOSS_MIMIRON:
944  return MimironGUID;
946  return MimironVehicleGUIDs[0];
947  case DATA_VX_001:
948  return MimironVehicleGUIDs[1];
950  return MimironVehicleGUIDs[2];
951  case DATA_COMPUTER:
952  return MimironComputerGUID;
956  return MimironElevatorGUID;
957  case DATA_MIMIRON_BUTTON:
958  return MimironButtonGUID;
959 
960  case BOSS_VEZAX:
961  return VezaxGUID;
962 
963  // Yogg-Saron
964  case BOSS_YOGG_SARON:
965  return YoggSaronGUID;
967  return VoiceOfYoggSaronGUID;
969  return BrainOfYoggSaronGUID;
970  case DATA_SARA:
971  return SaraGUID;
973  return BrainRoomDoorGUIDs[0];
975  return BrainRoomDoorGUIDs[1];
977  return BrainRoomDoorGUIDs[2];
978  case DATA_FREYA_YS:
979  return KeeperGUIDs[0];
980  case DATA_HODIR_YS:
981  return KeeperGUIDs[1];
982  case DATA_THORIM_YS:
983  return KeeperGUIDs[2];
984  case DATA_MIMIRON_YS:
985  return KeeperGUIDs[3];
986 
987  // Algalon
988  case BOSS_ALGALON:
989  return AlgalonGUID;
990  case DATA_SIGILDOOR_01:
991  return AlgalonSigilDoorGUID[0];
992  case DATA_SIGILDOOR_02:
993  return AlgalonSigilDoorGUID[1];
994  case DATA_SIGILDOOR_03:
995  return AlgalonSigilDoorGUID[2];
997  return AlgalonFloorGUID[0];
999  return AlgalonFloorGUID[1];
1000  case DATA_UNIVERSE_GLOBE:
1001  return AlgalonUniverseGUID;
1002  case DATA_ALGALON_TRAPDOOR:
1003  return AlgalonTrapdoorGUID;
1005  return BrannBronzebeardAlgGUID;
1006  }
1007 
1008  return ObjectGuid::Empty;
1009  }
ObjectGuid RazorscaleGUID
Definition: instance_ulduar.cpp:124
Definition: ulduar.h:386
Definition: ulduar.h:41
Definition: ulduar.h:364
Definition: ulduar.h:371
Definition: ulduar.h:382
Definition: ulduar.h:373
Definition: ulduar.h:40
Definition: ulduar.h:363
static ObjectGuid const Empty
Definition: ObjectGuid.h:196
ObjectGuid MimironComputerGUID
Definition: instance_ulduar.cpp:139
Definition: ulduar.h:384
Definition: ulduar.h:210
ObjectGuid FreyaGUID
Definition: instance_ulduar.cpp:134
Definition: ulduar.h:399
Definition: ulduar.h:353
Definition: ulduar.h:38
ObjectGuid MimironButtonGUID
Definition: instance_ulduar.cpp:160
Definition: ulduar.h:394
ObjectGuid ThorimGUID
Definition: instance_ulduar.cpp:133
Definition: ulduar.h:385
Definition: ulduar.h:32
ObjectGuid MimironWorldTriggerGUID
Definition: instance_ulduar.cpp:140
Definition: ulduar.h:33
ObjectGuid LeviathanGUID
Definition: instance_ulduar.cpp:121
ObjectGuid IgnisGUID
Definition: instance_ulduar.cpp:123
Definition: ulduar.h:359
Definition: ulduar.h:397
Definition: ulduar.h:39
Definition: ulduar.h:209
ObjectGuid AuriayaGUID
Definition: instance_ulduar.cpp:131
ObjectGuid XTToyPileGUIDs[4]
Definition: instance_ulduar.cpp:128
ObjectGuid AlgalonGUID
Definition: instance_ulduar.cpp:147
Definition: ulduar.h:43
Definition: ulduar.h:400
Definition: ulduar.h:387
Definition: ulduar.h:34
Definition: ulduar.h:48
ObjectGuid SaraGUID
Definition: instance_ulduar.cpp:144
Definition: ulduar.h:374
ObjectGuid ExpeditionCommanderGUID
Definition: instance_ulduar.cpp:126
Definition: ulduar.h:45
ObjectGuid XT002GUID
Definition: instance_ulduar.cpp:127
Definition: ulduar.h:208
Definition: ulduar.h:360
Definition: ulduar.h:383
Definition: ulduar.h:401
Definition: ulduar.h:258
Definition: ulduar.h:35
Definition: ulduar.h:46
Definition: ulduar.h:257
Definition: ulduar.h:211
Definition: ulduar.h:259
ObjectGuid AlgalonSigilDoorGUID[3]
Definition: instance_ulduar.cpp:162
ObjectGuid MimironElevatorGUID
Definition: instance_ulduar.cpp:159
Definition: ulduar.h:358
Definition: ulduar.h:395
Definition: ulduar.h:372
Definition: ulduar.h:47
ObjectGuid RazorscaleController
Definition: instance_ulduar.cpp:125
ObjectGuid ElderGUIDs[3]
Definition: instance_ulduar.cpp:135
ObjectGuid MimironVehicleGUIDs[3]
Definition: instance_ulduar.cpp:138
ObjectGuid RazorHarpoonGUIDs[4]
Definition: instance_ulduar.cpp:152
Definition: ulduar.h:381
ObjectGuid BrannBronzebeardAlgGUID
Definition: instance_ulduar.cpp:148
Definition: ulduar.h:396
ObjectGuid MimironGUID
Definition: instance_ulduar.cpp:137
ObjectGuid KeeperGUIDs[4]
Definition: instance_ulduar.cpp:146
ObjectGuid BrainRoomDoorGUIDs[3]
Definition: instance_ulduar.cpp:161
ObjectGuid BrainOfYoggSaronGUID
Definition: instance_ulduar.cpp:145
ObjectGuid YoggSaronGUID
Definition: instance_ulduar.cpp:142
ObjectGuid AssemblyGUIDs[3]
Definition: instance_ulduar.cpp:129
Definition: ulduar.h:44
ObjectGuid VezaxGUID
Definition: instance_ulduar.cpp:141
ObjectGuid VoiceOfYoggSaronGUID
Definition: instance_ulduar.cpp:143
Definition: ulduar.h:354
Definition: ulduar.h:365
Definition: ulduar.h:375
Definition: ulduar.h:42
ObjectGuid HodirGUID
Definition: instance_ulduar.cpp:132
ObjectGuid AlgalonTrapdoorGUID
Definition: instance_ulduar.cpp:165
Definition: ulduar.h:357
ObjectGuid AlgalonUniverseGUID
Definition: instance_ulduar.cpp:164
Definition: ulduar.h:398
Definition: ulduar.h:376
ObjectGuid AlgalonFloorGUID[2]
Definition: instance_ulduar.cpp:163
Definition: ulduar.h:378
Definition: ulduar.h:37
ObjectGuid KologarnGUID
Definition: instance_ulduar.cpp:130
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.

235  {
236  if (!TeamInInstance)
237  {
238  Map::PlayerList const& Players = instance->GetPlayers();
239  if (!Players.isEmpty())
240  if (Player* player = Players.begin()->GetSource())
241  TeamInInstance = player->GetTeam();
242  }
243 
244  switch (creature->GetEntry())
245  {
246  case NPC_LEVIATHAN:
247  LeviathanGUID = creature->GetGUID();
248  break;
252  LeviathanVehicleGUIDs.push_back(creature->GetGUID());
253  break;
254  case NPC_IGNIS:
255  IgnisGUID = creature->GetGUID();
256  break;
257 
258  // Razorscale
259  case NPC_RAZORSCALE:
260  RazorscaleGUID = creature->GetGUID();
261  break;
263  RazorscaleController = creature->GetGUID();
264  break;
266  ExpeditionCommanderGUID = creature->GetGUID();
267  break;
268 
269  // XT-002 Deconstructor
270  case NPC_XT002:
271  XT002GUID = creature->GetGUID();
272  break;
273  case NPC_XT_TOY_PILE:
274  for (uint8 i = 0; i < 4; ++i)
275  if (!XTToyPileGUIDs[i])
276  {
277  XTToyPileGUIDs[i] = creature->GetGUID();
278  break;
279  }
280  break;
281 
282  // Assembly of Iron
283  case NPC_STEELBREAKER:
284  AssemblyGUIDs[0] = creature->GetGUID();
285  AddMinion(creature, true);
286  break;
287  case NPC_MOLGEIM:
288  AssemblyGUIDs[1] = creature->GetGUID();
289  AddMinion(creature, true);
290  break;
291  case NPC_BRUNDIR:
292  AssemblyGUIDs[2] = creature->GetGUID();
293  AddMinion(creature, true);
294  break;
295 
296  case NPC_KOLOGARN:
297  KologarnGUID = creature->GetGUID();
298  break;
299  case NPC_AURIAYA:
300  AuriayaGUID = creature->GetGUID();
301  break;
302 
303  // Hodir
304  case NPC_HODIR:
305  HodirGUID = creature->GetGUID();
306  break;
308  if (TeamInInstance == HORDE)
309  creature->UpdateEntry(NPC_TOR_GREYCLOUD);
310  break;
312  if (TeamInInstance == HORDE)
313  creature->UpdateEntry(NPC_KAR_GREYCLOUD);
314  break;
316  if (TeamInInstance == HORDE)
318  break;
320  if (TeamInInstance == HORDE)
322  break;
324  if (TeamInInstance == HORDE)
326  break;
328  if (TeamInInstance == HORDE)
330  break;
332  if (TeamInInstance == HORDE)
334  break;
336  if (TeamInInstance == HORDE)
338  break;
339 
340  case NPC_THORIM:
341  ThorimGUID = creature->GetGUID();
342  break;
343 
344  // Freya
345  case NPC_FREYA:
346  FreyaGUID = creature->GetGUID();
347  break;
348  case NPC_IRONBRANCH:
349  ElderGUIDs[0] = creature->GetGUID();
350  if (GetBossState(BOSS_FREYA) == DONE)
351  creature->DespawnOrUnsummon();
352  break;
353  case NPC_BRIGHTLEAF:
354  ElderGUIDs[1] = creature->GetGUID();
355  if (GetBossState(BOSS_FREYA) == DONE)
356  creature->DespawnOrUnsummon();
357  break;
358  case NPC_STONEBARK:
359  ElderGUIDs[2] = creature->GetGUID();
360  if (GetBossState(BOSS_FREYA) == DONE)
361  creature->DespawnOrUnsummon();
362  break;
364  FreyaAchieveTriggerGUID = creature->GetGUID();
365  break;
366 
367  // Mimiron
368  case NPC_MIMIRON:
369  MimironGUID = creature->GetGUID();
370  break;
371  case NPC_LEVIATHAN_MKII:
372  MimironVehicleGUIDs[0] = creature->GetGUID();
373  break;
374  case NPC_VX_001:
375  MimironVehicleGUIDs[1] = creature->GetGUID();
376  break;
378  MimironVehicleGUIDs[2] = creature->GetGUID();
379  break;
380  case NPC_COMPUTER:
381  MimironComputerGUID = creature->GetGUID();
382  break;
384  MimironWorldTriggerGUID = creature->GetGUID();
385  break;
386 
387  case NPC_VEZAX:
388  VezaxGUID = creature->GetGUID();
389  break;
390 
391  // Yogg-Saron
392  case NPC_YOGG_SARON:
393  YoggSaronGUID = creature->GetGUID();
394  break;
396  VoiceOfYoggSaronGUID = creature->GetGUID();
397  break;
399  BrainOfYoggSaronGUID = creature->GetGUID();
400  break;
401  case NPC_SARA:
402  SaraGUID = creature->GetGUID();
403  break;
404  case NPC_FREYA_YS:
405  KeeperGUIDs[0] = creature->GetGUID();
406  _summonYSKeeper[0] = false;
407  SaveToDB();
408  ++keepersCount;
409  break;
410  case NPC_HODIR_YS:
411  KeeperGUIDs[1] = creature->GetGUID();
412  _summonYSKeeper[1] = false;
413  SaveToDB();
414  ++keepersCount;
415  break;
416  case NPC_THORIM_YS:
417  KeeperGUIDs[2] = creature->GetGUID();
418  _summonYSKeeper[2] = false;
419  SaveToDB();
420  ++keepersCount;
421  break;
422  case NPC_MIMIRON_YS:
423  KeeperGUIDs[3] = creature->GetGUID();
424  _summonYSKeeper[3] = false;
425  SaveToDB();
426  ++keepersCount;
427  break;
428  case NPC_SANITY_WELL:
429  creature->SetReactState(REACT_PASSIVE);
430  break;
431 
432  // Algalon
433  case NPC_ALGALON:
434  AlgalonGUID = creature->GetGUID();
435  break;
437  BrannBronzebeardAlgGUID = creature->GetGUID();
438  break;
446  if (Creature* algalon = instance->GetCreature(AlgalonGUID))
447  algalon->AI()->JustSummoned(creature);
448  break;
449  }
450 
452  }
Definition: ulduar.h:63
ObjectGuid RazorscaleGUID
Definition: instance_ulduar.cpp:124
void DespawnOrUnsummon(uint32 msTimeToDespawn=0)
Definition: Creature.cpp:1774
Definition: ulduar.h:41
Definition: ulduar.h:80
ObjectGuid MimironComputerGUID
Definition: instance_ulduar.cpp:139
Definition: ulduar.h:132
Definition: ulduar.h:76
Definition: ulduar.h:65
Definition: ulduar.h:163
Definition: ulduar.h:79
Definition: Unit.h:1129
ObjectGuid FreyaGUID
Definition: instance_ulduar.cpp:134
Definition: ulduar.h:127
Definition: ulduar.h:129
Definition: ulduar.h:103
Definition: ulduar.h:114
Definition: ulduar.h:120
Definition: ulduar.h:182
Definition: ulduar.h:81
Definition: ulduar.h:66
ObjectGuid ThorimGUID
Definition: instance_ulduar.cpp:133
Definition: inflate.h:49
Definition: ulduar.h:58
ObjectGuid MimironWorldTriggerGUID
Definition: instance_ulduar.cpp:140
ObjectGuid LeviathanGUID
Definition: instance_ulduar.cpp:121
ObjectGuid IgnisGUID
Definition: instance_ulduar.cpp:123
Definition: Creature.h:467
Definition: ulduar.h:126
Definition: ulduar.h:124
Definition: ulduar.h:137
Definition: ulduar.h:134
ObjectGuid AuriayaGUID
Definition: instance_ulduar.cpp:131
iterator begin()
Definition: MapRefManager.h:37
ObjectGuid XTToyPileGUIDs[4]
Definition: instance_ulduar.cpp:128
ObjectGuid AlgalonGUID
Definition: instance_ulduar.cpp:147
Definition: ulduar.h:187
Definition: ulduar.h:154
Definition: ulduar.h:151
Definition: ulduar.h:118
Definition: ulduar.h:78
ObjectGuid SaraGUID
Definition: instance_ulduar.cpp:144
ObjectGuid ExpeditionCommanderGUID
Definition: instance_ulduar.cpp:126
Definition: ulduar.h:55
virtual void OnCreatureCreate(Creature *creature) override
Definition: InstanceScript.cpp:61
Definition: ulduar.h:128
ObjectGuid XT002GUID
Definition: instance_ulduar.cpp:127
Definition: ulduar.h:75
Definition: ulduar.h:133
void SaveToDB()
Definition: InstanceScript.cpp:39
Definition: ulduar.h:135
Definition: ulduar.h:160
uint32 TeamInInstance
Definition: instance_ulduar.cpp:169
Definition: ulduar.h:74
Definition: ulduar.h:165
Map * instance
Definition: InstanceScript.h:148
Definition: ulduar.h:125
Definition: ulduar.h:131
bool isEmpty() const
Definition: LinkedList.h:102
Definition: ulduar.h:138
ObjectGuid RazorscaleController
Definition: instance_ulduar.cpp:125
ObjectGuid ElderGUIDs[3]
Definition: instance_ulduar.cpp:135
ObjectGuid MimironVehicleGUIDs[3]
Definition: instance_ulduar.cpp:138
Definition: SharedDefines.h:999
Definition: ulduar.h:162
Definition: ulduar.h:54
Definition: ulduar.h:60
ObjectGuid BrannBronzebeardAlgGUID
Definition: instance_ulduar.cpp:148
PlayerList const & GetPlayers() const
Definition: Map.h:433
Definition: ulduar.h:67
Definition: ulduar.h:130
Definition: ulduar.h:68
ObjectGuid const & GetGUID() const
Definition: Object.h:105
Definition: MapRefManager.h:26
ObjectGuid MimironGUID
Definition: instance_ulduar.cpp:137
Creature * GetCreature(ObjectGuid const &guid)
Definition: Map.cpp:3535
ObjectGuid KeeperGUIDs[4]
Definition: instance_ulduar.cpp:146
FROM * GetSource() const
Definition: Reference.h:96
Definition: ulduar.h:57
Definition: ulduar.h:64
GuidVector LeviathanVehicleGUIDs
Definition: instance_ulduar.cpp:122
ObjectGuid BrainOfYoggSaronGUID
Definition: instance_ulduar.cpp:145
ObjectGuid YoggSaronGUID
Definition: instance_ulduar.cpp:142
Definition: ulduar.h:56
ObjectGuid AssemblyGUIDs[3]
Definition: instance_ulduar.cpp:129
ObjectGuid VezaxGUID
Definition: instance_ulduar.cpp:141
Definition: ulduar.h:175
Definition: ulduar.h:123
Definition: ulduar.h:62
ObjectGuid VoiceOfYoggSaronGUID
Definition: instance_ulduar.cpp:143
Definition: ulduar.h:101
uint8_t uint8
Definition: Define.h:152
Definition: ulduar.h:119
ObjectGuid HodirGUID
Definition: instance_ulduar.cpp:132
Definition: ulduar.h:197
uint32 GetEntry() const
Definition: Object.h:107
Definition: ulduar.h:102
void AddMinion(Creature *minion, bool add)
Definition: InstanceScript.cpp:261
Definition: ulduar.h:164
ObjectGuid FreyaAchieveTriggerGUID
Definition: instance_ulduar.cpp:136
EncounterState GetBossState(uint32 id) const
Definition: InstanceScript.h:227
Definition: ulduar.h:136
bool UpdateEntry(uint32 entry, CreatureData const *data=nullptr)
Definition: Creature.cpp:407
void SetReactState(ReactStates st)
Definition: Creature.h:502
Definition: ulduar.h:115
uint8 keepersCount
Definition: instance_ulduar.cpp:174
bool _summonYSKeeper[4]
Definition: instance_ulduar.cpp:1240
Definition: ulduar.h:59
Definition: ulduar.h:77
Definition: ulduar.h:194
ObjectGuid KologarnGUID
Definition: instance_ulduar.cpp:130

+ Here is the call graph for this function:

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

Reimplemented from InstanceScript.

455  {
456  switch (creature->GetEntry())
457  {
458  case NPC_XT_TOY_PILE:
459  for (uint8 i = 0; i < 4; ++i)
460  if (XTToyPileGUIDs[i] == creature->GetGUID())
461  {
462  XTToyPileGUIDs[i].Clear();
463  break;
464  }
465  break;
466  case NPC_STEELBREAKER:
467  case NPC_MOLGEIM:
468  case NPC_BRUNDIR:
469  AddMinion(creature, false);
470  break;
472  if (BrannBronzebeardAlgGUID == creature->GetGUID())
474  break;
475  default:
476  break;
477  }
478 
480  }
Definition: ulduar.h:65
Definition: ulduar.h:66
ObjectGuid XTToyPileGUIDs[4]
Definition: instance_ulduar.cpp:128
Definition: ulduar.h:187
virtual void OnCreatureRemove(Creature *creature) override
Definition: InstanceScript.cpp:67
void Clear()
Definition: ObjectGuid.h:215
ObjectGuid BrannBronzebeardAlgGUID
Definition: instance_ulduar.cpp:148
Definition: ulduar.h:67
ObjectGuid const & GetGUID() const
Definition: Object.h:105
Definition: ulduar.h:64
uint8_t uint8
Definition: Define.h:152
uint32 GetEntry() const
Definition: Object.h:107
void AddMinion(Creature *minion, bool add)
Definition: InstanceScript.cpp:261

+ Here is the call graph for this function:

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

Reimplemented from InstanceScript.

483  {
484  switch (gameObject->GetEntry())
485  {
487  case GO_KOLOGARN_CHEST:
488  KologarnChestGUID = gameObject->GetGUID();
489  break;
490  case GO_KOLOGARN_BRIDGE:
491  KologarnBridgeGUID = gameObject->GetGUID();
493  HandleGameObject(ObjectGuid::Empty, false, gameObject);
494  break;
496  case GO_THORIM_CHEST:
497  ThorimChestGUID = gameObject->GetGUID();
498  break;
501  HodirRareCacheGUID = gameObject->GetGUID();
502  break;
503  case GO_HODIR_CHEST_HERO:
504  case GO_HODIR_CHEST:
505  HodirChestGUID = gameObject->GetGUID();
506  break;
507  case GO_MIMIRON_TRAM:
508  MimironTramGUID = gameObject->GetGUID();
509  break;
510  case GO_MIMIRON_ELEVATOR:
511  MimironElevatorGUID = gameObject->GetGUID();
512  break;
513  case GO_MIMIRON_BUTTON:
514  MimironButtonGUID = gameObject->GetGUID();
515  break;
516  case GO_LEVIATHAN_GATE:
517  LeviathanGateGUID = gameObject->GetGUID();
520  break;
521  case GO_LEVIATHAN_DOOR:
522  case GO_XT_002_DOOR:
524  case GO_ARCHIVUM_DOOR:
525  case GO_HODIR_ENTRANCE:
526  case GO_HODIR_DOOR:
527  case GO_HODIR_ICE_DOOR:
528  case GO_MIMIRON_DOOR_1:
529  case GO_MIMIRON_DOOR_2:
530  case GO_MIMIRON_DOOR_3:
531  case GO_VEZAX_DOOR:
532  case GO_YOGG_SARON_DOOR:
533  AddDoor(gameObject, true);
534  break;
535  case GO_RAZOR_HARPOON_1:
536  RazorHarpoonGUIDs[0] = gameObject->GetGUID();
537  break;
538  case GO_RAZOR_HARPOON_2:
539  RazorHarpoonGUIDs[1] = gameObject->GetGUID();
540  break;
541  case GO_RAZOR_HARPOON_3:
542  RazorHarpoonGUIDs[2] = gameObject->GetGUID();
543  break;
544  case GO_RAZOR_HARPOON_4:
545  RazorHarpoonGUIDs[3] = gameObject->GetGUID();
546  break;
547  case GO_MOLE_MACHINE:
549  gameObject->SetGoState(GO_STATE_ACTIVE);
550  break;
552  BrainRoomDoorGUIDs[0] = gameObject->GetGUID();
553  break;
555  BrainRoomDoorGUIDs[1] = gameObject->GetGUID();
556  break;
558  BrainRoomDoorGUIDs[2] = gameObject->GetGUID();
559  break;
562  if (_algalonSummoned)
564  break;
566  AlgalonSigilDoorGUID[0] = gameObject->GetGUID();
567  if (_algalonSummoned)
568  gameObject->SetGoState(GO_STATE_ACTIVE);
569  break;
571  AlgalonSigilDoorGUID[1] = gameObject->GetGUID();
572  if (_algalonSummoned)
573  gameObject->SetGoState(GO_STATE_ACTIVE);
574  break;
576  AlgalonSigilDoorGUID[2] = gameObject->GetGUID();
577  AddDoor(gameObject, true);
578  break;
580  AlgalonFloorGUID[0] = gameObject->GetGUID();
581  AddDoor(gameObject, true);
582  break;
584  AlgalonFloorGUID[1] = gameObject->GetGUID();
585  AddDoor(gameObject, true);
586  break;
588  AlgalonUniverseGUID = gameObject->GetGUID();
589  AddDoor(gameObject, true);
590  break;
592  AlgalonTrapdoorGUID = gameObject->GetGUID();
593  AddDoor(gameObject, true);
594  break;
597  GiftOfTheObserverGUID = gameObject->GetGUID();
598  break;
599  default:
600  break;
601  }
602  }
Definition: ulduar.h:234
Definition: ulduar.h:219
Definition: ulduar.h:223
Definition: ulduar.h:265
static ObjectGuid const Empty
Definition: ObjectGuid.h:196
Definition: ulduar.h:256
Definition: ulduar.h:264
Definition: ulduar.h:262
ObjectGuid KologarnBridgeGUID
Definition: instance_ulduar.cpp:154
Definition: ulduar.h:210
ObjectGuid MimironButtonGUID
Definition: instance_ulduar.cpp:160
ObjectGuid KologarnChestGUID
Definition: instance_ulduar.cpp:153
Definition: ulduar.h:253
Definition: inflate.h:49
Definition: ulduar.h:32
Definition: ulduar.h:243
Definition: ulduar.h:222
Definition: ulduar.h:242
Definition: ulduar.h:228
Definition: ulduar.h:209
void SetFlag(uint16 index, uint32 newFlag)
Definition: Object.cpp:1199
Definition: ulduar.h:241
Definition: SharedDefines.h:2121
Definition: ulduar.h:218
Definition: ulduar.h:270
Definition: GameObject.h:824
Definition: ulduar.h:34
Definition: ulduar.h:224
Definition: ulduar.h:263
Definition: ulduar.h:207
ObjectGuid MimironTramGUID
Definition: instance_ulduar.cpp:158
Definition: ulduar.h:267
Definition: ulduar.h:208
Definition: ulduar.h:238
Definition: ulduar.h:258
Definition: ulduar.h:232
Definition: ulduar.h:271
void AddDoor(GameObject *door, bool add) override
Definition: instance_ulduar.cpp:1216
Definition: ulduar.h:268
Definition: ulduar.h:203
Definition: InstanceScript.h:59
Definition: ulduar.h:257
Definition: ulduar.h:211
Definition: ulduar.h:259
ObjectGuid AlgalonSigilDoorGUID[3]
Definition: instance_ulduar.cpp:162
ObjectGuid MimironElevatorGUID
Definition: instance_ulduar.cpp:159
Definition: ulduar.h:237
Definition: ulduar.h:204
Definition: ulduar.h:233
ObjectGuid GiftOfTheObserverGUID
Definition: instance_ulduar.cpp:166
Definition: ulduar.h:244
Definition: ulduar.h:229
void HandleGameObject(ObjectGuid guid, bool open, GameObject *go=nullptr)
Definition: InstanceScript.cpp:397
ObjectGuid RazorHarpoonGUIDs[4]
Definition: instance_ulduar.cpp:152
Definition: UpdateFields.h:319
Definition: GameObject.h:822
ObjectGuid HodirRareCacheGUID
Definition: instance_ulduar.cpp:156
ObjectGuid HodirChestGUID
Definition: instance_ulduar.cpp:157
Definition: ulduar.h:245
Definition: ulduar.h:272
void SetGoState(GOState state)
Definition: GameObject.cpp:2137
ObjectGuid const & GetGUID() const
Definition: Object.h:105
ObjectGuid BrainRoomDoorGUIDs[3]
Definition: instance_ulduar.cpp:161
Definition: ulduar.h:246
bool _algalonSummoned
Definition: instance_ulduar.cpp:1238
ObjectGuid ThorimChestGUID
Definition: instance_ulduar.cpp:155
Definition: ulduar.h:266
Definition: ulduar.h:215
ObjectGuid AlgalonTrapdoorGUID
Definition: instance_ulduar.cpp:165
uint32 GetEntry() const
Definition: Object.h:107
Definition: ulduar.h:231
Definition: ulduar.h:269
ObjectGuid AlgalonUniverseGUID
Definition: instance_ulduar.cpp:164
EncounterState GetBossState(uint32 id) const
Definition: InstanceScript.h:227
ObjectGuid LeviathanGateGUID
Definition: instance_ulduar.cpp:151
ObjectGuid AlgalonFloorGUID[2]
Definition: instance_ulduar.cpp:163
Definition: ulduar.h:37
Definition: ulduar.h:230

+ Here is the call graph for this function:

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

Reimplemented from InstanceScript.

605  {
606  switch (gameObject->GetEntry())
607  {
608  case GO_LEVIATHAN_DOOR:
609  case GO_XT_002_DOOR:
611  case GO_ARCHIVUM_DOOR:
612  case GO_HODIR_ENTRANCE:
613  case GO_HODIR_DOOR:
614  case GO_HODIR_ICE_DOOR:
615  case GO_MIMIRON_DOOR_1:
616  case GO_MIMIRON_DOOR_2:
617  case GO_MIMIRON_DOOR_3:
618  case GO_VEZAX_DOOR:
619  case GO_YOGG_SARON_DOOR:
625  AddDoor(gameObject, false);
626  break;
627  default:
628  break;
629  }
630  }
Definition: ulduar.h:219
Definition: ulduar.h:256
Definition: ulduar.h:253
Definition: ulduar.h:228
Definition: ulduar.h:218
Definition: ulduar.h:270
Definition: ulduar.h:267
void AddDoor(GameObject *door, bool add) override
Definition: instance_ulduar.cpp:1216
Definition: ulduar.h:268
Definition: ulduar.h:203
Definition: ulduar.h:244
Definition: ulduar.h:229
Definition: ulduar.h:245
Definition: ulduar.h:246
Definition: ulduar.h:266
Definition: ulduar.h:215
uint32 GetEntry() const
Definition: Object.h:107
Definition: ulduar.h:269
Definition: ulduar.h:230

+ Here is the call graph for this function:

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

Reimplemented from InstanceScript.

187  {
188  if (!TeamInInstance)
189  TeamInInstance = player->GetTeam();
190 
191  if (_summonAlgalon)
192  {
193  _summonAlgalon = false;
195  if (_algalonTimer && _algalonTimer <= 60)
196  algalon->AI()->DoAction(ACTION_INIT_ALGALON);
197  else
199  }
200 
201  // Keepers at Observation Ring
203  {
204  _summonObservationRingKeeper[0] = false;
206  }
208  {
209  _summonObservationRingKeeper[1] = false;
211  }
213  {
214  _summonObservationRingKeeper[2] = false;
216  }
218  {
219  _summonObservationRingKeeper[3] = false;
221  }
222 
223  // Keepers in Yogg-Saron's room
224  if (_summonYSKeeper[0])
226  if (_summonYSKeeper[1])
228  if (_summonYSKeeper[2])
230  if (_summonYSKeeper[3])
232  }
Position const YSKeepersPos[4]
Definition: boss_yogg_saron.cpp:381
Definition: ulduar.h:41
Position const AlgalonLandPos
Definition: boss_algalon_the_observer.cpp:204
Definition: ulduar.h:40
Definition: TemporarySummon.h:40
TempSummon * SummonCreature(uint32 entry, Position const &pos, SummonPropertiesEntry const *properties=NULL, uint32 duration=0, Unit *summoner=NULL, uint32 spellId=0, uint32 vehId=0)
Definition: Object.cpp:2219
Definition: ulduar.h:163
Definition: ulduar.h:81
Definition: inflate.h:49
Definition: ulduar.h:157
Definition: ulduar.h:39
Definition: Unit.h:681
Definition: ulduar.h:429
Definition: ulduar.h:158
bool _summonAlgalon
Definition: instance_ulduar.cpp:1237
CreatureAI * AI() const
Definition: Creature.h:525
uint32 TeamInInstance
Definition: instance_ulduar.cpp:169
Definition: ulduar.h:165
Map * instance
Definition: InstanceScript.h:148
virtual void DoAction(int32)
Definition: UnitAI.h:138
Definition: ulduar.h:159
Definition: ulduar.h:162
Position const ObservationRingKeepersPos[4]
Definition: boss_yogg_saron.cpp:374
void RemoveFlag(uint16 index, uint32 oldFlag)
Definition: Object.cpp:1214
ObjectGuid KeeperGUIDs[4]
Definition: instance_ulduar.cpp:146
Definition: UpdateFields.h:109
bool _summonObservationRingKeeper[4]
Definition: instance_ulduar.cpp:1239
uint32 _algalonTimer
Definition: instance_ulduar.cpp:1236
Definition: ulduar.h:42
Definition: ulduar.h:164
EncounterState GetBossState(uint32 id) const
Definition: InstanceScript.h:227
bool _summonYSKeeper[4]
Definition: instance_ulduar.cpp:1240
Definition: ulduar.h:156

+ Here is the call graph for this function:

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

Reimplemented from ZoneScript.

633  {
634  // Champion/Conqueror of Ulduar
635  if (unit->GetTypeId() == TYPEID_PLAYER)
636  {
637  for (uint8 i = 0; i < BOSS_ALGALON; i++)
638  {
639  if (GetBossState(i) == IN_PROGRESS)
640  {
641  _CoUAchivePlayerDeathMask |= (1 << i);
642  SaveToDB();
643  }
644  }
645  }
646 
647  Creature* creature = unit->ToCreature();
648  if (!creature)
649  return;
650 
651  switch (creature->GetEntry())
652  {
654  case NPC_MISGUIDED_NYMPH:
655  case NPC_GUARDIAN_LASHER:
656  case NPC_FOREST_SWARMER:
657  case NPC_MANGROVE_ENT:
658  case NPC_IRONROOT_LASHER:
659  case NPC_NATURES_BLADE:
661  if (!conSpeedAtory)
662  {
664  conSpeedAtory = true;
665  }
666  break;
667  case NPC_IRONBRANCH:
668  case NPC_STONEBARK:
669  case NPC_BRIGHTLEAF:
670  if (!lumberjacked)
671  {
673  lumberjacked = true;
674  }
675  break;
676  default:
677  break;
678  }
679  }
Definition: ulduar.h:147
Definition: ulduar.h:120
Definition: DBCEnums.h:183
bool conSpeedAtory
Definition: instance_ulduar.cpp:175
Definition: Creature.h:467
Definition: ulduar.h:145
Definition: ulduar.h:118
TypeID GetTypeId() const
Definition: Object.h:113
void DoStartTimedAchievement(AchievementCriteriaTimedTypes type, uint32 entry)
Definition: InstanceScript.cpp:518
Definition: ulduar.h:297
Definition: ulduar.h:45
Definition: ulduar.h:296
Definition: InstanceScript.h:59
bool lumberjacked
Definition: instance_ulduar.cpp:176
void SaveToDB()
Definition: InstanceScript.cpp:39
uint32 _CoUAchivePlayerDeathMask
Definition: instance_ulduar.cpp:1243
Definition: ulduar.h:141
Definition: ulduar.h:146
Definition: ulduar.h:148
Definition: ulduar.h:144
Definition: ObjectGuid.h:33
Creature * ToCreature()
Definition: Object.h:194
Definition: ulduar.h:143
uint8_t uint8
Definition: Define.h:152
Definition: ulduar.h:119
uint32 GetEntry() const
Definition: Object.h:107
EncounterState GetBossState(uint32 id) const
Definition: InstanceScript.h:227
Definition: ulduar.h:142

+ Here is the call graph for this function:

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

Reimplemented from ZoneScript.

682  {
683  // Flame Leviathan's Tower Event triggers
684  Creature* FlameLeviathan = instance->GetCreature(LeviathanGUID);
685 
686  switch (eventId)
687  {
689  if (FlameLeviathan && FlameLeviathan->IsAlive())
690  FlameLeviathan->AI()->DoAction(ACTION_TOWER_OF_STORM_DESTROYED);
691  break;
693  if (FlameLeviathan && FlameLeviathan->IsAlive())
694  FlameLeviathan->AI()->DoAction(ACTION_TOWER_OF_FROST_DESTROYED);
695  break;
697  if (FlameLeviathan && FlameLeviathan->IsAlive())
698  FlameLeviathan->AI()->DoAction(ACTION_TOWER_OF_FLAMES_DESTROYED);
699  break;
701  if (FlameLeviathan && FlameLeviathan->IsAlive())
702  FlameLeviathan->AI()->DoAction(ACTION_TOWER_OF_LIFE_DESTROYED);
703  break;
705  if (Creature* freya = instance->GetCreature(KeeperGUIDs[0]))
706  freya->AI()->DoAction(4/*ACTION_SANITY_WELLS*/);
707  break;
709  if (Creature* hodir = instance->GetCreature(KeeperGUIDs[1]))
710  hodir->AI()->DoAction(5/*ACTION_FLASH_FREEZE*/);
711  break;
712  }
713  }
ObjectGuid LeviathanGUID
Definition: instance_ulduar.cpp:121
Definition: Creature.h:467
Definition: ulduar.h:278
Definition: ulduar.h:288
Definition: ulduar.h:287
bool IsAlive() const
Definition: Unit.h:1692
Definition: ulduar.h:281
CreatureAI * AI() const
Definition: Creature.h:525
Map * instance
Definition: InstanceScript.h:148
virtual void DoAction(int32)
Definition: UnitAI.h:138
Definition: ulduar.h:289
Creature * GetCreature(ObjectGuid const &guid)
Definition: Map.cpp:3535
ObjectGuid KeeperGUIDs[4]
Definition: instance_ulduar.cpp:146
Definition: ulduar.h:290
Definition: ulduar.h:280
Definition: ulduar.h:279
Definition: ulduar.h:282
Definition: ulduar.h:277

+ Here is the call graph for this function:

void instance_ulduar::instance_ulduar_InstanceMapScript::ReadSaveDataMore ( std::istringstream &  data)
inlineoverridevirtual

Reimplemented from InstanceScript.

1117  {
1118  uint32 tempState;
1119  data >> tempState;
1120  if (tempState == IN_PROGRESS || tempState > SPECIAL)
1121  tempState = NOT_STARTED;
1122  SetData(DATA_COLOSSUS, tempState);
1123 
1124  data >> _algalonTimer;
1125  data >> tempState;
1126  _algalonSummoned = tempState != 0;
1128  {
1129  _summonAlgalon = true;
1130  if (_algalonTimer && _algalonTimer <= 60)
1131  {
1135  }
1136  }
1137 
1138  for (uint8 i = 0; i < 4; ++i)
1139  {
1140  data >> tempState;
1141  _summonYSKeeper[i] = tempState != 0;
1142  }
1143 
1145  _summonObservationRingKeeper[0] = true;
1147  _summonObservationRingKeeper[1] = true;
1149  _summonObservationRingKeeper[2] = true;
1151  _summonObservationRingKeeper[3] = true;
1152 
1153  data >> _CoUAchivePlayerDeathMask;
1154  }
Definition: ulduar.h:41
Definition: ulduar.h:40
void SetData(uint32 type, uint32 data) override
Definition: instance_ulduar.cpp:832
Definition: inflate.h:49
Definition: ulduar.h:39
EventMap _events
Definition: instance_ulduar.cpp:1235
bool _summonAlgalon
Definition: instance_ulduar.cpp:1237
Definition: ulduar.h:412
Definition: ulduar.h:45
Definition: InstanceScript.h:59
Definition: InstanceScript.h:58
uint32_t uint32
Definition: Define.h:150
Definition: InstanceScript.h:62
uint32 _CoUAchivePlayerDeathMask
Definition: instance_ulduar.cpp:1243
Definition: ulduar.h:350
void ScheduleEvent(uint32 eventId, Milliseconds const &time, uint32 group=0, uint8 phase=0)
Definition: EventMap.h:123
Definition: ulduar.h:413
void DoUpdateWorldState(uint32 worldstateId, uint32 worldstateValue)
Definition: InstanceScript.cpp:473
bool _summonObservationRingKeeper[4]
Definition: instance_ulduar.cpp:1239
uint32 _algalonTimer
Definition: instance_ulduar.cpp:1236
bool _algalonSummoned
Definition: instance_ulduar.cpp:1238
uint8_t uint8
Definition: Define.h:152
Definition: ulduar.h:42
EncounterState GetBossState(uint32 id) const
Definition: InstanceScript.h:227
bool _summonYSKeeper[4]
Definition: instance_ulduar.cpp:1240
Definition: ulduar.h:428

+ Here is the call graph for this function:

bool instance_ulduar::instance_ulduar_InstanceMapScript::SetBossState ( uint32  type,
EncounterState  state 
)
inlineoverridevirtual

Reimplemented from InstanceScript.

716  {
717  if (!InstanceScript::SetBossState(type, state))
718  return false;
719 
720  switch (type)
721  {
722  case BOSS_LEVIATHAN:
723  if (state == DONE)
725  break;
726  case BOSS_IGNIS:
727  case BOSS_RAZORSCALE:
728  case BOSS_XT002:
730  case BOSS_AURIAYA:
731  case BOSS_VEZAX:
732  case BOSS_YOGG_SARON:
733  break;
734  case BOSS_MIMIRON:
735  if (state == DONE)
737  break;
738  case BOSS_FREYA:
739  if (state == DONE)
741  break;
742  case BOSS_IRONBRANCH:
743  case BOSS_STONEBARK:
744  case BOSS_BRIGHTLEAF:
747  trigger->CastSpell(trigger, SPELL_LUMBERJACKED_CREDIT, true);
748  break;
749  case BOSS_KOLOGARN:
750  if (state == DONE)
751  {
753  {
754  gameObject->SetRespawnTime(gameObject->GetRespawnDelay());
755  gameObject->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
756  }
758  }
759  break;
760  case BOSS_HODIR:
761  if (state == DONE)
762  {
763  if (GameObject* HodirRareCache = instance->GetGameObject(HodirRareCacheGUID))
765  HodirRareCache->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
766  if (GameObject* HodirChest = instance->GetGameObject(HodirChestGUID))
767  HodirChest->SetRespawnTime(HodirChest->GetRespawnDelay());
768 
770  }
771  break;
772  case BOSS_THORIM:
773  if (state == DONE)
774  {
775  if (GameObject* gameObject = instance->GetGameObject(ThorimChestGUID))
776  gameObject->SetRespawnTime(gameObject->GetRespawnDelay());
777 
779  }
780  break;
781  case BOSS_ALGALON:
782  if (state == DONE)
783  {
787  _algalonTimer = 61;
789  gameObject->SetRespawnTime(gameObject->GetRespawnDelay());
790  // get item level (recheck weapons)
791  Map::PlayerList const& players = instance->GetPlayers();
792  for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
793  if (Player* player = itr->GetSource())
794  for (uint8 slot = EQUIPMENT_SLOT_MAINHAND; slot <= EQUIPMENT_SLOT_OFFHAND; ++slot)
795  if (Item* item = player->GetItemByPos(INVENTORY_SLOT_BAG_0, slot))
796  if (item->GetItemLevel(player) > _maxWeaponItemLevel)
797  _maxWeaponItemLevel = item->GetItemLevel(player);
798  }
799  else if (state == IN_PROGRESS)
800  {
801  // get item level (armor cannot be swapped in combat)
802  Map::PlayerList const& players = instance->GetPlayers();
803  for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
804  {
805  if (Player* player = itr->GetSource())
806  {
807  for (uint8 slot = EQUIPMENT_SLOT_START; slot < EQUIPMENT_SLOT_END; ++slot)
808  {
809  if (slot == EQUIPMENT_SLOT_TABARD || slot == EQUIPMENT_SLOT_BODY)
810  continue;
811 
812  if (Item* item = player->GetItemByPos(INVENTORY_SLOT_BAG_0, slot))
813  {
814  if (slot >= EQUIPMENT_SLOT_MAINHAND && slot <= EQUIPMENT_SLOT_OFFHAND)
815  {
816  if (item->GetItemLevel(player) > _maxWeaponItemLevel)
817  _maxWeaponItemLevel = item->GetItemLevel(player);
818  }
819  else if (item->GetItemLevel(player) > _maxArmorItemLevel)
820  _maxArmorItemLevel = item->GetItemLevel(player);
821  }
822  }
823  }
824  }
825  }
826  break;
827  }
828 
829  return true;
830  }
Definition: ulduar.h:36
Definition: ulduar.h:41
#define INVENTORY_SLOT_BAG_0
Definition: ulduar.h:40
TempSummon * SummonCreature(uint32 entry, Position const &pos, SummonPropertiesEntry const *properties=NULL, uint32 duration=0, Unit *summoner=NULL, uint32 spellId=0, uint32 vehId=0)
Definition: Object.cpp:2219
Definition: ulduar.h:422
Definition: SharedDefines.h:2125
ObjectGuid KologarnBridgeGUID
Definition: instance_ulduar.cpp:154
uint32 GetData(uint32 type) const override
Definition: instance_ulduar.cpp:1011
Definition: ulduar.h:427
Definition: ulduar.h:38
ObjectGuid KologarnChestGUID
Definition: instance_ulduar.cpp:153
Definition: inflate.h:49
Definition: ulduar.h:32
void CancelEvent(uint32 eventId)
Definition: EventMap.cpp:89
Definition: ulduar.h:33
Definition: ulduar.h:157
Definition: Creature.h:467
Definition: ulduar.h:39
iterator begin()
Definition: MapRefManager.h:37
Definition: ulduar.h:43
Definition: ulduar.h:34
Definition: ulduar.h:158
EventMap _events
Definition: instance_ulduar.cpp:1235
Definition: ulduar.h:48
Definition: ulduar.h:45
Definition: ulduar.h:430
Definition: ulduar.h:35
Definition: ulduar.h:46
Definition: InstanceScript.h:59
Definition: Item.h:259
Map * instance
Definition: InstanceScript.h:148
Definition: LinkedList.h:141
Definition: GameObject.h:880
ObjectGuid GiftOfTheObserverGUID
Definition: instance_ulduar.cpp:166
Definition: ulduar.h:159
Definition: ulduar.h:47
void HandleGameObject(ObjectGuid guid, bool open, GameObject *go=nullptr)
Definition: InstanceScript.cpp:397
void ScheduleEvent(uint32 eventId, Milliseconds const &time, uint32 group=0, uint8 phase=0)
Definition: EventMap.h:123
virtual bool SetBossState(uint32 id, EncounterState state)
Definition: InstanceScript.cpp:273
Definition: UpdateFields.h:319
ObjectGuid HodirRareCacheGUID
Definition: instance_ulduar.cpp:156
ObjectGuid HodirChestGUID
Definition: instance_ulduar.cpp:157
Definition: ulduar.h:413
Position const ObservationRingKeepersPos[4]
Definition: boss_yogg_saron.cpp:374
PlayerList const & GetPlayers() const
Definition: Map.h:433
void DoUpdateWorldState(uint32 worldstateId, uint32 worldstateValue)
Definition: InstanceScript.cpp:473
Definition: MapRefManager.h:26
Creature * GetCreature(ObjectGuid const &guid)
Definition: Map.cpp:3535
uint32 _algalonTimer
Definition: instance_ulduar.cpp:1236
Definition: Common.h:103
Definition: ulduar.h:44
ObjectGuid ThorimChestGUID
Definition: instance_ulduar.cpp:155
uint8_t uint8
Definition: Define.h:152
Definition: ulduar.h:42
Definition: ulduar.h:368
ObjectGuid FreyaAchieveTriggerGUID
Definition: instance_ulduar.cpp:136
GameObject * GetGameObject(ObjectGuid const &guid)
Definition: Map.cpp:3545
EncounterState GetBossState(uint32 id) const
Definition: InstanceScript.h:227
uint32 _maxWeaponItemLevel
Definition: instance_ulduar.cpp:1242
iterator end()
Definition: MapRefManager.h:38
Definition: ulduar.h:37
Definition: ulduar.h:156
uint32 _maxArmorItemLevel
Definition: instance_ulduar.cpp:1241
Definition: ulduar.h:428

+ Here is the call graph for this function:

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

Reimplemented from ZoneScript.

833  {
834  switch (type)
835  {
836  case DATA_COLOSSUS:
837  ColossusData = data;
838  if (data == 2 && GetBossState(BOSS_LEVIATHAN) == NOT_STARTED)
839  {
841  SaveToDB();
842  }
843  break;
845  HodirRareCacheData = data;
846  if (!HodirRareCacheData)
847  {
848  if (Creature* Hodir = instance->GetCreature(HodirGUID))
850  Hodir->RemoveGameObject(gameObject, false);
851  }
852  break;
853  case DATA_UNBROKEN:
854  Unbroken = data != 0;
855  break;
856  case DATA_ILLUSION:
857  illusion = data;
858  break;
859  case DATA_DRIVE_ME_CRAZY:
860  IsDriveMeCrazyEligible = data ? true : false;
861  break;
865  _algalonTimer = 60;
868  break;
870  _algalonSummoned = true;
871  break;
872  default:
873  break;
874  }
875  }
uint8 illusion
Definition: instance_ulduar.cpp:173
Definition: ulduar.h:427
Definition: ulduar.h:32
Definition: ulduar.h:419
Definition: Creature.h:467
bool Unbroken
Definition: instance_ulduar.cpp:177
EventMap _events
Definition: instance_ulduar.cpp:1235
Definition: ulduar.h:412
ColossusData
Definition: boss_drakkari_colossus.cpp:67
void SaveToDB()
Definition: InstanceScript.cpp:39
Definition: InstanceScript.h:58
Definition: ulduar.h:389
Definition: ulduar.h:431
Map * instance
Definition: InstanceScript.h:148
Definition: GameObject.h:880
Definition: ulduar.h:350
void ScheduleEvent(uint32 eventId, Milliseconds const &time, uint32 group=0, uint8 phase=0)
Definition: EventMap.h:123
bool IsDriveMeCrazyEligible
Definition: instance_ulduar.cpp:178
ObjectGuid HodirRareCacheGUID
Definition: instance_ulduar.cpp:156
Definition: ulduar.h:388
Definition: ulduar.h:413
void DoUpdateWorldState(uint32 worldstateId, uint32 worldstateValue)
Definition: InstanceScript.cpp:473
Creature * GetCreature(ObjectGuid const &guid)
Definition: Map.cpp:3535
uint32 _algalonTimer
Definition: instance_ulduar.cpp:1236
bool _algalonSummoned
Definition: instance_ulduar.cpp:1238
Definition: Common.h:103
ObjectGuid HodirGUID
Definition: instance_ulduar.cpp:132
Definition: ulduar.h:368
uint32 HodirRareCacheData
Definition: instance_ulduar.cpp:170
Definition: ulduar.h:393
GameObject * GetGameObject(ObjectGuid const &guid)
Definition: Map.cpp:3545
EncounterState GetBossState(uint32 id) const
Definition: InstanceScript.h:227
Definition: ulduar.h:428

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void instance_ulduar::instance_ulduar_InstanceMapScript::SetGuidData ( uint32  ,
ObjectGuid   
)
inlineoverridevirtual

Reimplemented from ZoneScript.

878  {
879  }
void instance_ulduar::instance_ulduar_InstanceMapScript::Update ( uint32  diff)
inlineoverridevirtual

Reimplemented from InstanceScript.

1157  {
1158  if (_events.Empty())
1159  return;
1160 
1161  _events.Update(diff);
1162 
1163  while (uint32 eventId = _events.ExecuteEvent())
1164  {
1165  switch (eventId)
1166  {
1168  SaveToDB();
1170  if (_algalonTimer)
1172  else
1173  {
1176  if (Creature* algalon = instance->GetCreature(AlgalonGUID))
1177  algalon->AI()->DoAction(EVENT_DESPAWN_ALGALON);
1178  }
1179  break;
1181  // Eject all players from vehicles and make them untargetable.
1182  // They will be despawned after a while
1183  for (auto const& vehicleGuid : LeviathanVehicleGUIDs)
1184  {
1185  if (Creature* vehicleCreature = instance->GetCreature(vehicleGuid))
1186  {
1187  if (Vehicle* vehicle = vehicleCreature->GetVehicleKit())
1188  {
1189  vehicle->RemoveAllPassengers();
1190  vehicleCreature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
1191  vehicleCreature->DespawnOrUnsummon(5 * MINUTE * IN_MILLISECONDS);
1192  }
1193  }
1194  }
1195  break;
1197  if (Creature* Leviathan = instance->GetCreature(LeviathanGUID))
1198  Leviathan->AI()->DoAction(ACTION_MOVE_TO_CENTER_POSITION);
1199  if (GameObject* gameObject = instance->GetGameObject(LeviathanGateGUID))
1200  gameObject->SetGoState(GO_STATE_ACTIVE_ALTERNATIVE);
1201  break;
1202  }
1203  }
1204  }
Definition: Vehicle.h:32
Definition: ulduar.h:291
Definition: ulduar.h:427
void CancelEvent(uint32 eventId)
Definition: EventMap.cpp:89
ObjectGuid LeviathanGUID
Definition: instance_ulduar.cpp:121
Definition: Creature.h:467
ObjectGuid AlgalonGUID
Definition: instance_ulduar.cpp:147
Definition: Common.h:97
bool Empty() const
Definition: EventMap.h:81
Definition: GameObject.h:824
EventMap _events
Definition: instance_ulduar.cpp:1235
Definition: ulduar.h:412
Definition: ulduar.h:430
void SaveToDB()
Definition: InstanceScript.cpp:39
uint32_t uint32
Definition: Define.h:150
Definition: ulduar.h:431
Map * instance
Definition: InstanceScript.h:148
Definition: GameObject.h:880
void ScheduleEvent(uint32 eventId, Milliseconds const &time, uint32 group=0, uint8 phase=0)
Definition: EventMap.h:123
void Update(uint32 time)
Definition: EventMap.h:54
Definition: ulduar.h:413
void DoUpdateWorldState(uint32 worldstateId, uint32 worldstateValue)
Definition: InstanceScript.cpp:473
Creature * GetCreature(ObjectGuid const &guid)
Definition: Map.cpp:3535
Definition: UpdateFields.h:109
uint32 _algalonTimer
Definition: instance_ulduar.cpp:1236
GuidVector LeviathanVehicleGUIDs
Definition: instance_ulduar.cpp:122
Definition: Common.h:103
uint32 ExecuteEvent()
Definition: EventMap.cpp:46
GameObject * GetGameObject(ObjectGuid const &guid)
Definition: Map.cpp:3545
ObjectGuid LeviathanGateGUID
Definition: instance_ulduar.cpp:151
Definition: Unit.h:698
Definition: ulduar.h:428

+ Here is the call graph for this function:

void instance_ulduar::instance_ulduar_InstanceMapScript::UpdateDoorState ( GameObject door)
inlineoverridevirtual

Reimplemented from InstanceScript.

1207  {
1208  // Leviathan doors are set to DOOR_TYPE_ROOM except the one it uses to enter the room
1209  // which has to be set to DOOR_TYPE_PASSAGE
1210  if (door->GetEntry() == GO_LEVIATHAN_DOOR && door->GetPositionX() > 400.f)
1212  else
1214  }
Definition: inflate.h:49
Definition: ulduar.h:32
Definition: ulduar.h:203
Definition: GameObject.h:822
Definition: GameObject.h:823
void SetGoState(GOState state)
Definition: GameObject.cpp:2137
uint32 GetEntry() const
Definition: Object.h:107
float GetPositionX() const
Definition: Position.h:104
EncounterState GetBossState(uint32 id) const
Definition: InstanceScript.h:227
virtual void UpdateDoorState(GameObject *door)
Definition: InstanceScript.cpp:178

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void instance_ulduar::instance_ulduar_InstanceMapScript::WriteSaveDataMore ( std::ostringstream &  data)
inlineoverridevirtual

Reimplemented from InstanceScript.

1107  {
1108  data << GetData(DATA_COLOSSUS) << ' ' << _algalonTimer << ' ' << uint32(_algalonSummoned ? 1 : 0);
1109 
1110  for (uint8 i = 0; i < 4; ++i)
1111  data << ' ' << uint32(!KeeperGUIDs[i].IsEmpty() ? 1 : 0);
1112 
1113  data << ' ' << _CoUAchivePlayerDeathMask;
1114  }
uint32 GetData(uint32 type) const override
Definition: instance_ulduar.cpp:1011
uint32 _CoUAchivePlayerDeathMask
Definition: instance_ulduar.cpp:1243
Definition: ulduar.h:350
ObjectGuid KeeperGUIDs[4]
Definition: instance_ulduar.cpp:146
uint32 _algalonTimer
Definition: instance_ulduar.cpp:1236
bool _algalonSummoned
Definition: instance_ulduar.cpp:1238
uint8_t uint8
Definition: Define.h:152
uint32_t uint32
Definition: g3dmath.h:168

+ Here is the call graph for this function:

Member Data Documentation

bool instance_ulduar::instance_ulduar_InstanceMapScript::_algalonSummoned
private
uint32 instance_ulduar::instance_ulduar_InstanceMapScript::_algalonTimer
private
uint32 instance_ulduar::instance_ulduar_InstanceMapScript::_CoUAchivePlayerDeathMask
private
EventMap instance_ulduar::instance_ulduar_InstanceMapScript::_events
private
uint32 instance_ulduar::instance_ulduar_InstanceMapScript::_maxArmorItemLevel
private
uint32 instance_ulduar::instance_ulduar_InstanceMapScript::_maxWeaponItemLevel
private
bool instance_ulduar::instance_ulduar_InstanceMapScript::_summonAlgalon
private
bool instance_ulduar::instance_ulduar_InstanceMapScript::_summonObservationRingKeeper[4]
private
bool instance_ulduar::instance_ulduar_InstanceMapScript::_summonYSKeeper[4]
private
ObjectGuid instance_ulduar::instance_ulduar_InstanceMapScript::AlgalonFloorGUID[2]
ObjectGuid instance_ulduar::instance_ulduar_InstanceMapScript::AlgalonGUID
ObjectGuid instance_ulduar::instance_ulduar_InstanceMapScript::AlgalonSigilDoorGUID[3]
ObjectGuid instance_ulduar::instance_ulduar_InstanceMapScript::AlgalonTrapdoorGUID
ObjectGuid instance_ulduar::instance_ulduar_InstanceMapScript::AlgalonUniverseGUID
ObjectGuid instance_ulduar::instance_ulduar_InstanceMapScript::AssemblyGUIDs[3]
ObjectGuid instance_ulduar::instance_ulduar_InstanceMapScript::AuriayaGUID
ObjectGuid instance_ulduar::instance_ulduar_InstanceMapScript::BrainOfYoggSaronGUID
ObjectGuid instance_ulduar::instance_ulduar_InstanceMapScript::BrainRoomDoorGUIDs[3]
ObjectGuid instance_ulduar::instance_ulduar_InstanceMapScript::BrannBronzebeardAlgGUID
uint32 instance_ulduar::instance_ulduar_InstanceMapScript::ColossusData
bool instance_ulduar::instance_ulduar_InstanceMapScript::conSpeedAtory
uint8 instance_ulduar::instance_ulduar_InstanceMapScript::elderCount
ObjectGuid instance_ulduar::instance_ulduar_InstanceMapScript::ElderGUIDs[3]
ObjectGuid instance_ulduar::instance_ulduar_InstanceMapScript::ExpeditionCommanderGUID
ObjectGuid instance_ulduar::instance_ulduar_InstanceMapScript::FreyaAchieveTriggerGUID
ObjectGuid instance_ulduar::instance_ulduar_InstanceMapScript::FreyaGUID
ObjectGuid instance_ulduar::instance_ulduar_InstanceMapScript::GiftOfTheObserverGUID
ObjectGuid instance_ulduar::instance_ulduar_InstanceMapScript::HodirChestGUID
ObjectGuid instance_ulduar::instance_ulduar_InstanceMapScript::HodirGUID
uint32 instance_ulduar::instance_ulduar_InstanceMapScript::HodirRareCacheData
ObjectGuid instance_ulduar::instance_ulduar_InstanceMapScript::HodirRareCacheGUID
ObjectGuid instance_ulduar::instance_ulduar_InstanceMapScript::IgnisGUID
uint8 instance_ulduar::instance_ulduar_InstanceMapScript::illusion
bool instance_ulduar::instance_ulduar_InstanceMapScript::IsDriveMeCrazyEligible
ObjectGuid instance_ulduar::instance_ulduar_InstanceMapScript::KeeperGUIDs[4]
uint8 instance_ulduar::instance_ulduar_InstanceMapScript::keepersCount
ObjectGuid instance_ulduar::instance_ulduar_InstanceMapScript::KologarnBridgeGUID
ObjectGuid instance_ulduar::instance_ulduar_InstanceMapScript::KologarnChestGUID
ObjectGuid instance_ulduar::instance_ulduar_InstanceMapScript::KologarnGUID
ObjectGuid instance_ulduar::instance_ulduar_InstanceMapScript::LeviathanGateGUID
ObjectGuid instance_ulduar::instance_ulduar_InstanceMapScript::LeviathanGUID
GuidVector instance_ulduar::instance_ulduar_InstanceMapScript::LeviathanVehicleGUIDs
bool instance_ulduar::instance_ulduar_InstanceMapScript::lumberjacked
ObjectGuid instance_ulduar::instance_ulduar_InstanceMapScript::MimironButtonGUID
ObjectGuid instance_ulduar::instance_ulduar_InstanceMapScript::MimironComputerGUID
ObjectGuid instance_ulduar::instance_ulduar_InstanceMapScript::MimironElevatorGUID
ObjectGuid instance_ulduar::instance_ulduar_InstanceMapScript::MimironGUID
ObjectGuid instance_ulduar::instance_ulduar_InstanceMapScript::MimironTramGUID
ObjectGuid instance_ulduar::instance_ulduar_InstanceMapScript::MimironVehicleGUIDs[3]
ObjectGuid instance_ulduar::instance_ulduar_InstanceMapScript::MimironWorldTriggerGUID
ObjectGuid instance_ulduar::instance_ulduar_InstanceMapScript::RazorHarpoonGUIDs[4]
ObjectGuid instance_ulduar::instance_ulduar_InstanceMapScript::RazorscaleController
ObjectGuid instance_ulduar::instance_ulduar_InstanceMapScript::RazorscaleGUID
ObjectGuid instance_ulduar::instance_ulduar_InstanceMapScript::SaraGUID
uint32 instance_ulduar::instance_ulduar_InstanceMapScript::TeamInInstance
ObjectGuid instance_ulduar::instance_ulduar_InstanceMapScript::ThorimChestGUID
ObjectGuid instance_ulduar::instance_ulduar_InstanceMapScript::ThorimGUID
bool instance_ulduar::instance_ulduar_InstanceMapScript::Unbroken
ObjectGuid instance_ulduar::instance_ulduar_InstanceMapScript::VezaxGUID
ObjectGuid instance_ulduar::instance_ulduar_InstanceMapScript::VoiceOfYoggSaronGUID
ObjectGuid instance_ulduar::instance_ulduar_InstanceMapScript::XT002GUID
ObjectGuid instance_ulduar::instance_ulduar_InstanceMapScript::XTToyPileGUIDs[4]
ObjectGuid instance_ulduar::instance_ulduar_InstanceMapScript::YoggSaronGUID

The documentation for this struct was generated from the following file: