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

Public Member Functions

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

Public Attributes

uint32 m_auiEncounter [MAX_ENCOUNTER]
 
TeamId teamIdInInstance
 
uint32 InstanceProgress
 
std::string str_data
 
ObjectGuid NPC_LeaderFirstGUID
 
ObjectGuid NPC_LeaderSecondGUID
 
ObjectGuid NPC_TyrannusEventGUID
 
ObjectGuid NPC_Necrolyte1GUID
 
ObjectGuid NPC_Necrolyte2GUID
 
ObjectGuid NPC_GuardFirstGUID
 
ObjectGuid NPC_GuardSecondGUID
 
ObjectGuid NPC_SindragosaGUID
 
ObjectGuid NPC_GarfrostGUID
 
ObjectGuid NPC_MartinOrGorkunGUID
 
ObjectGuid NPC_RimefangGUID
 
ObjectGuid NPC_TyrannusGUID
 
ObjectGuid GO_IceWallGUID
 
bool bAchievEleven
 
bool bAchievDontLookUp
 
- 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_pit_of_saron_InstanceScript()

instance_pit_of_saron::instance_pit_of_saron_InstanceScript::instance_pit_of_saron_InstanceScript ( Map map)
inline
31 : InstanceScript(map)
32 {
34 }
#define DataHeader
Definition: blackrock_depths.h:23
Definition: InstanceScript.h:142
void SetHeaders(std::string const &dataHeaders)
Definition: InstanceScript.cpp:141

References DataHeader, and InstanceScript::SetHeaders().

Member Function Documentation

◆ CheckAchievementCriteriaMeet()

bool instance_pit_of_saron::instance_pit_of_saron_InstanceScript::CheckAchievementCriteriaMeet ( uint32  criteria_id,
Player const *  ,
Unit const *  ,
uint32   
)
inlineoverridevirtual

Reimplemented from InstanceScript.

376 {
377 switch (criteria_id)
378 {
379 case 12993: // Doesn't Go to Eleven (4524)
380 return bAchievEleven;
381 }
382 return false;
383 }
bool bAchievEleven
Definition: instance_pit_of_saron.cpp:57

References bAchievEleven.

◆ GetCreatureEntry()

uint32 instance_pit_of_saron::instance_pit_of_saron_InstanceScript::GetCreatureEntry ( ObjectGuid::LowType  ,
CreatureData const *  data 
)
inlineoverridevirtual

Reimplemented from ZoneScript.

86 {
88 {
89 Map::PlayerList const& players = instance->GetPlayers();
90 if (!players.IsEmpty())
91 if (Player* player = players.begin()->GetSource())
92 teamIdInInstance = player->GetTeamId();
93 }
94
95 uint32 entry = data->id1;
96 switch (entry)
97 {
100 return 0;
101 break;
104 return 0;
105 break;
106 }
107
108 return entry;
109 }
std::uint32_t uint32
Definition: Define.h:107
@ NPC_RESCUED_HORDE_SLAVE
Definition: pit_of_saron.h:102
@ NPC_RESCUED_ALLIANCE_SLAVE
Definition: pit_of_saron.h:101
@ TEAM_NEUTRAL
Definition: SharedDefines.h:762
@ TEAM_ALLIANCE
Definition: SharedDefines.h:760
@ TEAM_HORDE
Definition: SharedDefines.h:761
bool IsEmpty() const
Definition: LinkedList.h:97
FROM * GetSource() const
Definition: Reference.h:97
Definition: Player.h:1081
Map * instance
Definition: InstanceScript.h:148
PlayerList const & GetPlayers() const
Definition: Map.h:484
Definition: MapRefMgr.h:26
iterator begin()
Definition: MapRefMgr.h:36
TeamId teamIdInInstance
Definition: instance_pit_of_saron.cpp:37

