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

Public Member Functions

 instance_blackrock_depths (Map *map)
 
void OnPlayerEnter (Player *) override
 
void ReplaceMoiraIfSaved ()
 
void Initialize () override
 
void OnCreatureCreate (Creature *creature) override
 
void OnGameObjectCreate (GameObject *go) override
 
void OnUnitDeath (Unit *unit) override
 
void SetData (uint32 type, uint32 data) override
 
uint32 GetData (uint32 type) const override
 
ObjectGuid GetGuidData (uint32 data) const override
 
std::string GetSaveData () override
 
void Load (const char *in) override
 
void TombOfSevenEvent ()
 
void TombOfSevenReset ()
 
bool CheckTombReset (uint32 diff)
 
void Update (uint32 diff) override
 
- Public Member Functions inherited from InstanceScript
 InstanceScript (Map *map)
 
 ~InstanceScript () override
 
virtual void CreatureLooted (Creature *, LootType)
 
void SaveToDB ()
 
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 OnPlayerLeave (Player *)
 
virtual void OnPlayerAreaUpdate (Player *, uint32, uint32)
 
virtual void OnPlayerInWaterStateUpdate (Player *, bool)
 
void HandleGameObject (ObjectGuid guid, bool open, GameObject *go=nullptr)
 Open or close a GameObject by GUID.
 
void HandleGameObject (uint32 type, bool open)
 Open or close a GameObject registered via LoadObjectData.
 
void DoUseDoorOrButton (ObjectGuid guid, uint32 withRestoreTime=0, bool useAlternativeState=false)
 
void DoRespawnGameObject (ObjectGuid guid, uint32 timeToDespawn=MINUTE)
 
void DoRespawnGameObject (uint32 type)
 
void DoRespawnCreature (ObjectGuid guid, bool force=false)
 
void DoRespawnCreature (uint32 type, bool force=false)
 
void DoUpdateWorldState (uint32 worldstateId, uint32 worldstateValue)
 
void DoSendNotifyToInstance (char const *format,...)
 
void DoUpdateAchievementCriteria (AchievementCriteriaTypes type, uint32 miscValue1=0, uint32 miscValue2=0, Unit *unit=nullptr)
 
void DoStartTimedAchievement (AchievementCriteriaTimedTypes type, uint32 entry)
 
void DoStopTimedAchievement (AchievementCriteriaTimedTypes type, uint32 entry)
 
void DoRemoveAurasDueToSpellOnPlayers (uint32 spell)
 
void DoCastSpellOnPlayers (uint32 spell)
 
void DoCastSpellOnPlayer (Player *player, uint32 spell, bool includePets, bool includeControlled)
 
bool ServerAllowsTwoSideGroups ()
 
virtual bool SetBossState (uint32 id, EncounterState state)
 
EncounterState GetBossState (uint32 id) const
 
CreatureBoundary const * GetBossBoundary (uint32 id) const
 
BossInfo const * GetBossInfo (uint32 id) const
 
uint32 GetPersistentData (uint32 index) const
 
void StorePersistentData (uint32 index, uint32 data)
 
virtual bool CheckAchievementCriteriaMeet (uint32, Player const *, Unit const *=nullptr, uint32=0)
 
virtual bool CheckRequiredBosses (uint32, Player const *=nullptr) const
 
void SetCompletedEncountersMask (uint32 newMask, bool save)
 
uint32 GetCompletedEncounterMask () const
 
void SendEncounterUnit (uint32 type, Unit *unit=nullptr, uint8 param1=0, uint8 param2=0)
 
virtual void FillInitialWorldStates (WorldPackets::WorldState::InitWorldStates &)
 
uint32 GetEncounterCount () const
 
void MarkAreaTriggerDone (uint32 id)
 
void ResetAreaTriggerDone (uint32 id)
 
bool IsAreaTriggerDone (uint32 id) const
 
virtual void DoAction (int32)
 
void DoForAllMinions (uint32 id, std::function< void(Creature *)> exec)
 
void StoreGameObjectState (ObjectGuid::LowType spawnId, uint8 state)
 
uint8 GetStoredGameObjectState (ObjectGuid::LowType spawnId) const
 
void LoadInstanceSavedGameobjectStateData ()
 
bool IsBossDone (uint32 bossId) const
 
bool AllBossesDone () const
 
bool AllBossesDone (std::initializer_list< uint32 > bossIds) const
 
TeamId GetTeamIdInInstance () const
 
void SetTeamIdInInstance (TeamId teamId)
 
bool IsTwoFactionInstance () const
 
- Public Member Functions inherited from ZoneScript
 ZoneScript ()
 
virtual ~ZoneScript ()
 
virtual uint32 GetCreatureEntry (ObjectGuid::LowType, CreatureData const *data)
 
virtual uint32 GetGameObjectEntry (ObjectGuid::LowType, uint32 entry)
 
virtual void OnCreatureEvade (Creature *)
 
virtual void SetGuidData (uint32, ObjectGuid)
 
virtual uint64 GetData64 (uint32) const
 
virtual void SetData64 (uint32, uint64)
 
virtual void ProcessEvent (WorldObject *, uint32)
 

Public Attributes

uint32 encounter [MAX_ENCOUNTER]
 
std::string str_data
 
ObjectGuid EmperorGUID
 
ObjectGuid PhalanxGUID
 
ObjectGuid MagmusGUID
 
ObjectGuid MoiraGUID
 
ObjectGuid PriestessGUID
 
ObjectGuid IronhandGUID [6]
 
ObjectGuid CorenGUID
 
ObjectGuid GoArena1GUID
 
ObjectGuid GoArena2GUID
 
ObjectGuid GoArena3GUID
 
ObjectGuid GoArena4GUID
 
ObjectGuid GoShadowLockGUID
 
ObjectGuid GoShadowMechGUID
 
ObjectGuid GoShadowGiantGUID
 
ObjectGuid GoShadowDummyGUID
 
ObjectGuid GoBarKegGUID
 
ObjectGuid GoBarKegTrapGUID
 
ObjectGuid GoBarDoorGUID
 
ObjectGuid GoTombEnterGUID
 
ObjectGuid GoTombExitGUID
 
ObjectGuid GoLyceumGUID
 
ObjectGuid GoSFSGUID
 
ObjectGuid GoSFNGUID
 
ObjectGuid GoGolemNGUID
 
ObjectGuid GoGolemSGUID
 
ObjectGuid GoThroneGUID
 
ObjectGuid GoChestGUID
 
ObjectGuid GoSpectralChaliceGUID
 
uint32 BarAleCount
 
uint32 GhostKillCount
 
ObjectGuid TombBossGUIDs [7]
 
uint32 tombResetTimer
 
uint32 TombTimer
 
uint32 TombEventCounter
 
uint32 OpenedCoofers
 
uint32 IronhandCounter
 
GuidList ArgelmachAdds
 
ObjectGuid ArgelmachGUID
 
TempSummonTempSummonGrimstone = nullptr
 
Position GrimstonePositon = Position(625.559f, -205.618f, -52.735f, 2.609f)
 
time_t timeRingFail = 0
 
uint8 arenaMobsToSpawn
 
uint8 arenaBossToSpawn
 
std::vector< ObjectGuidArenaSpectators
 
Position CenterOfRingOfLaw = Position(595.289, -186.56)
 
ObjectGuid EmperorSenators [5]
 
std::vector< ObjectGuidEmperorSenatorsVector
 
Position EmperorSpawnPos = Position(1380.52, -831, 115)
 
- Public Attributes inherited from InstanceScript
Mapinstance
 
TaskScheduler scheduler
 