References MapRefMgr::begin(), Map::GetPlayers(), Reference< TO, FROM >::GetSource(), CreatureData::id1, InstanceScript::instance, LinkedListHead::IsEmpty(), NPC_RESCUED_ALLIANCE_SLAVE, NPC_RESCUED_HORDE_SLAVE, TEAM_ALLIANCE, TEAM_HORDE, TEAM_NEUTRAL, and teamIdInInstance.

◆ GetData()

uint32 instance_pit_of_saron::instance_pit_of_saron_InstanceScript::GetData ( uint32  type) const
inlineoverridevirtual

Reimplemented from ZoneScript.

324 {
325 switch (type)
326 {
328 return InstanceProgress;
330 return teamIdInInstance;
331 case DATA_GARFROST:
332 return m_auiEncounter[0];
333 case DATA_ICK:
334 return m_auiEncounter[1];
335 case DATA_TYRANNUS:
336 return m_auiEncounter[2];
337 }
338
339 return 0;
340 }
@ DATA_ICK
Definition: pit_of_saron.h:31
@ DATA_GARFROST
Definition: pit_of_saron.h:30
@ DATA_TYRANNUS
Definition: pit_of_saron.h:32
@ DATA_INSTANCE_PROGRESS
Definition: trial_of_the_champion.h:33
@ DATA_TEAMID_IN_INSTANCE
Definition: trial_of_the_champion.h:44
uint32 m_auiEncounter[MAX_ENCOUNTER]
Definition: instance_pit_of_saron.cpp:36
uint32 InstanceProgress
Definition: instance_pit_of_saron.cpp:38

References DATA_GARFROST, DATA_ICK, DATA_INSTANCE_PROGRESS, DATA_TEAMID_IN_INSTANCE, DATA_TYRANNUS, InstanceProgress, m_auiEncounter, and teamIdInInstance.

Referenced by OnGameObjectCreate(), and SetData().

◆ GetGuidData()

ObjectGuid instance_pit_of_saron::instance_pit_of_saron_InstanceScript::GetGuidData ( uint32  type) const
inlineoverridevirtual

Reimplemented from InstanceScript.

343 {
344 switch (type)
345 {
349 return NPC_Necrolyte1GUID;
351 return NPC_Necrolyte2GUID;
353 return NPC_GuardFirstGUID;
355 return NPC_GuardSecondGUID;
357 return NPC_LeaderFirstGUID;
359 return NPC_GarfrostGUID;
363 return NPC_RimefangGUID;
365 return NPC_TyrannusGUID;
369 return NPC_SindragosaGUID;
370 }
371
372 return ObjectGuid::Empty;
373 }
@ DATA_GUARD_1_GUID
Definition: pit_of_saron.h:40
@ DATA_LEADER_FIRST_GUID
Definition: pit_of_saron.h:42
@ DATA_NECROLYTE_1_GUID
Definition: pit_of_saron.h:38
@ DATA_TYRANNUS_EVENT_GUID
Definition: pit_of_saron.h:37
@ DATA_SINDRAGOSA_GUID
Definition: pit_of_saron.h:48
@ DATA_LEADER_SECOND_GUID
Definition: pit_of_saron.h:47
@ DATA_MARTIN_OR_GORKUN_GUID
Definition: pit_of_saron.h:44
@ DATA_NECROLYTE_2_GUID
Definition: pit_of_saron.h:39
@ DATA_TYRANNUS_GUID
Definition: pit_of_saron.h:46
@ DATA_GUARD_2_GUID
Definition: pit_of_saron.h:41
@ DATA_GARFROST_GUID
Definition: pit_of_saron.h:43
@ DATA_RIMEFANG_GUID
Definition: pit_of_saron.h:45
static ObjectGuid const Empty
Definition: ObjectGuid.h:120
ObjectGuid NPC_Necrolyte1GUID
Definition: instance_pit_of_saron.cpp:44
ObjectGuid NPC_Necrolyte2GUID
Definition: instance_pit_of_saron.cpp:45
ObjectGuid NPC_TyrannusGUID
Definition: instance_pit_of_saron.cpp:53
ObjectGuid NPC_GuardSecondGUID
Definition: instance_pit_of_saron.cpp:47
ObjectGuid NPC_MartinOrGorkunGUID
Definition: instance_pit_of_saron.cpp:51
ObjectGuid NPC_GuardFirstGUID
Definition: instance_pit_of_saron.cpp:46
ObjectGuid NPC_SindragosaGUID
Definition: instance_pit_of_saron.cpp:48
ObjectGuid NPC_LeaderSecondGUID
Definition: instance_pit_of_saron.cpp:42
ObjectGuid NPC_LeaderFirstGUID
Definition: instance_pit_of_saron.cpp:41
ObjectGuid NPC_GarfrostGUID
Definition: instance_pit_of_saron.cpp:50
ObjectGuid NPC_RimefangGUID
Definition: instance_pit_of_saron.cpp:52
ObjectGuid NPC_TyrannusEventGUID
Definition: instance_pit_of_saron.cpp:43