Additional Inherited Members

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

Detailed Description

Constructor & Destructor Documentation

◆ instance_blackrock_depths()

instance_blackrock_depths::instance_blackrock_depths ( Map map)
inline
100 : InstanceScript(map)
101 {
103 }
#define DataHeader
Definition blackrock_depths.h:23
Definition InstanceScript.h:143
void SetHeaders(std::string const &dataHeaders)
Definition InstanceScript.cpp:158

References DataHeader, and InstanceScript::SetHeaders().

Member Function Documentation

◆ CheckTombReset()

bool instance_blackrock_depths::CheckTombReset ( uint32  diff)
inline
765 {
766 bool anyBossAlive = false; // status of the bosses up until the current one
767 for (uint8 i = 0; i < TombEventCounter; i++)
768 {
770 if (boss)
771 {
772 anyBossAlive |= boss->IsAlive();
773 if (boss->IsAlive() && boss->IsInCombat())
774 {
776 return false; // any boss in combat means we shouldn't reset.
777 }
778 }
779 }
780 if (!anyBossAlive) // no boss alive, put reset timer back up
782 tombResetTimer -= diff;
783 return tombResetTimer < diff;
784 }
std::uint8_t uint8
Definition Define.h:109
Definition Creature.h:47
Map * instance
Definition InstanceScript.h:149
Creature * GetCreature(ObjectGuid const &guid)
Definition Map.cpp:2336
bool IsAlive() const
Definition Unit.h:1793
bool IsInCombat() const
Definition Unit.h:935
@ TIMER_TOMB_RESET
Definition instance_blackrock_depths.cpp:30
ObjectGuid TombBossGUIDs[7]
Definition instance_blackrock_depths.cpp:140
uint32 tombResetTimer
Definition instance_blackrock_depths.cpp:141
uint32 TombEventCounter
Definition instance_blackrock_depths.cpp:143

References Map::GetCreature(), InstanceScript::instance, Unit::IsAlive(), Unit::IsInCombat(), TIMER_TOMB_RESET, TombBossGUIDs, TombEventCounter, and tombResetTimer.

Referenced by Update().

◆ GetData()

uint32 instance_blackrock_depths::GetData ( uint32  type) const
inlineoverridevirtual

Reimplemented from ZoneScript.

607 {
608 switch (type)
609 {
610 case TYPE_RING_OF_LAW:
611 return encounter[0];
612 case TYPE_VAULT:
613 return encounter[1];
614 case TYPE_BAR:
615 if (encounter[2] == IN_PROGRESS && BarAleCount == 3)
616 return SPECIAL;
617 else
618 return encounter[2];
620 return encounter[3];
621 case TYPE_LYCEUM:
622 return encounter[4];
623 case TYPE_IRON_HALL:
624 return encounter[5];
626 return timeRingFail;
627 case DATA_ARENA_MOBS:
628 return arenaMobsToSpawn;
629 case DATA_ARENA_BOSS:
630 return arenaBossToSpawn;
631 }
632 return 0;
633 }
@ IN_PROGRESS
Definition InstanceScript.h:59
@ SPECIAL
Definition InstanceScript.h:62
@ TYPE_RING_OF_LAW
Definition blackrock_depths.h:40
@ TYPE_IRON_HALL
Definition blackrock_depths.h:45
@ TYPE_BAR
Definition blackrock_depths.h:42
@ TYPE_TOMB_OF_SEVEN
Definition blackrock_depths.h:43
@ DATA_TIME_RING_FAIL
Definition blackrock_depths.h:83
@ DATA_ARENA_BOSS
Definition blackrock_depths.h:85
@ TYPE_LYCEUM
Definition blackrock_depths.h:44
@ TYPE_VAULT
Definition blackrock_depths.h:41
@ DATA_ARENA_MOBS
Definition blackrock_depths.h:84
uint8 arenaBossToSpawn
Definition instance_blackrock_depths.cpp:154
time_t timeRingFail
Definition instance_blackrock_depths.cpp:152
uint32 BarAleCount
Definition instance_blackrock_depths.cpp:138
uint32 encounter[MAX_ENCOUNTER]
Definition instance_blackrock_depths.cpp:105
uint8 arenaMobsToSpawn
Definition instance_blackrock_depths.cpp:153

References arenaBossToSpawn, arenaMobsToSpawn, BarAleCount, DATA_ARENA_BOSS, DATA_ARENA_MOBS, DATA_TIME_RING_FAIL, encounter, IN_PROGRESS, SPECIAL, timeRingFail, TYPE_BAR, TYPE_IRON_HALL, TYPE_LYCEUM, TYPE_RING_OF_LAW, TYPE_TOMB_OF_SEVEN, and TYPE_VAULT.

Referenced by Update().

◆ GetGuidData()

ObjectGuid instance_blackrock_depths::GetGuidData ( uint32  data) const
inlineoverridevirtual

Reimplemented from ZoneScript.

636 {
637 switch (data)
638 {
639 case DATA_EMPEROR:
640 return EmperorGUID;
641 case DATA_PHALANX:
642 return PhalanxGUID;
643 case DATA_MOIRA:
644 return MoiraGUID;
645 case DATA_COREN:
646 return CorenGUID;
647 case DATA_ARENA1:
648 return GoArena1GUID;
649 case DATA_ARENA2:
650 return GoArena2GUID;
651 case DATA_ARENA3:
652 return GoArena3GUID;
653 case DATA_ARENA4:
654 return GoArena4GUID;
655 case DATA_GO_BAR_KEG:
656 return GoBarKegGUID;
658 return GoBarKegTrapGUID;
659 case DATA_GO_BAR_DOOR:
660 return GoBarDoorGUID;
662 return GoSFNGUID;
664 return GoSFSGUID;
665 case DATA_THRONE_DOOR:
666 return GoThroneGUID;
668 return GoGolemNGUID;
670 return GoGolemSGUID;
671 case DATA_GO_CHALICE:
673 case DATA_MAGMUS:
674 {
675 return MagmusGUID;
676 }
677 }
678
679 return ObjectGuid::Empty;
680 }
@ DATA_PHALANX
Definition blackrock_depths.h:48
@ DATA_COREN
Definition blackrock_depths.h:75
@ DATA_EMPEROR
Definition blackrock_depths.h:47
@ DATA_GO_BAR_KEG
Definition blackrock_depths.h:55
@ DATA_MAGMUS
Definition blackrock_depths.h:73
@ DATA_ARENA3
Definition blackrock_depths.h:52
@ DATA_ARENA2
Definition blackrock_depths.h:51
@ DATA_GO_CHALICE
Definition blackrock_depths.h:58
@ DATA_MOIRA
Definition blackrock_depths.h:67
@ DATA_GOLEM_DOOR_S
Definition blackrock_depths.h:61
@ DATA_GOLEM_DOOR_N
Definition blackrock_depths.h:60
@ DATA_THRONE_DOOR
Definition blackrock_depths.h:63
@ DATA_SF_BRAZIER_N
Definition blackrock_depths.h:65
@ DATA_ARENA4
Definition blackrock_depths.h:53
@ DATA_GO_BAR_KEG_TRAP
Definition blackrock_depths.h:56
@ DATA_ARENA1
Definition blackrock_depths.h:50
@ DATA_SF_BRAZIER_S
Definition blackrock_depths.h:66
@ DATA_GO_BAR_DOOR
Definition blackrock_depths.h:57
static ObjectGuid const Empty
Definition ObjectGuid.h:120
ObjectGuid GoBarKegTrapGUID
Definition instance_blackrock_depths.cpp:125
ObjectGuid MagmusGUID
Definition instance_blackrock_depths.cpp:110
ObjectGuid GoBarDoorGUID
Definition instance_blackrock_depths.cpp:126
ObjectGuid EmperorGUID
Definition instance_blackrock_depths.cpp:108
ObjectGuid GoArena3GUID
Definition instance_blackrock_depths.cpp:118
ObjectGuid GoGolemSGUID
Definition instance_blackrock_depths.cpp:133
ObjectGuid PhalanxGUID
Definition instance_blackrock_depths.cpp:109
ObjectGuid GoSFSGUID
Definition instance_blackrock_depths.cpp:130
ObjectGuid GoGolemNGUID
Definition instance_blackrock_depths.cpp:132
ObjectGuid GoArena1GUID
Definition instance_blackrock_depths.cpp:116
ObjectGuid GoSFNGUID
Definition instance_blackrock_depths.cpp:131
ObjectGuid GoBarKegGUID
Definition instance_blackrock_depths.cpp:124
ObjectGuid GoArena4GUID
Definition instance_blackrock_depths.cpp:119
ObjectGuid MoiraGUID
Definition instance_blackrock_depths.cpp:111
ObjectGuid GoThroneGUID
Definition instance_blackrock_depths.cpp:134
ObjectGuid GoArena2GUID
Definition instance_blackrock_depths.cpp:117
ObjectGuid CorenGUID
Definition instance_blackrock_depths.cpp:114
ObjectGuid GoSpectralChaliceGUID
Definition instance_blackrock_depths.cpp:136

References CorenGUID, DATA_ARENA1, DATA_ARENA2, DATA_ARENA3, DATA_ARENA4, DATA_COREN, DATA_EMPEROR, DATA_GO_BAR_DOOR, DATA_GO_BAR_KEG, DATA_GO_BAR_KEG_TRAP, DATA_GO_CHALICE, DATA_GOLEM_DOOR_N, DATA_GOLEM_DOOR_S, DATA_MAGMUS, DATA_MOIRA, DATA_PHALANX, DATA_SF_BRAZIER_N, DATA_SF_BRAZIER_S, DATA_THRONE_DOOR, EmperorGUID, ObjectGuid::Empty, GoArena1GUID, GoArena2GUID, GoArena3GUID, GoArena4GUID, GoBarDoorGUID, GoBarKegGUID, GoBarKegTrapGUID, GoGolemNGUID, GoGolemSGUID, GoSFNGUID, GoSFSGUID, GoSpectralChaliceGUID, GoThroneGUID, MagmusGUID, MoiraGUID, and PhalanxGUID.

Referenced by SetData().

◆ GetSaveData()

std::string instance_blackrock_depths::GetSaveData ( )
inlineoverridevirtual

Reimplemented from InstanceScript.

683 {
684 return str_data;
685 }
std::string str_data
Definition instance_blackrock_depths.cpp:106

References str_data.

◆ Initialize()

void instance_blackrock_depths::Initialize ( )
inlineoverridevirtual

Reimplemented from InstanceScript.

208 {
209 memset(&encounter, 0, sizeof(encounter));
210
211 BarAleCount = 0;
212 GhostKillCount = 0;
215 tombResetTimer = 0;
216 OpenedCoofers = 0;
217 IronhandCounter = 0;
218 ArenaSpectators.clear();
219
220 // these are linked to the dungeon and not how many times the arena started.
221 arenaMobsToSpawn = urand(0, 5);
222 arenaBossToSpawn = urand(0, 5);
223 }
uint32 urand(uint32 min, uint32 max)
Definition Random.cpp:44
@ TIMER_TOMB_START
Definition instance_blackrock_depths.cpp:29
uint32 OpenedCoofers
Definition instance_blackrock_depths.cpp:144
std::vector< ObjectGuid > ArenaSpectators
Definition instance_blackrock_depths.cpp:156
uint32 GhostKillCount
Definition instance_blackrock_depths.cpp:139
uint32 IronhandCounter
Definition instance_blackrock_depths.cpp:145
uint32 TombTimer
Definition instance_blackrock_depths.cpp:142

References arenaBossToSpawn, arenaMobsToSpawn, ArenaSpectators, BarAleCount, encounter, GhostKillCount, IronhandCounter, OpenedCoofers, TIMER_TOMB_START, TombEventCounter, tombResetTimer, TombTimer, and urand().

◆ Load()

void instance_blackrock_depths::Load ( const char *  in)
inlineoverridevirtual

Reimplemented from InstanceScript.

688 {
689 if (!in)
690 {
692 return;
693 }
694
696
697 std::istringstream loadStream(in);
698 loadStream >> encounter[0] >> encounter[1] >> encounter[2] >> encounter[3]
699 >> encounter[4] >> encounter[5] >> GhostKillCount;
700
701 for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
702 if (encounter[i] == IN_PROGRESS)
704 if (GhostKillCount > 0 && GhostKillCount < 7)
705 GhostKillCount = 0;//reset tomb of seven event
706 if (GhostKillCount >= 7)
707 GhostKillCount = 7;
708
710 }
#define OUT_LOAD_INST_DATA_FAIL
Definition InstanceScript.h:33
#define OUT_LOAD_INST_DATA_COMPLETE
Definition InstanceScript.h:32
#define OUT_LOAD_INST_DATA(a)
Definition InstanceScript.h:31
@ NOT_STARTED
Definition InstanceScript.h:58
constexpr auto MAX_ENCOUNTER
Definition instance_blackrock_depths.cpp:24

References encounter, GhostKillCount, IN_PROGRESS, MAX_ENCOUNTER, NOT_STARTED, OUT_LOAD_INST_DATA, OUT_LOAD_INST_DATA_COMPLETE, and OUT_LOAD_INST_DATA_FAIL.

◆ OnCreatureCreate()

void instance_blackrock_depths::OnCreatureCreate ( Creature creature)
inlineoverridevirtual

Reimplemented from ZoneScript.