References DATA_GARFROST_GUID, DATA_GUARD_1_GUID, DATA_GUARD_2_GUID, DATA_LEADER_FIRST_GUID, DATA_LEADER_SECOND_GUID, DATA_MARTIN_OR_GORKUN_GUID, DATA_NECROLYTE_1_GUID, DATA_NECROLYTE_2_GUID, DATA_RIMEFANG_GUID, DATA_SINDRAGOSA_GUID, DATA_TYRANNUS_EVENT_GUID, DATA_TYRANNUS_GUID, ObjectGuid::Empty, NPC_GarfrostGUID, NPC_GuardFirstGUID, NPC_GuardSecondGUID, NPC_LeaderFirstGUID, NPC_LeaderSecondGUID, NPC_MartinOrGorkunGUID, NPC_Necrolyte1GUID, NPC_Necrolyte2GUID, NPC_RimefangGUID, NPC_SindragosaGUID, NPC_TyrannusEventGUID, and NPC_TyrannusGUID.

Referenced by OnPlayerEnter().

◆ Initialize()

void instance_pit_of_saron::instance_pit_of_saron_InstanceScript::Initialize ( )
inlineoverridevirtual

Reimplemented from InstanceScript.

61 {
62 memset(&m_auiEncounter, 0, sizeof(m_auiEncounter));
65
66 bAchievEleven = true;
67 bAchievDontLookUp = true;
68 }
@ INSTANCE_PROGRESS_NONE
Definition: pit_of_saron.h:56
bool bAchievDontLookUp
Definition: instance_pit_of_saron.cpp:58

References bAchievDontLookUp, bAchievEleven, INSTANCE_PROGRESS_NONE, InstanceProgress, m_auiEncounter, TEAM_NEUTRAL, and teamIdInInstance.

◆ IsEncounterInProgress()

bool instance_pit_of_saron::instance_pit_of_saron_InstanceScript::IsEncounterInProgress ( ) const
inlineoverridevirtual

Reimplemented from InstanceScript.

71 {
72 for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
73 if (m_auiEncounter[i] == IN_PROGRESS) return true;
74
75 return false;
76 }
std::uint8_t uint8
Definition: Define.h:109
#define MAX_ENCOUNTER
Definition: violet_hold.h:21
@ IN_PROGRESS
Definition: InstanceScript.h:58

References IN_PROGRESS, m_auiEncounter, and MAX_ENCOUNTER.

◆ OnCreatureCreate()

void instance_pit_of_saron::instance_pit_of_saron_InstanceScript::OnCreatureCreate ( Creature creature)
inlineoverridevirtual

Reimplemented from InstanceScript.