226 {
227 switch (creature->GetEntry())
228 {
229 case NPC_EMPEROR:
230 EmperorGUID = creature->GetGUID();
231 break;
232 case NPC_PHALANX:
233 PhalanxGUID = creature->GetGUID();
234 break;
235 case NPC_MOIRA:
236 MoiraGUID = creature->GetGUID();
237 break;
239 CorenGUID = creature->GetGUID();
240 break;
241 case NPC_ANGERREL:
242 TombBossGUIDs[0] = creature->GetGUID();
243 break;
244 case NPC_SEETHREL:
245 TombBossGUIDs[1] = creature->GetGUID();
246 break;
247 case NPC_DOPEREL:
248 TombBossGUIDs[2] = creature->GetGUID();
249 break;
250 case NPC_GLOOMREL:
251 TombBossGUIDs[3] = creature->GetGUID();
252 break;
253 case NPC_VILEREL:
254 TombBossGUIDs[4] = creature->GetGUID();
255 break;
256 case NPC_HATEREL:
257 TombBossGUIDs[5] = creature->GetGUID();
258 break;
259 case NPC_DOOMREL:
260 TombBossGUIDs[6] = creature->GetGUID();
261 break;
262 case NPC_MAGMUS:
263 MagmusGUID = creature->GetGUID();
264 if (!creature->IsAlive())
265 HandleGameObject(GoThroneGUID, true); // if Magmus is dead open door to last boss
266 break;
271 if (creature->IsAlive() && creature->GetPositionZ() < -51.5f && creature->GetPositionZ() > -55.f)
272 ArgelmachAdds.push_back(creature->GetGUID());
273 break;
275 ArgelmachGUID = creature->GetGUID();
276 break;
278 IronhandGUID[IronhandCounter] = creature->GetGUID();
280 break;
282 ArenaSpectators.push_back(creature->GetGUID());
283 if (encounter[TYPE_RING_OF_LAW] == DONE) // added for crashes
284 {
285 creature->SetFaction(FACTION_NEUTRAL);
287 }
288 break;
290 case NPC_SHADOWFORCE_CITIZEN: // both do the same
292 ArenaSpectators.push_back(creature->GetGUID());
293 if (encounter[TYPE_RING_OF_LAW] == DONE) // added for crashes
294 {
295 creature->SetFaction(FACTION_NEUTRAL);
297 }
298 break;
300 // keep track of Senators that are not too far from emperor. Can't really use emperor as creature due to him possibly not being spawned.
301 // some senators spawn at ring of law
303 EmperorSenatorsVector.push_back(creature->GetGUID());
304 break;
305 default:
306 break;
307 }
308 }
@ DONE
Definition InstanceScript.h:61
@ REACT_DEFENSIVE
Definition Unit.h:567
@ NPC_EMPEROR
Definition blackrock_depths.h:90
@ NPC_COREN_DIREBREW
Definition blackrock_depths.h:110
@ NPC_IRONHAND_GUARDIAN
Definition blackrock_depths.h:112
@ NPC_SHADOWFORGE_SENATOR
Definition blackrock_depths.h:118
@ NPC_DOOMREL
Definition blackrock_depths.h:98
@ NPC_VILEREL
Definition blackrock_depths.h:95
@ NPC_RAGEREAVER_GOLEM
Definition blackrock_depths.h:106
@ NPC_ANGERREL
Definition blackrock_depths.h:92
@ NPC_WEAPON_TECHNICIAN
Definition blackrock_depths.h:104
@ NPC_DOOMFORGE_ARCANASMITH
Definition blackrock_depths.h:105
@ NPC_SHADOWFORCE_CITIZEN
Definition blackrock_depths.h:116
@ NPC_HATEREL
Definition blackrock_depths.h:94
@ NPC_MAGMUS
Definition blackrock_depths.h:120
@ NPC_GOLEM_LORD_ARGELMACH
Definition blackrock_depths.h:108
@ NPC_SHADOWFORGE_PEASANT
Definition blackrock_depths.h:115
@ NPC_WRATH_HAMMER_CONSTRUCT
Definition blackrock_depths.h:107
@ NPC_DOPEREL
Definition blackrock_depths.h:93
@ NPC_PHALANX
Definition blackrock_depths.h:91
@ NPC_GLOOMREL
Definition blackrock_depths.h:97
@ NPC_ARENA_SPECTATOR
Definition blackrock_depths.h:114
@ NPC_SEETHREL
Definition blackrock_depths.h:96
@ NPC_MOIRA
Definition blackrock_depths.h:99
@ FACTION_NEUTRAL
Definition blackrock_depths.h:28
void SetReactState(ReactStates state)
A creature can have 3 ReactStates : Agressive, Passive, Neutral.
Definition Creature.h:99
void HandleGameObject(ObjectGuid guid, bool open, GameObject *go=nullptr)
Open or close a GameObject by GUID.
Definition InstanceScript.cpp:125
uint32 GetEntry() const
Definition Object.h:117
static ObjectGuid GetGUID(Object const *o)
Definition Object.h:114
void SetFaction(uint32 faction)
Definition Unit.cpp:7056
float GetDistance2d(WorldObject const *obj) const
Definition Object.cpp:1313
@ DISTANCE_EMPEROR_ROOM
Definition instance_blackrock_depths.cpp:36
@ RADIUS_RING_OF_LAW
Definition instance_blackrock_depths.cpp:35
float GetPositionZ() const
Definition Position.h:123
float GetPositionX() const
Definition Position.h:121
float GetPositionY() const
Definition Position.h:122
GuidList ArgelmachAdds
Definition instance_blackrock_depths.cpp:147
ObjectGuid IronhandGUID[6]
Definition instance_blackrock_depths.cpp:113
Position CenterOfRingOfLaw
Definition instance_blackrock_depths.cpp:157
std::vector< ObjectGuid > EmperorSenatorsVector
Definition instance_blackrock_depths.cpp:160
ObjectGuid ArgelmachGUID
Definition instance_blackrock_depths.cpp:148
Position EmperorSpawnPos
Definition instance_blackrock_depths.cpp:161

References ArenaSpectators, ArgelmachAdds, ArgelmachGUID, CenterOfRingOfLaw, CorenGUID, DISTANCE_EMPEROR_ROOM, DONE, EmperorGUID, EmperorSenatorsVector, EmperorSpawnPos, encounter, FACTION_NEUTRAL, WorldObject::GetDistance2d(), Object::GetEntry(), Object::GetGUID(), Position::GetPositionX(), Position::GetPositionY(), Position::GetPositionZ(), GoThroneGUID, InstanceScript::HandleGameObject(), IronhandCounter, IronhandGUID, Unit::IsAlive(), MagmusGUID, MoiraGUID, NPC_ANGERREL, NPC_ARENA_SPECTATOR, NPC_COREN_DIREBREW, NPC_DOOMFORGE_ARCANASMITH, NPC_DOOMREL, NPC_DOPEREL, NPC_EMPEROR, NPC_GLOOMREL, NPC_GOLEM_LORD_ARGELMACH, NPC_HATEREL, NPC_IRONHAND_GUARDIAN, NPC_MAGMUS, NPC_MOIRA, NPC_PHALANX, NPC_RAGEREAVER_GOLEM, NPC_SEETHREL, NPC_SHADOWFORCE_CITIZEN, NPC_SHADOWFORGE_PEASANT, NPC_SHADOWFORGE_SENATOR, NPC_VILEREL, NPC_WEAPON_TECHNICIAN, NPC_WRATH_HAMMER_CONSTRUCT, PhalanxGUID, RADIUS_RING_OF_LAW, REACT_DEFENSIVE, Unit::SetFaction(), Creature::SetReactState(), TombBossGUIDs, and TYPE_RING_OF_LAW.

◆ OnGameObjectCreate()

void instance_blackrock_depths::OnGameObjectCreate ( GameObject go)
inlineoverridevirtual

Reimplemented from ZoneScript.

311 {
312 switch (go->GetEntry())
313 {
314 case GO_ARENA1:
315 GoArena1GUID = go->GetGUID();
316 break;
317 case GO_ARENA2:
318 GoArena2GUID = go->GetGUID();
319 break;
320 case GO_ARENA3:
321 GoArena3GUID = go->GetGUID();
322 break;
323 case GO_ARENA4:
324 GoArena4GUID = go->GetGUID();
325 break;
326 case GO_SHADOW_LOCK:
328 break;
331 break;
334 break;
335 case GO_SHADOW_DUMMY:
337 break;
338 case GO_BAR_KEG_SHOT:
339 GoBarKegGUID = go->GetGUID();
340 break;
341 case GO_BAR_KEG_TRAP:
343 break;
344 case GO_BAR_DOOR:
345 GoBarDoorGUID = go->GetGUID();
346 break;
347 case GO_TOMB_ENTER:
348 GoTombEnterGUID = go->GetGUID();
349 break;
350 case GO_TOMB_EXIT:
351 GoTombExitGUID = go->GetGUID();
352 if (GhostKillCount >= 7)
354 else
356 break;
357 case GO_LYCEUM:
358 GoLyceumGUID = go->GetGUID();
359 break;
360 case GO_SF_S:
361 GoSFSGUID = go->GetGUID();
362 break;
363 case GO_SF_N:
364 GoSFNGUID = go->GetGUID();
365 break;
366 case GO_GOLEM_ROOM_N:
367 GoGolemNGUID = go->GetGUID();
368 break;
369 case GO_GOLEM_ROOM_S:
370 GoGolemSGUID = go->GetGUID();
371 break;
372 case GO_THRONE_ROOM:
373 GoThroneGUID = go->GetGUID();
374 break;
375 case GO_CHEST_SEVEN:
376 GoChestGUID = go->GetGUID();
377 break;
380 break;
381 }
382 }
@ GO_SHADOW_MECHANISM
Definition instance_blackrock_depths.cpp:52
@ GO_ARENA3
Definition instance_blackrock_depths.cpp:49
@ GO_GOLEM_ROOM_N
Definition instance_blackrock_depths.cpp:63
@ GO_SHADOW_LOCK
Definition instance_blackrock_depths.cpp:51
@ GO_SHADOW_GIANT_DOOR
Definition instance_blackrock_depths.cpp:53
@ GO_TOMB_EXIT
Definition instance_blackrock_depths.cpp:59
@ GO_LYCEUM
Definition instance_blackrock_depths.cpp:60
@ GO_SHADOW_DUMMY
Definition instance_blackrock_depths.cpp:54
@ GO_SF_S
Definition instance_blackrock_depths.cpp:62
@ GO_TOMB_ENTER
Definition instance_blackrock_depths.cpp:58
@ GO_ARENA2
Definition instance_blackrock_depths.cpp:48
@ GO_GOLEM_ROOM_S
Definition instance_blackrock_depths.cpp:64
@ GO_BAR_DOOR
Definition instance_blackrock_depths.cpp:57
@ GO_SF_N
Definition instance_blackrock_depths.cpp:61
@ GO_BAR_KEG_SHOT
Definition instance_blackrock_depths.cpp:55
@ GO_ARENA4
Definition instance_blackrock_depths.cpp:50
@ GO_ARENA1
Definition instance_blackrock_depths.cpp:47
@ GO_SPECTRAL_CHALICE
Definition instance_blackrock_depths.cpp:66
@ GO_BAR_KEG_TRAP
Definition instance_blackrock_depths.cpp:56
@ GO_THRONE_ROOM
Definition instance_blackrock_depths.cpp:65
@ GO_CHEST_SEVEN
Definition instance_blackrock_depths.cpp:67
ObjectGuid GoTombExitGUID
Definition instance_blackrock_depths.cpp:128
ObjectGuid GoShadowMechGUID
Definition instance_blackrock_depths.cpp:121
ObjectGuid GoShadowDummyGUID
Definition instance_blackrock_depths.cpp:123
ObjectGuid GoShadowGiantGUID
Definition instance_blackrock_depths.cpp:122
ObjectGuid GoTombEnterGUID
Definition instance_blackrock_depths.cpp:127
ObjectGuid GoShadowLockGUID
Definition instance_blackrock_depths.cpp:120
ObjectGuid GoChestGUID
Definition instance_blackrock_depths.cpp:135
ObjectGuid GoLyceumGUID
Definition instance_blackrock_depths.cpp:129

References ObjectGuid::Empty, Object::GetEntry(), Object::GetGUID(), GhostKillCount, GO_ARENA1, GO_ARENA2, GO_ARENA3, GO_ARENA4, GO_BAR_DOOR, GO_BAR_KEG_SHOT, GO_BAR_KEG_TRAP, GO_CHEST_SEVEN, GO_GOLEM_ROOM_N, GO_GOLEM_ROOM_S, GO_LYCEUM, GO_SF_N, GO_SF_S, GO_SHADOW_DUMMY, GO_SHADOW_GIANT_DOOR, GO_SHADOW_LOCK, GO_SHADOW_MECHANISM, GO_SPECTRAL_CHALICE, GO_THRONE_ROOM, GO_TOMB_ENTER, GO_TOMB_EXIT, GoArena1GUID, GoArena2GUID, GoArena3GUID, GoArena4GUID, GoBarDoorGUID, GoBarKegGUID, GoBarKegTrapGUID, GoChestGUID, GoGolemNGUID, GoGolemSGUID, GoLyceumGUID, GoSFNGUID, GoSFSGUID, GoShadowDummyGUID, GoShadowGiantGUID, GoShadowLockGUID, GoShadowMechGUID, GoSpectralChaliceGUID, GoThroneGUID, GoTombEnterGUID, GoTombExitGUID, and InstanceScript::HandleGameObject().

◆ OnPlayerEnter()

void instance_blackrock_depths::OnPlayerEnter ( Player )
inlineoverridevirtual

Reimplemented from InstanceScript.

164 {
165 ReplaceMoiraIfSaved(); // In case a player joins the party during the run
166 // SetData(TYPE_RING_OF_LAW, DONE);
167 }
void ReplaceMoiraIfSaved()
Definition instance_blackrock_depths.cpp:169

References ReplaceMoiraIfSaved().

◆ OnUnitDeath()

void instance_blackrock_depths::OnUnitDeath ( Unit unit)
inlineoverridevirtual

Reimplemented from ZoneScript.

385 {
386 uint32 deadSenators = 0;
387 switch (unit->GetEntry())
388 {
393 ArgelmachAdds.remove(unit->GetGUID());
394 break;
395 case NPC_MAGMUS:
397 break;
399 deadSenators = 1; //hacky, but we cannot count the unit that just died through its state because OnUnitDeath() is called before the state is set.
400 for (const auto &senatorGUID: EmperorSenatorsVector)
401 if (Creature* senator = instance->GetCreature(senatorGUID))
402 if (!senator->IsAlive() || senator->isDying())
403 deadSenators++;
404
405 if (Creature* emperor = instance->GetCreature(EmperorGUID))
406 // send % of senators that died
407 emperor->AI()->SetData(0, (100 * deadSenators) / EmperorSenatorsVector.size());
408 break;
409 case NPC_ANGERREL:
410 case NPC_DOPEREL:
411 case NPC_HATEREL:
412 case NPC_VILEREL:
413 case NPC_SEETHREL:
414 case NPC_GLOOMREL:
415 case NPC_DOOMREL:
417 if (GhostKillCount >= 7)
419 break;
420 default:
421 break;
422 }
423 }
std::uint32_t uint32
Definition Define.h:107
Creature * GetCreature(uint32 type)
Definition InstanceScript.cpp:115
void SetData(uint32 type, uint32 data) override
Definition instance_blackrock_depths.cpp:425

References ArgelmachAdds, DONE, EmperorGUID, EmperorSenatorsVector, Map::GetCreature(), Object::GetEntry(), Object::GetGUID(), GhostKillCount, InstanceScript::instance, NPC_ANGERREL, NPC_DOOMFORGE_ARCANASMITH, NPC_DOOMREL, NPC_DOPEREL, NPC_GLOOMREL, NPC_HATEREL, NPC_MAGMUS, NPC_RAGEREAVER_GOLEM, NPC_SEETHREL, NPC_SHADOWFORGE_SENATOR, NPC_VILEREL, NPC_WEAPON_TECHNICIAN, NPC_WRATH_HAMMER_CONSTRUCT, SetData(), TYPE_IRON_HALL, and TYPE_TOMB_OF_SEVEN.

◆ ReplaceMoiraIfSaved()