112 {
114 {
115 Map::PlayerList const& players = instance->GetPlayers();
116 if (!players.IsEmpty())
117 if (Player* player = players.begin()->GetSource())
118 teamIdInInstance = player->GetTeamId();
119 }
120
121 switch (creature->GetEntry())
122 {
125 creature->UpdateEntry(NPC_JAINA_PART1);
126 NPC_LeaderFirstGUID = creature->GetGUID();
127
128 switch (InstanceProgress)
129 {
131 creature->SetPosition(LeaderIntroPos);
132 break;
138 creature->SetPosition(SBSLeaderEndPos);
139 break;
140 }
141 break;
144 creature->UpdateEntry(NPC_JAINA_PART2);
145 NPC_LeaderSecondGUID = creature->GetGUID();
146 break;
149 {
150 switch (InstanceProgress)
151 {
154 break;
157 break;
160 break;
163 break;
167 break;
168 }
169 NPC_TyrannusEventGUID = creature->GetGUID();
170 }
171 break;
172 case NPC_LORALEN:
174 creature->UpdateEntry(NPC_ELANDRA);
176 NPC_GuardFirstGUID = creature->GetGUID();
177 break;
178 case NPC_KALIRA:
180 creature->UpdateEntry(NPC_KORELN);
182 NPC_GuardSecondGUID = creature->GetGUID();
183 break;
187 break;
191 break;
195 break;
199 break;
203 break;
204 case NPC_GARFROST:
205 NPC_GarfrostGUID = creature->GetGUID();
206 break;
210 break;
214 break;
218 break;
222 {
223 c->AI()->DoAction(1); // despawn summons
224 c->DespawnOrUnsummon();
225 }
228 NPC_MartinOrGorkunGUID = creature->GetGUID();
229 break;
230 case NPC_RIMEFANG:
231 NPC_RimefangGUID = creature->GetGUID();
232 if (m_auiEncounter[2] == DONE)
233 creature->SetVisible(false);
234 break;
235 case NPC_TYRANNUS:
238 c->DespawnOrUnsummon();
239 NPC_TyrannusGUID = creature->GetGUID();
240
241 if (m_auiEncounter[2] == DONE)
242 creature->SetVisible(false);
243 break;
244 case NPC_SINDRAGOSA:
245 NPC_SindragosaGUID = creature->GetGUID();
246 break;
247 }
248 }
const Position LeaderIntroPos
Definition: pit_of_saron.h:167
const Position PTSTyrannusWaitPos1
Definition: pit_of_saron.h:264
const Position SBSLeaderEndPos
Definition: pit_of_saron.h:242
const Position PTSTyrannusWaitPos2
Definition: pit_of_saron.h:265
@ NPC_FREED_SLAVE_1_ALLIANCE
Definition: pit_of_saron.h:116
@ NPC_HORDE_SLAVE_3
Definition: pit_of_saron.h:94
@ NPC_RIMEFANG
Definition: pit_of_saron.h:71
@ NPC_ALLIANCE_SLAVE_2
Definition: pit_of_saron.h:97
@ NPC_FREED_SLAVE_3_HORDE
Definition: pit_of_saron.h:121
@ NPC_FREED_SLAVE_3_ALLIANCE
Definition: pit_of_saron.h:118
@ NPC_GARFROST
Definition: pit_of_saron.h:67
@ NPC_FREED_SLAVE_2_HORDE
Definition: pit_of_saron.h:120
@ NPC_SINDRAGOSA
Definition: pit_of_saron.h:72
@ NPC_HORDE_SLAVE_2
Definition: pit_of_saron.h:93
@ NPC_HORDE_SLAVE_1
Definition: pit_of_saron.h:92
@ NPC_GORKUN_IRONSKULL_2
Definition: pit_of_saron.h:115
@ NPC_TYRANNUS_EVENT
Definition: pit_of_saron.h:74
@ NPC_FREED_SLAVE_1_HORDE
Definition: pit_of_saron.h:119
@ NPC_MARTIN_VICTUS_1
Definition: pit_of_saron.h:111
@ NPC_TYRANNUS
Definition: pit_of_saron.h:70
@ NPC_ALLIANCE_SLAVE_4
Definition: pit_of_saron.h:99
@ NPC_MARTIN_VICTUS_2
Definition: pit_of_saron.h:114
@ NPC_HORDE_SLAVE_4
Definition: pit_of_saron.h:95
@ NPC_ALLIANCE_SLAVE_3
Definition: pit_of_saron.h:98
@ NPC_FREED_SLAVE_2_ALLIANCE
Definition: pit_of_saron.h:117
@ NPC_ALLIANCE_SLAVE_1
Definition: pit_of_saron.h:96
@ NPC_GORKUN_IRONSKULL_1
Definition: pit_of_saron.h:112
const Position SBSTyrannusStartPos
Definition: pit_of_saron.h:240
const Position PTSTyrannusWaitPos3
Definition: pit_of_saron.h:266
@ INSTANCE_PROGRESS_FINISHED_INTRO
Definition: pit_of_saron.h:57
@ INSTANCE_PROGRESS_AFTER_WARN_1
Definition: pit_of_saron.h:59
@ INSTANCE_PROGRESS_FINISHED_KRICK_SCENE
Definition: pit_of_saron.h:58
@ INSTANCE_PROGRESS_TYRANNUS_INTRO
Definition: pit_of_saron.h:62
@ INSTANCE_PROGRESS_AFTER_WARN_2
Definition: pit_of_saron.h:60
@ INSTANCE_PROGRESS_AFTER_TUNNEL_WARN
Definition: pit_of_saron.h:61
@ NPC_JAINA_PART1
Definition: forge_of_souls.h:42
@ NPC_JAINA_PART2
Definition: forge_of_souls.h:43
@ NPC_KALIRA
Definition: forge_of_souls.h:44
@ NPC_KORELN
Definition: forge_of_souls.h:47
@ NPC_SYLVANAS_PART2
Definition: forge_of_souls.h:41
@ NPC_LORALEN
Definition: forge_of_souls.h:46
@ NPC_ELANDRA
Definition: forge_of_souls.h:45
@ NPC_SYLVANAS_PART1
Definition: forge_of_souls.h:40
@ DONE
Definition: InstanceScript.h:60
Definition: Creature.h:43
void SetPosition(float x, float y, float z, float o)
Definition: Creature.cpp:3154
bool UpdateEntry(uint32 entry, const CreatureData *data=nullptr, bool changelevel=true, bool updateAI=false)
Definition: Creature.cpp:539
uint32 GetEntry() const
Definition: Object.h:115
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:112
void SetVisible(bool x)
Definition: Unit.cpp:14232
Creature * GetCreature(ObjectGuid const guid)
Definition: Map.cpp:3317