void instance_blackrock_depths::ReplaceMoiraIfSaved ( )
inline
170 {
171 ObjectGuid* GUIDToReplace = &PriestessGUID; // default to having Moira
172 ObjectGuid* GUIDToSpawn = &MoiraGUID;
173 uint32 NPCEntry = NPC_MOIRA;
174 bool MoiraSaved = true;
175
176 // check if all players saved her.
177 Map::PlayerList const& lPlayers = instance->GetPlayers();
178 if (!lPlayers.IsEmpty())
179 {
180 for (Map::PlayerList::const_iterator itr = lPlayers.begin(); itr != lPlayers.end(); ++itr)
181 {
182 if (Player* player = itr->GetSource())
183 {
184 // set to false if this player hasn't saved her. Another player can't put it to true.
185 MoiraSaved = MoiraSaved && ((player->GetQuestStatus(PRINCESS_QUEST_HORDE) == QUEST_STATUS_REWARDED)
186 || (player->GetQuestStatus(PRINCESS_QUEST_ALLIANCE) == QUEST_STATUS_REWARDED));
187 }
188 }
189 }
190
191 // assign correct GUIDs and spawn targets
192 if (MoiraSaved)
193 {
194 GUIDToReplace = &MoiraGUID;
195 GUIDToSpawn = &PriestessGUID;
196 NPCEntry = NPC_PRIESTESS;
197 }
198
199 if (Creature* CreatureToReplace = instance->GetCreature(*GUIDToReplace))
200 {
201 Creature* NewSpawn = instance->SummonCreature(NPCEntry, CreatureToReplace->GetPosition());
202 CreatureToReplace->RemoveFromWorld();
203 *GUIDToSpawn = NewSpawn->GetGUID();
204 }
205 }
@ QUEST_STATUS_REWARDED
Definition QuestDef.h:106
@ NPC_PRIESTESS
Definition blackrock_depths.h:100
Definition LinkedList.h:139
bool IsEmpty() const
Definition LinkedList.h:97
Definition MapRefMgr.h:26
iterator begin()
Definition MapRefMgr.h:36
iterator end()
Definition MapRefMgr.h:37
PlayerList const & GetPlayers() const
Definition Map.h:326
TempSummon * SummonCreature(uint32 entry, Position const &pos, SummonPropertiesEntry const *properties=nullptr, uint32 duration=0, WorldObject *summoner=nullptr, uint32 spellId=0, uint32 vehId=0, bool visibleBySummonerOnly=false)
Definition Object.cpp:2188
Definition ObjectGuid.h:118
Definition Player.h:1084
void RemoveFromWorld() override
Definition TemporarySummon.cpp:331
@ PRINCESS_QUEST_HORDE
Definition instance_blackrock_depths.cpp:41
@ PRINCESS_QUEST_ALLIANCE
Definition instance_blackrock_depths.cpp:42
ObjectGuid PriestessGUID
Definition instance_blackrock_depths.cpp:112

References MapRefMgr::begin(), MapRefMgr::end(), Map::GetCreature(), Object::GetGUID(), Map::GetPlayers(), InstanceScript::instance, LinkedListHead::IsEmpty(), MoiraGUID, NPC_MOIRA, NPC_PRIESTESS, PriestessGUID, PRINCESS_QUEST_ALLIANCE, PRINCESS_QUEST_HORDE, QUEST_STATUS_REWARDED, TempSummon::RemoveFromWorld(), and Map::SummonCreature().

Referenced by OnPlayerEnter(), and SetData().

◆ SetData()

void instance_blackrock_depths::SetData ( uint32  type,
uint32  data 
)
inlineoverridevirtual

Reimplemented from ZoneScript.

426 {
427 LOG_DEBUG("scripts.ai", "Instance Blackrock Depths: SetData update (Type: {} Data {})", type, data);
428
429 switch (type)
430 {
431 case TYPE_RING_OF_LAW:
432 encounter[0] = data;
433 switch (data)
434 {
435 case IN_PROGRESS:
437 break;
438 case FAIL:
440 {
442 TempSummonGrimstone = nullptr;
444 }
446 break;
447 case DONE:
448 for (auto const& itr : ArenaSpectators)
449 if (Creature* spectator = instance->GetCreature(itr))
450 {
451 spectator->SetFaction(FACTION_NEUTRAL);
452 spectator->SetReactState(REACT_DEFENSIVE);
453 }
454 break;
455 default:
456 break;
457 }
458 break;
459 case TYPE_VAULT:
460 encounter[1] = data;
461 break;
462 case TYPE_BAR:
463 if (data == SPECIAL)
464 ++BarAleCount;
465 else
466 encounter[2] = data;
467 break;
469 encounter[3] = data;
470 switch (data)
471 {
472 case IN_PROGRESS:
475 break;
476 case DONE:
480 break;
481 }
482 break;
483 case TYPE_LYCEUM:
484 encounter[4] = data;
485 if (data == DONE)
486 {
489 if (Creature* magmus = instance->GetCreature(MagmusGUID))
490 magmus->AI()->Talk(0);
491 ReplaceMoiraIfSaved(); // Need to place the correct final boss, but we need her to be spawned first.
492 }
493 break;
494 case TYPE_IRON_HALL:
495 encounter[5] = data;
496 switch (data)
497 {
498 case NOT_STARTED:
499 case IN_PROGRESS:
500 for (int i = 0; i < 6; i++)
501 if (Creature* ironhand = instance->GetCreature(IronhandGUID[i]))
502 ironhand->AI()->SetData(0, data == IN_PROGRESS);
503 break;
504 case DONE:
506 break;
507 default:
508 break;
509 }
510 break;
512 OpenedCoofers += 1;
513 if (OpenedCoofers == 12)
514 {
515 Position pos = {812.15f, -348.91f, -50.579f, 0.7f};
517 summon->SetTempSummonType(TEMPSUMMON_MANUAL_DESPAWN);
518 }
519 break;
521 {
522 if (Creature* argelmach = instance->GetCreature(ArgelmachGUID))
523 {
524 GuidList adds = ArgelmachAdds;
525 for (GuidList::const_iterator itr = adds.begin(); itr != adds.end();)
526 {
527 if (Creature* argelmachAdd = instance->GetCreature(*itr))
528 {
529 if (argelmachAdd->GetEntry() == NPC_WRATH_HAMMER_CONSTRUCT)
530 {
531 argelmachAdd->RemoveAurasDueToSpell(SPELL_STONED);
532 argelmachAdd->AI()->AttackStart(argelmach->GetVictim());
533 itr = adds.erase(itr);
534 }
535 else if (argelmachAdd->GetEntry() == NPC_RAGEREAVER_GOLEM)
536 {
537 if (argelmachAdd->IsWithinDist2d(argelmach, 10.f))
538 {
539 argelmachAdd->RemoveAurasDueToSpell(SPELL_STONED);
540 argelmachAdd->AI()->AttackStart(argelmach->GetVictim());
541 itr = adds.erase(itr);
542 }
543 else
544 ++itr;
545 }
546 else
547 {
548 ++itr;
549 }
550 }
551 else
552 {
553 ++itr;
554 }
555 }
556
557 if (!adds.empty())
558 {
559 argelmach->SetReactState(REACT_PASSIVE);
560 argelmach->SetTarget();
561 argelmach->AI()->SetData(DATA_GOLEM_LORD_ARGELMACH_INIT, IN_PROGRESS);
562 }
563 else
564 {
565 argelmach->AI()->SetData(DATA_GOLEM_LORD_ARGELMACH_INIT, DONE);
566 }
567 }
568 break;
569 }
571 {
572 if (Creature* argelmach = instance->GetCreature(ArgelmachGUID))
573 {
574 argelmach->HandleEmoteCommand(EMOTE_ONESHOT_SHOUT);
575 argelmach->m_Events.AddEventAtOffset(new RestoreAttack(argelmach), 3s);
576
577 for (ObjectGuid const& argelmachAddGUID : ArgelmachAdds)
578 if (Creature* argelmachAdd = instance->GetCreature(argelmachAddGUID))
579 if (!argelmachAdd->IsInCombat())
580 {
581 argelmachAdd->RemoveAurasDueToSpell(SPELL_STONED);
582 argelmachAdd->AI()->AttackStart(argelmach->GetVictim());
583 }
584 }
585 break;
586 }
587 default:
588 break;
589 }
590
591 if (data == DONE || GhostKillCount >= 7)
592 {
594
595 std::ostringstream saveStream;
596 saveStream << encounter[0] << ' ' << encounter[1] << ' ' << encounter[2] << ' '
597 << encounter[3] << ' ' << encounter[4] << ' ' << encounter[5] << ' ' << GhostKillCount;
598
599 str_data = saveStream.str();
600
601 SaveToDB();
603 }
604 }
constexpr auto DAY
Definition Common.h:49
#define OUT_SAVE_INST_DATA_COMPLETE
Definition InstanceScript.h:30
#define OUT_SAVE_INST_DATA
Definition InstanceScript.h:29
@ FAIL
Definition InstanceScript.h:60
#define LOG_DEBUG(filterType__,...)
Definition Log.h:170
std::list< ObjectGuid > GuidList
Definition ObjectGuid.h:254
@ TEMPSUMMON_MANUAL_DESPAWN
Definition Object.h:56
@ EMOTE_ONESHOT_SHOUT
Definition SharedDefines.h:1920
@ REACT_PASSIVE
Definition Unit.h:566
@ NPC_WATCHMAN_DOOMGRIP
Definition blackrock_depths.h:102
@ NPC_GRIMSTONE
Definition blackrock_depths.h:142
@ DATA_GOLEM_LORD_ARGELMACH_ADDS
Definition blackrock_depths.h:72
@ DATA_GOLEM_LORD_ARGELMACH_INIT
Definition blackrock_depths.h:71
@ DATA_OPEN_COFFER_DOORS
Definition blackrock_depths.h:69
void SaveToDB()
Definition InstanceScript.cpp:41
void DoRespawnGameObject(ObjectGuid guid, uint32 timeToDespawn=MINUTE)
Definition InstanceScript.cpp:578
Definition instance_blackrock_depths.cpp:76
Definition TemporarySummon.h:50
@ SPELL_STONED
Definition instance_blackrock_depths.cpp:72
Seconds GetGameTime()
Definition GameTime.cpp:38
Definition Position.h:27
TempSummon * TempSummonGrimstone
Definition instance_blackrock_depths.cpp:150
Position GrimstonePositon
Definition instance_blackrock_depths.cpp:151
ObjectGuid GetGuidData(uint32 data) const override
Definition instance_blackrock_depths.cpp:635

References ArenaSpectators, ArgelmachAdds, ArgelmachGUID, BarAleCount, DATA_GOLEM_DOOR_N, DATA_GOLEM_DOOR_S, DATA_GOLEM_LORD_ARGELMACH_ADDS, DATA_GOLEM_LORD_ARGELMACH_INIT, DATA_OPEN_COFFER_DOORS, DATA_THRONE_DOOR, DAY, DONE, InstanceScript::DoRespawnGameObject(), EMOTE_ONESHOT_SHOUT, encounter, FACTION_NEUTRAL, FAIL, Map::GetCreature(), GameTime::GetGameTime(), GetGuidData(), GhostKillCount, GoChestGUID, GoTombEnterGUID, GoTombExitGUID, GrimstonePositon, InstanceScript::HandleGameObject(), IN_PROGRESS, InstanceScript::instance, IronhandGUID, LOG_DEBUG, MagmusGUID, NOT_STARTED, NPC_GRIMSTONE, NPC_RAGEREAVER_GOLEM, NPC_WATCHMAN_DOOMGRIP, NPC_WRATH_HAMMER_CONSTRUCT, OpenedCoofers, OUT_SAVE_INST_DATA, OUT_SAVE_INST_DATA_COMPLETE, REACT_DEFENSIVE, REACT_PASSIVE, TempSummon::RemoveFromWorld(), ReplaceMoiraIfSaved(), InstanceScript::SaveToDB(), SetData(), SPECIAL, SPELL_STONED, str_data, Map::SummonCreature(), TEMPSUMMON_MANUAL_DESPAWN, TempSummonGrimstone, timeRingFail, TYPE_BAR, TYPE_IRON_HALL, TYPE_LYCEUM, TYPE_RING_OF_LAW, TYPE_TOMB_OF_SEVEN, and TYPE_VAULT.

Referenced by OnUnitDeath(), SetData(), and TombOfSevenReset().

◆ TombOfSevenEvent()

void instance_blackrock_depths::TombOfSevenEvent ( )
inline
713 {
715 {
717 {
719 boss->SetFaction(FACTION_DARK_IRON_DWARVES);
720 boss->SetImmuneToPC(false);
721
722 // find suitable target here.
723 Player* target = boss->SelectNearestPlayer(130);
724 if (target && boss->CanCreatureAttack(target, true))
725 {
726 boss->AI()->AttackStart(target);
727 boss->AI()->DoZoneInCombat();
729 }
730 }
731 }
732 }
@ FACTION_DARK_IRON_DWARVES
Definition SharedDefines.h:210
Player * SelectNearestPlayer(float distance=0) const
Definition Object.cpp:2526

References FACTION_DARK_IRON_DWARVES, Map::GetCreature(), GhostKillCount, InstanceScript::instance, WorldObject::SelectNearestPlayer(), TIMER_TOMB_RESET, TombBossGUIDs, TombEventCounter, and tombResetTimer.

Referenced by Update().

◆ TombOfSevenReset()

void instance_blackrock_depths::TombOfSevenReset ( )
inline
735 {
736 HandleGameObject(GoTombExitGUID, false);// close exit door
737 HandleGameObject(GoTombEnterGUID, true);// open entrance door
738 for (uint8 i = 0; i < 7; ++i)
740 {
741 if (!boss->IsAlive())
742 {
743 //do not call EnterEvadeMode(), it will create infinit loops
744 boss->Respawn();
745 boss->RemoveAllAuras();
746 boss->GetThreatMgr().ClearAllThreat();
747 boss->CombatStop(true);
748 boss->LoadCreaturesAddon(true);
749 boss->GetMotionMaster()->MoveTargetedHome();
750 boss->SetLootRecipient(nullptr);
751 }
752 boss->SetFaction(FACTION_FRIENDLY);
753 boss->SetImmuneToPC(true); // think this is useless
754 if (i == 6) // doomrel needs explicit reset
755 boss->AI()->Reset();
756 }
757
758 GhostKillCount = 0;
762 }
@ FACTION_FRIENDLY
Definition SharedDefines.h:189

References FACTION_FRIENDLY, Map::GetCreature(), GhostKillCount, GoTombEnterGUID, GoTombExitGUID, InstanceScript::HandleGameObject(), InstanceScript::instance, NOT_STARTED, SetData(), TIMER_TOMB_START, TombBossGUIDs, TombEventCounter, TombTimer, and TYPE_TOMB_OF_SEVEN.

Referenced by Update().

◆ Update()

void instance_blackrock_depths::Update ( uint32  diff)
inlineoverridevirtual

Reimplemented from InstanceScript.