References MapRefMgr::begin(), DONE, Map::GetCreature(), Object::GetEntry(), Object::GetGUID(), Map::GetPlayers(), Reference< TO, FROM >::GetSource(), InstanceScript::instance, INSTANCE_PROGRESS_AFTER_TUNNEL_WARN, INSTANCE_PROGRESS_AFTER_WARN_1, INSTANCE_PROGRESS_AFTER_WARN_2, INSTANCE_PROGRESS_FINISHED_INTRO, INSTANCE_PROGRESS_FINISHED_KRICK_SCENE, INSTANCE_PROGRESS_TYRANNUS_INTRO, InstanceProgress, LinkedListHead::IsEmpty(), LeaderIntroPos, m_auiEncounter, NPC_ALLIANCE_SLAVE_1, NPC_ALLIANCE_SLAVE_2, NPC_ALLIANCE_SLAVE_3, NPC_ALLIANCE_SLAVE_4, NPC_ELANDRA, NPC_FREED_SLAVE_1_ALLIANCE, NPC_FREED_SLAVE_1_HORDE, NPC_FREED_SLAVE_2_ALLIANCE, NPC_FREED_SLAVE_2_HORDE, NPC_FREED_SLAVE_3_ALLIANCE, NPC_FREED_SLAVE_3_HORDE, NPC_GARFROST, NPC_GarfrostGUID, NPC_GORKUN_IRONSKULL_1, NPC_GORKUN_IRONSKULL_2, NPC_GuardFirstGUID, NPC_GuardSecondGUID, NPC_HORDE_SLAVE_1, NPC_HORDE_SLAVE_2, NPC_HORDE_SLAVE_3, NPC_HORDE_SLAVE_4, NPC_JAINA_PART1, NPC_JAINA_PART2, NPC_KALIRA, NPC_KORELN, NPC_LeaderFirstGUID, NPC_LeaderSecondGUID, NPC_LORALEN, NPC_MARTIN_VICTUS_1, NPC_MARTIN_VICTUS_2, NPC_MartinOrGorkunGUID, NPC_RIMEFANG, NPC_RimefangGUID, NPC_SINDRAGOSA, NPC_SindragosaGUID, NPC_SYLVANAS_PART1, NPC_SYLVANAS_PART2, NPC_TYRANNUS, NPC_TYRANNUS_EVENT, NPC_TyrannusEventGUID, NPC_TyrannusGUID, PTSTyrannusWaitPos1, PTSTyrannusWaitPos2, PTSTyrannusWaitPos3, SBSLeaderEndPos, SBSTyrannusStartPos, Creature::SetPosition(), Unit::SetVisible(), TEAM_ALLIANCE, TEAM_NEUTRAL, teamIdInInstance, and Creature::UpdateEntry().

◆ OnGameObjectCreate()

void instance_pit_of_saron::instance_pit_of_saron_InstanceScript::OnGameObjectCreate ( GameObject go)
inlineoverridevirtual

Reimplemented from InstanceScript.

251 {
252 switch (go->GetEntry())
253 {
254 case GO_ICE_WALL:
255 GO_IceWallGUID = go->GetGUID();
258 break;
259 }
260 }
@ GO_ICE_WALL
Definition: halls_of_reflection.h:93
@ GO_STATE_ACTIVE
Definition: GameObjectData.h:689
void SetGoState(GOState state)
Definition: GameObject.cpp:2479
ObjectGuid GO_IceWallGUID
Definition: instance_pit_of_saron.cpp:55
uint32 GetData(uint32 type) const override
Definition: instance_pit_of_saron.cpp:323

References DATA_GARFROST, DATA_ICK, DONE, GetData(), Object::GetEntry(), Object::GetGUID(), GO_ICE_WALL, GO_IceWallGUID, GO_STATE_ACTIVE, and GameObject::SetGoState().

◆ OnPlayerEnter()

void instance_pit_of_saron::instance_pit_of_saron_InstanceScript::OnPlayerEnter ( Player )
inlineoverridevirtual

Reimplemented from InstanceScript.

79 {
82 c->AI()->SetData(DATA_START_INTRO, 0);
83 }
@ DATA_START_INTRO
Definition: pit_of_saron.h:51
float GetPositionX() const
Definition: Position.h:116
float GetPositionY() const
Definition: Position.h:117
void LoadGrid(float x, float y)
Definition: Map.cpp:495
ObjectGuid GetGuidData(uint32 type) const override
Definition: instance_pit_of_saron.cpp:342

References DATA_LEADER_FIRST_GUID, DATA_START_INTRO, Map::GetCreature(), GetGuidData(), Position::GetPositionX(), Position::GetPositionY(), InstanceScript::instance, LeaderIntroPos, and Map::LoadGrid().

◆ ReadSaveDataMore()

void instance_pit_of_saron::instance_pit_of_saron_InstanceScript::ReadSaveDataMore ( std::istringstream &  data)
inlineoverridevirtual

Reimplemented from InstanceScript.

386 {
387 data >> m_auiEncounter[0];
388 data >> m_auiEncounter[1];
389 data >> m_auiEncounter[2];
390 data >> InstanceProgress;
391 }

References InstanceProgress, and m_auiEncounter.

◆ SetData()

void instance_pit_of_saron::instance_pit_of_saron_InstanceScript::SetData ( uint32  type,
uint32  data 
)
inlineoverridevirtual

Reimplemented from ZoneScript.