787 {
789 {
790 if (TombTimer <= diff)
791 {
794 }
795 else
796 {
797 TombTimer -= diff;
798 }
799
800 if (CheckTombReset(diff))
802 }
803 }
@ TIMER_TOMBOFTHESEVEN
Definition instance_blackrock_depths.cpp:28
uint32 GetData(uint32 type) const override
Definition instance_blackrock_depths.cpp:606
void TombOfSevenReset()
Definition instance_blackrock_depths.cpp:734
void TombOfSevenEvent()
Definition instance_blackrock_depths.cpp:712
bool CheckTombReset(uint32 diff)
Definition instance_blackrock_depths.cpp:764

References CheckTombReset(), GetData(), GhostKillCount, IN_PROGRESS, TIMER_TOMBOFTHESEVEN, TombOfSevenEvent(), TombOfSevenReset(), TombTimer, and TYPE_TOMB_OF_SEVEN.

Member Data Documentation

◆ arenaBossToSpawn

uint8 instance_blackrock_depths::arenaBossToSpawn

Referenced by GetData(), and Initialize().

◆ arenaMobsToSpawn

uint8 instance_blackrock_depths::arenaMobsToSpawn

Referenced by GetData(), and Initialize().

◆ ArenaSpectators

std::vector<ObjectGuid> instance_blackrock_depths::ArenaSpectators

◆ ArgelmachAdds

GuidList instance_blackrock_depths::ArgelmachAdds

◆ ArgelmachGUID

ObjectGuid instance_blackrock_depths::ArgelmachGUID

Referenced by OnCreatureCreate(), and SetData().

◆ BarAleCount

uint32 instance_blackrock_depths::BarAleCount

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

◆ CenterOfRingOfLaw

Position instance_blackrock_depths::CenterOfRingOfLaw = Position(595.289, -186.56)

Referenced by OnCreatureCreate().

◆ CorenGUID

ObjectGuid instance_blackrock_depths::CorenGUID

Referenced by GetGuidData(), and OnCreatureCreate().

◆ EmperorGUID

ObjectGuid instance_blackrock_depths::EmperorGUID

◆ EmperorSenators

ObjectGuid instance_blackrock_depths::EmperorSenators[5]

◆ EmperorSenatorsVector

std::vector<ObjectGuid> instance_blackrock_depths::EmperorSenatorsVector

Referenced by OnCreatureCreate(), and OnUnitDeath().

◆ EmperorSpawnPos

Position instance_blackrock_depths::EmperorSpawnPos = Position(1380.52, -831, 115)

Referenced by OnCreatureCreate().

◆ encounter

uint32 instance_blackrock_depths::encounter[MAX_ENCOUNTER]

◆ GhostKillCount

uint32 instance_blackrock_depths::GhostKillCount

◆ GoArena1GUID

ObjectGuid instance_blackrock_depths::GoArena1GUID

Referenced by GetGuidData(), and OnGameObjectCreate().

◆ GoArena2GUID

ObjectGuid instance_blackrock_depths::GoArena2GUID

Referenced by GetGuidData(), and OnGameObjectCreate().

◆ GoArena3GUID

ObjectGuid instance_blackrock_depths::GoArena3GUID

Referenced by GetGuidData(), and OnGameObjectCreate().

◆ GoArena4GUID

ObjectGuid instance_blackrock_depths::GoArena4GUID

Referenced by GetGuidData(), and OnGameObjectCreate().

◆ GoBarDoorGUID

ObjectGuid instance_blackrock_depths::GoBarDoorGUID

Referenced by GetGuidData(), and OnGameObjectCreate().

◆ GoBarKegGUID

ObjectGuid instance_blackrock_depths::GoBarKegGUID

Referenced by GetGuidData(), and OnGameObjectCreate().

◆ GoBarKegTrapGUID

ObjectGuid instance_blackrock_depths::GoBarKegTrapGUID

Referenced by GetGuidData(), and OnGameObjectCreate().

◆ GoChestGUID

ObjectGuid instance_blackrock_depths::GoChestGUID

Referenced by OnGameObjectCreate(), and SetData().

◆ GoGolemNGUID

ObjectGuid instance_blackrock_depths::GoGolemNGUID

Referenced by GetGuidData(), and OnGameObjectCreate().

◆ GoGolemSGUID

ObjectGuid instance_blackrock_depths::GoGolemSGUID

Referenced by GetGuidData(), and OnGameObjectCreate().

◆ GoLyceumGUID

ObjectGuid instance_blackrock_depths::GoLyceumGUID

Referenced by OnGameObjectCreate().

◆ GoSFNGUID

ObjectGuid instance_blackrock_depths::GoSFNGUID

Referenced by GetGuidData(), and OnGameObjectCreate().

◆ GoSFSGUID

ObjectGuid instance_blackrock_depths::GoSFSGUID

Referenced by GetGuidData(), and OnGameObjectCreate().

◆ GoShadowDummyGUID

ObjectGuid instance_blackrock_depths::GoShadowDummyGUID

Referenced by OnGameObjectCreate().

◆ GoShadowGiantGUID

ObjectGuid instance_blackrock_depths::GoShadowGiantGUID

Referenced by OnGameObjectCreate().

◆ GoShadowLockGUID

ObjectGuid instance_blackrock_depths::GoShadowLockGUID

Referenced by OnGameObjectCreate().

◆ GoShadowMechGUID

ObjectGuid instance_blackrock_depths::GoShadowMechGUID

Referenced by OnGameObjectCreate().

◆ GoSpectralChaliceGUID

ObjectGuid instance_blackrock_depths::GoSpectralChaliceGUID

Referenced by GetGuidData(), and OnGameObjectCreate().

◆ GoThroneGUID

ObjectGuid instance_blackrock_depths::GoThroneGUID

◆ GoTombEnterGUID

ObjectGuid instance_blackrock_depths::GoTombEnterGUID

◆ GoTombExitGUID

ObjectGuid instance_blackrock_depths::GoTombExitGUID

◆ GrimstonePositon

Position instance_blackrock_depths::GrimstonePositon = Position(625.559f, -205.618f, -52.735f, 2.609f)

Referenced by SetData().

◆ IronhandCounter

uint32 instance_blackrock_depths::IronhandCounter

Referenced by Initialize(), and OnCreatureCreate().

◆ IronhandGUID

ObjectGuid instance_blackrock_depths::IronhandGUID[6]

Referenced by OnCreatureCreate(), and SetData().

◆ MagmusGUID

ObjectGuid instance_blackrock_depths::MagmusGUID

◆ MoiraGUID

ObjectGuid instance_blackrock_depths::MoiraGUID

◆ OpenedCoofers

uint32 instance_blackrock_depths::OpenedCoofers

Referenced by Initialize(), and SetData().

◆ PhalanxGUID

ObjectGuid instance_blackrock_depths::PhalanxGUID

Referenced by GetGuidData(), and OnCreatureCreate().

◆ PriestessGUID

ObjectGuid instance_blackrock_depths::PriestessGUID

Referenced by ReplaceMoiraIfSaved().

◆ str_data

std::string instance_blackrock_depths::str_data

Referenced by GetSaveData(), and SetData().

◆ TempSummonGrimstone

TempSummon* instance_blackrock_depths::TempSummonGrimstone = nullptr

Referenced by SetData().

◆ timeRingFail

time_t instance_blackrock_depths::timeRingFail = 0

Referenced by GetData(), and SetData().

◆ TombBossGUIDs

ObjectGuid instance_blackrock_depths::TombBossGUIDs[7]

◆ TombEventCounter

uint32 instance_blackrock_depths::TombEventCounter

◆ tombResetTimer

uint32 instance_blackrock_depths::tombResetTimer

◆ TombTimer

uint32 instance_blackrock_depths::TombTimer

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