263 {
264 switch (type)
265 {
267 if (InstanceProgress < data)
268 {
269 InstanceProgress = data;
272 }
273 break;
274 case DATA_GARFROST:
275 m_auiEncounter[0] = data;
276 if (data == DONE)
278 else // NOT_STARTED, IN_PROGRESS
279 bAchievEleven = true;
280 if (data == DONE && GetData(DATA_ICK) == DONE)
282 icewall->SetGoState(GO_STATE_ACTIVE);
283 break;
284 case DATA_ICK:
285 m_auiEncounter[1] = data;
286 if (data == DONE && GetData(DATA_GARFROST) == DONE)
288 icewall->SetGoState(GO_STATE_ACTIVE);
289 break;
290 case DATA_TYRANNUS:
291 m_auiEncounter[2] = data;
292 if (data == DONE)
294 break;
296 bAchievEleven = false;
297 break;
299 bAchievDontLookUp = false;
300 break;
301 }
302
303 if (data == DONE || type == DATA_INSTANCE_PROGRESS)
304 SaveToDB();
305 }
const Position FBSSpawnPos
Definition: pit_of_saron.h:213
const Position TSLeaderSpawnPos
Definition: pit_of_saron.h:282
@ DATA_ACHIEV_DONT_LOOK_UP
Definition: pit_of_saron.h:50
@ DATA_ACHIEV_ELEVEN
Definition: pit_of_saron.h:49
@ DUNGEON_DIFFICULTY_HEROIC
Definition: DBCEnums.h:270
@ ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET
Definition: DBCEnums.h:142
Definition: GameObject.h:120
void DoUpdateAchievementCriteria(AchievementCriteriaTypes type, uint32 miscValue1=0, uint32 miscValue2=0, Unit *unit=nullptr)
Definition: InstanceScript.cpp:638
void SaveToDB()
Definition: InstanceScript.cpp:41
GameObject * GetGameObject(ObjectGuid const guid)
Definition: Map.cpp:3322
Difficulty GetDifficulty() const
Definition: Map.h:441
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:2174

References ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET, bAchievDontLookUp, bAchievEleven, DATA_ACHIEV_DONT_LOOK_UP, DATA_ACHIEV_ELEVEN, DATA_GARFROST, DATA_ICK, DATA_INSTANCE_PROGRESS, DATA_TYRANNUS, DONE, InstanceScript::DoUpdateAchievementCriteria(), DUNGEON_DIFFICULTY_HEROIC, FBSSpawnPos, GetData(), Map::GetDifficulty(), Map::GetGameObject(), GO_IceWallGUID, GO_STATE_ACTIVE, InstanceScript::instance, INSTANCE_PROGRESS_TYRANNUS_INTRO, InstanceProgress, m_auiEncounter, NPC_GORKUN_IRONSKULL_1, NPC_SYLVANAS_PART2, InstanceScript::SaveToDB(), Map::SummonCreature(), and TSLeaderSpawnPos.

◆ SetGuidData()

void instance_pit_of_saron::instance_pit_of_saron_InstanceScript::SetGuidData ( uint32  type,
ObjectGuid  data 
)
inlineoverridevirtual

Reimplemented from ZoneScript.

308 {
309 switch (type)
310 {
312 NPC_Necrolyte1GUID = data;
313 break;
315 NPC_Necrolyte2GUID = data;
316 break;
319 break;
320 }
321 }

References DATA_MARTIN_OR_GORKUN_GUID, DATA_NECROLYTE_1_GUID, DATA_NECROLYTE_2_GUID, NPC_MartinOrGorkunGUID, NPC_Necrolyte1GUID, and NPC_Necrolyte2GUID.

◆ WriteSaveDataMore()

void instance_pit_of_saron::instance_pit_of_saron_InstanceScript::WriteSaveDataMore ( std::ostringstream &  data)
inlineoverridevirtual

Reimplemented from InstanceScript.

394 {
395 data << m_auiEncounter[0] << ' '
396 << m_auiEncounter[1] << ' '
397 << m_auiEncounter[2] << ' '
399 }

References InstanceProgress, and m_auiEncounter.

Member Data Documentation

◆ bAchievDontLookUp

bool instance_pit_of_saron::instance_pit_of_saron_InstanceScript::bAchievDontLookUp

Referenced by Initialize(), and SetData().

◆ bAchievEleven

bool instance_pit_of_saron::instance_pit_of_saron_InstanceScript::bAchievEleven

◆ GO_IceWallGUID

ObjectGuid instance_pit_of_saron::instance_pit_of_saron_InstanceScript::GO_IceWallGUID

Referenced by OnGameObjectCreate(), and SetData().

◆ InstanceProgress

uint32 instance_pit_of_saron::instance_pit_of_saron_InstanceScript::InstanceProgress

◆ m_auiEncounter

uint32 instance_pit_of_saron::instance_pit_of_saron_InstanceScript::m_auiEncounter[MAX_ENCOUNTER]

◆ NPC_GarfrostGUID

ObjectGuid instance_pit_of_saron::instance_pit_of_saron_InstanceScript::NPC_GarfrostGUID

Referenced by GetGuidData(), and OnCreatureCreate().

◆ NPC_GuardFirstGUID

ObjectGuid instance_pit_of_saron::instance_pit_of_saron_InstanceScript::NPC_GuardFirstGUID

Referenced by GetGuidData(), and OnCreatureCreate().

◆ NPC_GuardSecondGUID

ObjectGuid instance_pit_of_saron::instance_pit_of_saron_InstanceScript::NPC_GuardSecondGUID

Referenced by GetGuidData(), and OnCreatureCreate().

◆ NPC_LeaderFirstGUID

ObjectGuid instance_pit_of_saron::instance_pit_of_saron_InstanceScript::NPC_LeaderFirstGUID

Referenced by GetGuidData(), and OnCreatureCreate().

◆ NPC_LeaderSecondGUID

ObjectGuid instance_pit_of_saron::instance_pit_of_saron_InstanceScript::NPC_LeaderSecondGUID

Referenced by GetGuidData(), and OnCreatureCreate().

◆ NPC_MartinOrGorkunGUID

ObjectGuid instance_pit_of_saron::instance_pit_of_saron_InstanceScript::NPC_MartinOrGorkunGUID

◆ NPC_Necrolyte1GUID

ObjectGuid instance_pit_of_saron::instance_pit_of_saron_InstanceScript::NPC_Necrolyte1GUID

Referenced by GetGuidData(), and SetGuidData().

◆ NPC_Necrolyte2GUID

ObjectGuid instance_pit_of_saron::instance_pit_of_saron_InstanceScript::NPC_Necrolyte2GUID

Referenced by GetGuidData(), and SetGuidData().

◆ NPC_RimefangGUID

ObjectGuid instance_pit_of_saron::instance_pit_of_saron_InstanceScript::NPC_RimefangGUID

Referenced by GetGuidData(), and OnCreatureCreate().

◆ NPC_SindragosaGUID

ObjectGuid instance_pit_of_saron::instance_pit_of_saron_InstanceScript::NPC_SindragosaGUID

Referenced by GetGuidData(), and OnCreatureCreate().

◆ NPC_TyrannusEventGUID

ObjectGuid instance_pit_of_saron::instance_pit_of_saron_InstanceScript::NPC_TyrannusEventGUID

Referenced by GetGuidData(), and OnCreatureCreate().

◆ NPC_TyrannusGUID

ObjectGuid instance_pit_of_saron::instance_pit_of_saron_InstanceScript::NPC_TyrannusGUID

Referenced by GetGuidData(), and OnCreatureCreate().

◆ str_data

std::string instance_pit_of_saron::instance_pit_of_saron_InstanceScript::str_data

◆ teamIdInInstance

TeamId instance_pit_of_saron::instance_pit_of_saron_InstanceScript::teamIdInInstance