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

Public Member Functions

 instance_uldaman_InstanceMapScript (Map *map)
 
bool IsEncounterInProgress () const override
 
void OnGameObjectCreate (GameObject *go) override
 
void SetFrozenState (Creature *creature)
 
void SetDoor (ObjectGuid guid, bool open)
 
void BlockGO (ObjectGuid guid)
 
void ActivateStoneKeepers ()
 
void ActivateWallMinions ()
 
void DeActivateMinions ()
 
void ActivateArchaedas (ObjectGuid target)
 
void ActivateIronaya ()
 
void RespawnMinions ()
 
void Update (uint32 diff) override
 
void SetData (uint32 type, uint32 data) override
 
void SetGuidData (uint32 type, ObjectGuid data) override
 
std::string GetSaveData () override
 
void Load (const char *in) override
 
void OnCreatureCreate (Creature *creature) override
 
ObjectGuid GetGuidData (uint32 identifier) const override
 
void ProcessEvent (WorldObject *, uint32 eventId) override
 
- Public Member Functions inherited from InstanceScript
 InstanceScript (Map *map)
 
virtual ~InstanceScript ()
 
virtual void Initialize ()
 
void SaveToDB ()
 
virtual void OnCreatureRemove (Creature *creature) override
 
virtual void OnGameObjectRemove (GameObject *go) override
 
ObjectGuid GetObjectGuid (uint32 type) const
 
CreatureGetCreature (uint32 type)
 
GameObjectGetGameObject (uint32 type)
 
virtual void OnPlayerEnter (Player *)
 
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 ()
 
virtual bool SetBossState (uint32 id, EncounterState state)
 
EncounterState GetBossState (uint32 id) const
 
CreatureBoundary constGetBossBoundary (uint32 id) const
 
virtual bool CheckAchievementCriteriaMeet (uint32, Player const *, Unit const *=NULL, uint32=0)
 
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)
 
virtual void FillInitialWorldStates (WorldPackets::WorldState::InitWorldStates &)
 
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 void OnUnitDeath (Unit *)
 
virtual uint64 GetData64 (uint32) const
 
virtual void SetData64 (uint32, uint64)
 
virtual uint32 GetData (uint32) const
 

Public Attributes

ObjectGuid archaedasGUID
 
ObjectGuid ironayaGUID
 
ObjectGuid whoWokeuiArchaedasGUID
 
ObjectGuid altarOfTheKeeperTempleDoor
 
ObjectGuid archaedasTempleDoor
 
ObjectGuid ancientVaultDoor
 
ObjectGuid ironayaSealDoor
 
ObjectGuid keystoneGUID
 
uint32 ironayaSealDoorTimer
 
bool keystoneCheck
 
GuidVector stoneKeepers
 
GuidVector altarOfTheKeeperCounts
 
GuidVector vaultWalkers
 
GuidVector earthenGuardians
 
GuidVector archaedasWallMinions
 
uint32 m_auiEncounter [MAX_ENCOUNTER]
 
std::string str_data
 
- Public Attributes inherited from InstanceScript
Mapinstance
 

Additional Inherited Members

- Static Public Member Functions inherited from InstanceScript
static std::string GetBossStateName (uint8 state)
 
- Protected Member Functions inherited from InstanceScript
void 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)
 
virtual void AddDoor (GameObject *door, bool add)
 
void AddMinion (Creature *minion, bool add)
 
virtual void UpdateDoorState (GameObject *door)
 
void UpdateMinionState (Creature *minion, EncounterState state)
 
BossInfoGetBossInfo (uint32 id)
 
bool ReadSaveDataHeaders (std::istringstream &data)
 
void ReadSaveDataBossStates (std::istringstream &data)
 
virtual void ReadSaveDataMore (std::istringstream &)
 
void WriteSaveDataHeaders (std::ostringstream &data)
 
void WriteSaveDataBossStates (std::ostringstream &data)
 
virtual void WriteSaveDataMore (std::ostringstream &)
 
bool _SkipCheckRequiredBosses (Player const *player=nullptr) const
 

Constructor & Destructor Documentation

instance_uldaman::instance_uldaman_InstanceMapScript::instance_uldaman_InstanceMapScript ( Map map)
inline
58  : InstanceScript(map)
59  {
61  memset(&m_auiEncounter, 0, sizeof(m_auiEncounter));
62 
63  ironayaSealDoorTimer = 27000; //animation time
64  keystoneCheck = false;
65  }
uint32 ironayaSealDoorTimer
Definition: instance_uldaman.cpp:87
bool keystoneCheck
Definition: instance_uldaman.cpp:88
void SetHeaders(std::string const &dataHeaders)
Definition: InstanceScript.cpp:98
#define DataHeader
Definition: baradin_hold.h:25
InstanceScript(Map *map)
Definition: InstanceScript.h:144
uint32 m_auiEncounter[MAX_ENCOUNTER]
Definition: instance_uldaman.cpp:96

+ Here is the call graph for this function:

Member Function Documentation

void instance_uldaman::instance_uldaman_InstanceMapScript::ActivateArchaedas ( ObjectGuid  target)
inline
251  {
253  if (!archaedas)
254  return;
255 
256  if (ObjectAccessor::GetUnit(*archaedas, target))
257  {
258  archaedas->RemoveAura(SPELL_FREEZE_ANIM);
259  archaedas->CastSpell(archaedas, SPELL_ARCHAEDAS_AWAKEN, false);
260  whoWokeuiArchaedasGUID = target;
261  }
262  }
TC_GAME_API Unit * GetUnit(WorldObject const &, ObjectGuid const &guid)
Definition: ObjectAccessor.cpp:163
ObjectGuid archaedasGUID
Definition: instance_uldaman.cpp:76
Definition: Creature.h:467
void RemoveAura(AuraApplicationMap::iterator &i, AuraRemoveMode mode=AURA_REMOVE_BY_DEFAULT)
Definition: Unit.cpp:3442
ObjectGuid whoWokeuiArchaedasGUID
Definition: instance_uldaman.cpp:78
Map * instance
Definition: InstanceScript.h:148
Creature * GetCreature(ObjectGuid const &guid)
Definition: Map.cpp:3535
void CastSpell(SpellCastTargets const &targets, SpellInfo const *spellInfo, CustomSpellValues const *value, TriggerCastFlags triggerFlags=TRIGGERED_NONE, Item *castItem=NULL, AuraEffect const *triggeredByAura=NULL, ObjectGuid originalCaster=ObjectGuid::Empty)
Definition: Unit.cpp:869
Definition: instance_uldaman.cpp:33
Definition: instance_uldaman.cpp:35

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void instance_uldaman::instance_uldaman_InstanceMapScript::ActivateIronaya ( )
inline
265  {
267  if (!ironaya)
268  return;
269 
270  ironaya->setFaction(415);
273 
274  ironaya->GetMotionMaster()->Clear();
275  ironaya->GetMotionMaster()->MovePoint(0, IronayaPoint);
276  ironaya->SetHomePosition(IronayaPoint);
277 
278  ironaya->AI()->Talk(SAY_AGGRO);
279  }
void Clear(bool reset=true)
Definition: MotionMaster.h:138
MotionMaster * GetMotionMaster()
Definition: Unit.h:2101
void SetHomePosition(float x, float y, float z, float o)
Definition: Creature.h:670
const Position IronayaPoint
Definition: instance_uldaman.cpp:49
Definition: Unit.h:675
Definition: Creature.h:467
void setFaction(uint32 faction)
Definition: Unit.h:1467
void MovePoint(uint32 id, Position const &pos, bool generatePath=true)
Definition: MotionMaster.h:172
CreatureAI * AI() const
Definition: Creature.h:525
ObjectGuid ironayaGUID
Definition: instance_uldaman.cpp:77
Map * instance
Definition: InstanceScript.h:148
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:42
void RemoveFlag(uint16 index, uint32 oldFlag)
Definition: Object.cpp:1214
Creature * GetCreature(ObjectGuid const &guid)
Definition: Map.cpp:3535
Definition: UpdateFields.h:109
Definition: instance_uldaman.cpp:46
Definition: Unit.h:698

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void instance_uldaman::instance_uldaman_InstanceMapScript::ActivateStoneKeepers ( )
inline
173  {
174  if (GetData(DATA_ALTAR_DOORS) != DONE)
175  {
176  for (GuidVector::const_iterator i = stoneKeepers.begin(); i != stoneKeepers.end(); ++i)
177  {
178  Creature* target = instance->GetCreature(*i);
179  if (!target || !target->IsAlive())
180  continue;
182  target->setFaction(14);
185 
186  return; // only want the first one we find
187  }
188  // if we get this far than all four are dead so open the door
190  SetDoor(archaedasTempleDoor, true); //open next the door too
191  }
192  }
void SetData(uint32 type, uint32 data) override
Definition: instance_uldaman.cpp:338
ObjectGuid archaedasTempleDoor
Definition: instance_uldaman.cpp:81
GuidVector stoneKeepers
Definition: instance_uldaman.cpp:90
virtual uint32 GetData(uint32) const
Definition: ZoneScript.h:51
Definition: inflate.h:49
Definition: Unit.h:675
Definition: Creature.h:467
void RemoveAura(AuraApplicationMap::iterator &i, AuraRemoveMode mode=AURA_REMOVE_BY_DEFAULT)
Definition: Unit.cpp:3442
Definition: uldaman.h:28
void SetDoor(ObjectGuid guid, bool open)
Definition: instance_uldaman.cpp:154
void setFaction(uint32 faction)
Definition: Unit.h:1467
bool IsAlive() const
Definition: Unit.h:1692
Map * instance
Definition: InstanceScript.h:148
void RemoveFlag(uint16 index, uint32 oldFlag)
Definition: Object.cpp:1214
Creature * GetCreature(ObjectGuid const &guid)
Definition: Map.cpp:3535
Definition: UpdateFields.h:109
Definition: instance_uldaman.cpp:36
Definition: Unit.h:698

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void instance_uldaman::instance_uldaman_InstanceMapScript::ActivateWallMinions ( )
inline
195  {
197  if (!archaedas)
198  return;
199 
200  for (GuidVector::const_iterator i = archaedasWallMinions.begin(); i != archaedasWallMinions.end(); ++i)
201  {
202  Creature* target = instance->GetCreature(*i);
203  if (!target || !target->IsAlive() || target->getFaction() == 14)
204  continue;
207  target->setFaction(14);
209  archaedas->CastSpell(target, SPELL_AWAKEN_VAULT_WALKER, true);
210  target->CastSpell(target, SPELL_ARCHAEDAS_AWAKEN, true);
211 
212  return; // only want the first one we find
213  }
214  }
uint32 getFaction() const
Definition: Unit.h:1466
ObjectGuid archaedasGUID
Definition: instance_uldaman.cpp:76
Definition: Unit.h:675
Definition: instance_uldaman.cpp:34
Definition: Creature.h:467
void RemoveAura(AuraApplicationMap::iterator &i, AuraRemoveMode mode=AURA_REMOVE_BY_DEFAULT)
Definition: Unit.cpp:3442
void setFaction(uint32 faction)
Definition: Unit.h:1467
bool IsAlive() const
Definition: Unit.h:1692
GuidVector archaedasWallMinions
Definition: instance_uldaman.cpp:94
Map * instance
Definition: InstanceScript.h:148
void RemoveFlag(uint16 index, uint32 oldFlag)
Definition: Object.cpp:1214
Creature * GetCreature(ObjectGuid const &guid)
Definition: Map.cpp:3535
Definition: UpdateFields.h:109
Definition: instance_uldaman.cpp:36
void CastSpell(SpellCastTargets const &targets, SpellInfo const *spellInfo, CustomSpellValues const *value, TriggerCastFlags triggerFlags=TRIGGERED_NONE, Item *castItem=NULL, AuraEffect const *triggeredByAura=NULL, ObjectGuid originalCaster=ObjectGuid::Empty)
Definition: Unit.cpp:869
Definition: instance_uldaman.cpp:33
Definition: Unit.h:698

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void instance_uldaman::instance_uldaman_InstanceMapScript::BlockGO ( ObjectGuid  guid)
inline
164  {
165  GameObject* go = instance->GetGameObject(guid);
166  if (!go)
167  return;
168 
170  }
Definition: SharedDefines.h:2123
void SetUInt32Value(uint16 index, uint32 value)
Definition: Object.cpp:996
Map * instance
Definition: InstanceScript.h:148
Definition: GameObject.h:880
Definition: UpdateFields.h:319
GameObject * GetGameObject(ObjectGuid const &guid)
Definition: Map.cpp:3545

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void instance_uldaman::instance_uldaman_InstanceMapScript::DeActivateMinions ( )
inline
218  {
219  // first despawn any aggroed wall minions
220  for (GuidVector::const_iterator i = archaedasWallMinions.begin(); i != archaedasWallMinions.end(); ++i)
221  {
222  Creature* target = instance->GetCreature(*i);
223  if (!target || target->isDead() || target->getFaction() != 14)
224  continue;
225  target->setDeathState(JUST_DIED);
226  target->RemoveCorpse();
227  }
228 
229  // Vault Walkers
230  for (GuidVector::const_iterator i = vaultWalkers.begin(); i != vaultWalkers.end(); ++i)
231  {
232  Creature* target = instance->GetCreature(*i);
233  if (!target || target->isDead() || target->getFaction() != 14)
234  continue;
235  target->setDeathState(JUST_DIED);
236  target->RemoveCorpse();
237  }
238 
239  // Earthen Guardians
240  for (GuidVector::const_iterator i = earthenGuardians.begin(); i != earthenGuardians.end(); ++i)
241  {
242  Creature* target = instance->GetCreature(*i);
243  if (!target || target->isDead() || target->getFaction() != 14)
244  continue;
245  target->setDeathState(JUST_DIED);
246  target->RemoveCorpse();
247  }
248  }
uint32 getFaction() const
Definition: Unit.h:1466
GuidVector vaultWalkers
Definition: instance_uldaman.cpp:92
Definition: Unit.h:542
Definition: Creature.h:467
GuidVector earthenGuardians
Definition: instance_uldaman.cpp:93
void setDeathState(DeathState s) override
Definition: Creature.cpp:1624
GuidVector archaedasWallMinions
Definition: instance_uldaman.cpp:94
Map * instance
Definition: InstanceScript.h:148
bool isDead() const
Definition: Unit.h:1694
Creature * GetCreature(ObjectGuid const &guid)
Definition: Map.cpp:3535
void RemoveCorpse(bool setSpawnTime=true)
Definition: Creature.cpp:280

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ObjectGuid instance_uldaman::instance_uldaman_InstanceMapScript::GetGuidData ( uint32  identifier) const
inlineoverridevirtual

Reimplemented from InstanceScript.

481  {
482  switch (identifier)
483  {
484  case 0:
485  return whoWokeuiArchaedasGUID;
486  case 1:
487  case 2:
488  case 3:
489  case 4:
490  return vaultWalkers.at(identifier - 1);
491  case 5:
492  case 6:
493  case 7:
494  case 8:
495  case 9:
496  case 10:
497  return earthenGuardians.at(identifier - 5);
498  default:
499  break;
500  }
501 
502  return ObjectGuid::Empty;
503  } // end GetGuidData
static ObjectGuid const Empty
Definition: ObjectGuid.h:196
GuidVector vaultWalkers
Definition: instance_uldaman.cpp:92
GuidVector earthenGuardians
Definition: instance_uldaman.cpp:93
ObjectGuid whoWokeuiArchaedasGUID
Definition: instance_uldaman.cpp:78
std::string instance_uldaman::instance_uldaman_InstanceMapScript::GetSaveData ( )
inlineoverridevirtual

Reimplemented from InstanceScript.

415  {
416  return str_data;
417  }
std::string str_data
Definition: instance_uldaman.cpp:97
bool instance_uldaman::instance_uldaman_InstanceMapScript::IsEncounterInProgress ( ) const
inlineoverridevirtual

Reimplemented from InstanceScript.

68  {
69  for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
70  if (m_auiEncounter[i] == IN_PROGRESS)
71  return true;
72 
73  return false;
74  }
Definition: InstanceScript.h:59
#define MAX_ENCOUNTER
Definition: instance_blackrock_depths.cpp:25
uint8_t uint8
Definition: Define.h:152
uint32 m_auiEncounter[MAX_ENCOUNTER]
Definition: instance_uldaman.cpp:96
void instance_uldaman::instance_uldaman_InstanceMapScript::Load ( const char *  in)
inlineoverridevirtual

Reimplemented from InstanceScript.

420  {
421  if (!in)
422  {
424  return;
425  }
426 
427  OUT_LOAD_INST_DATA(in);
428 
429  std::istringstream loadStream(in);
430  loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2];
431 
432  for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
433  {
434  if (m_auiEncounter[i] == IN_PROGRESS)
435  m_auiEncounter[i] = NOT_STARTED;
436  }
437 
439  }
#define OUT_LOAD_INST_DATA_FAIL
Definition: InstanceScript.h:33
#define OUT_LOAD_INST_DATA_COMPLETE
Definition: InstanceScript.h:32
Definition: InstanceScript.h:59
Definition: InstanceScript.h:58
#define MAX_ENCOUNTER
Definition: instance_blackrock_depths.cpp:25
uint8_t uint8
Definition: Define.h:152
#define OUT_LOAD_INST_DATA(a)
Definition: InstanceScript.h:31
uint32 m_auiEncounter[MAX_ENCOUNTER]
Definition: instance_uldaman.cpp:96
void instance_uldaman::instance_uldaman_InstanceMapScript::OnCreatureCreate ( Creature creature)
inlineoverridevirtual

Reimplemented from InstanceScript.

442  {
443  switch (creature->GetEntry())
444  {
445  case 4857: // Stone Keeper
446  SetFrozenState (creature);
447  stoneKeepers.push_back(creature->GetGUID());
448  break;
449 
450  case 7309: // Earthen Custodian
451  archaedasWallMinions.push_back(creature->GetGUID());
452  break;
453 
454  case 7077: // Earthen Hallshaper
455  archaedasWallMinions.push_back(creature->GetGUID());
456  break;
457 
458  case 7076: // Earthen Guardian
459  earthenGuardians.push_back(creature->GetGUID());
460  break;
461 
462  case 7228: // Ironaya
463  ironayaGUID = creature->GetGUID();
464 
465  if (m_auiEncounter[2] != DONE)
466  SetFrozenState (creature);
467  break;
468 
469  case 10120: // Vault Walker
470  vaultWalkers.push_back(creature->GetGUID());
471  break;
472 
473  case 2748: // Archaedas
474  archaedasGUID = creature->GetGUID();
475  break;
476 
477  }
478  }
GuidVector vaultWalkers
Definition: instance_uldaman.cpp:92
GuidVector stoneKeepers
Definition: instance_uldaman.cpp:90
ObjectGuid archaedasGUID
Definition: instance_uldaman.cpp:76
Definition: inflate.h:49
GuidVector earthenGuardians
Definition: instance_uldaman.cpp:93
GuidVector archaedasWallMinions
Definition: instance_uldaman.cpp:94
ObjectGuid ironayaGUID
Definition: instance_uldaman.cpp:77
void SetFrozenState(Creature *creature)
Definition: instance_uldaman.cpp:145
ObjectGuid const & GetGUID() const
Definition: Object.h:105
uint32 GetEntry() const
Definition: Object.h:107
uint32 m_auiEncounter[MAX_ENCOUNTER]
Definition: instance_uldaman.cpp:96

+ Here is the call graph for this function:

void instance_uldaman::instance_uldaman_InstanceMapScript::OnGameObjectCreate ( GameObject go)
inlineoverridevirtual

Reimplemented from InstanceScript.

100  {
101  switch (go->GetEntry())
102  {
103  case GO_ALTAR_OF_THE_KEEPER_TEMPLE_DOOR: // lock the door
105 
106  if (m_auiEncounter[0] == DONE)
108  break;
109 
112 
113  if (m_auiEncounter[0] == DONE)
115  break;
116 
120  ancientVaultDoor = go->GetGUID();
121 
122  if (m_auiEncounter[1] == DONE)
124  break;
125 
127  ironayaSealDoor = go->GetGUID();
128 
129  if (m_auiEncounter[2] == DONE)
131  break;
132 
133  case GO_KEYSTONE:
134  keystoneGUID = go->GetGUID();
135 
136  if (m_auiEncounter[2] == DONE)
137  {
140  }
141  break;
142  }
143  }
static ObjectGuid const Empty
Definition: ObjectGuid.h:196
Definition: SharedDefines.h:2123
ObjectGuid ironayaSealDoor
Definition: instance_uldaman.cpp:83
ObjectGuid archaedasTempleDoor
Definition: instance_uldaman.cpp:81
Definition: inflate.h:49
void SetUInt32Value(uint16 index, uint32 value)
Definition: Object.cpp:996
ObjectGuid ancientVaultDoor
Definition: instance_uldaman.cpp:82
Definition: uldaman.h:41
void HandleGameObject(ObjectGuid guid, bool open, GameObject *go=nullptr)
Definition: InstanceScript.cpp:397
Definition: uldaman.h:42
Definition: UpdateFields.h:319
Definition: GameObject.h:823
void SetGoState(GOState state)
Definition: GameObject.cpp:2137
ObjectGuid const & GetGUID() const
Definition: Object.h:105
uint32 GetEntry() const
Definition: Object.h:107
ObjectGuid keystoneGUID
Definition: instance_uldaman.cpp:85
Definition: uldaman.h:40
Definition: uldaman.h:38
ObjectGuid altarOfTheKeeperTempleDoor
Definition: instance_uldaman.cpp:80
Definition: uldaman.h:39
uint32 m_auiEncounter[MAX_ENCOUNTER]
Definition: instance_uldaman.cpp:96

+ Here is the call graph for this function:

void instance_uldaman::instance_uldaman_InstanceMapScript::ProcessEvent ( WorldObject ,
uint32  eventId 
)
inlineoverridevirtual

Reimplemented from ZoneScript.

506  {
507  switch (eventId)
508  {
510  SetData(DATA_STONE_KEEPERS, IN_PROGRESS); // activate the Stone Keepers
511  break;
512  default:
513  break;
514  }
515  }
void SetData(uint32 type, uint32 data) override
Definition: instance_uldaman.cpp:338
Definition: instance_uldaman.cpp:41
Definition: InstanceScript.h:59
Definition: uldaman.h:31

+ Here is the call graph for this function:

void instance_uldaman::instance_uldaman_InstanceMapScript::RespawnMinions ( )
inline
282  {
283  // first respawn any aggroed wall minions
284  for (GuidVector::const_iterator i = archaedasWallMinions.begin(); i != archaedasWallMinions.end(); ++i)
285  {
286  Creature* target = instance->GetCreature(*i);
287  if (target && target->isDead())
288  {
289  target->Respawn();
290  target->GetMotionMaster()->MoveTargetedHome();
291  SetFrozenState(target);
292  }
293  }
294 
295  // Vault Walkers
296  for (GuidVector::const_iterator i = vaultWalkers.begin(); i != vaultWalkers.end(); ++i)
297  {
298  Creature* target = instance->GetCreature(*i);
299  if (target && target->isDead())
300  {
301  target->Respawn();
302  target->GetMotionMaster()->MoveTargetedHome();
303  SetFrozenState(target);
304  }
305  }
306 
307  // Earthen Guardians
308  for (GuidVector::const_iterator i = earthenGuardians.begin(); i != earthenGuardians.end(); ++i)
309  {
310  Creature* target = instance->GetCreature(*i);
311  if (target && target->isDead())
312  {
313  target->Respawn();
314  target->GetMotionMaster()->MoveTargetedHome();
315  SetFrozenState(target);
316  }
317  }
318  }
GuidVector vaultWalkers
Definition: instance_uldaman.cpp:92
MotionMaster * GetMotionMaster()
Definition: Unit.h:2101
void MoveTargetedHome()
Definition: MotionMaster.cpp:201
Definition: Creature.h:467
GuidVector earthenGuardians
Definition: instance_uldaman.cpp:93
GuidVector archaedasWallMinions
Definition: instance_uldaman.cpp:94
Map * instance
Definition: InstanceScript.h:148
void SetFrozenState(Creature *creature)
Definition: instance_uldaman.cpp:145
void Respawn(bool force=false)
Definition: Creature.cpp:1697
bool isDead() const
Definition: Unit.h:1694
Creature * GetCreature(ObjectGuid const &guid)
Definition: Map.cpp:3535

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void instance_uldaman::instance_uldaman_InstanceMapScript::SetData ( uint32  type,
uint32  data 
)
inlineoverridevirtual

Reimplemented from ZoneScript.

339  {
340  switch (type)
341  {
342  case DATA_ALTAR_DOORS:
343  m_auiEncounter[0] = data;
344  if (data == DONE)
346  break;
347 
348  case DATA_ANCIENT_DOOR:
349  m_auiEncounter[1] = data;
350  if (data == DONE) //archeadas defeat
351  {
352  SetDoor(archaedasTempleDoor, true); //re open enter door
353  SetDoor(ancientVaultDoor, true);
354  }
355  break;
356 
357  case DATA_IRONAYA_DOOR:
358  m_auiEncounter[2] = data;
359  break;
360 
361  case DATA_STONE_KEEPERS:
363  break;
364 
365  case DATA_MINIONS:
366  switch (data)
367  {
368  case NOT_STARTED:
369  if (m_auiEncounter[0] == DONE) //if players opened the doors
371 
372  RespawnMinions();
373  break;
374 
375  case IN_PROGRESS:
377  break;
378 
379  case SPECIAL:
381  break;
382  }
383  break;
384 
385  case DATA_IRONAYA_SEAL:
386  keystoneCheck = true;
387  break;
388  }
389 
390  if (data == DONE)
391  {
393 
394  std::ostringstream saveStream;
395  saveStream << m_auiEncounter[0] << ' ' << m_auiEncounter[1] << ' ' << m_auiEncounter[2];
396 
397  str_data = saveStream.str();
398 
399  SaveToDB();
401  }
402  }
void ActivateStoneKeepers()
Definition: instance_uldaman.cpp:172
#define OUT_SAVE_INST_DATA
Definition: InstanceScript.h:29
ObjectGuid archaedasTempleDoor
Definition: instance_uldaman.cpp:81
Definition: inflate.h:49
Definition: uldaman.h:28
ObjectGuid ancientVaultDoor
Definition: instance_uldaman.cpp:82
bool keystoneCheck
Definition: instance_uldaman.cpp:88
void SetDoor(ObjectGuid guid, bool open)
Definition: instance_uldaman.cpp:154
Definition: uldaman.h:30
Definition: InstanceScript.h:59
void SaveToDB()
Definition: InstanceScript.cpp:39
Definition: InstanceScript.h:58
Definition: InstanceScript.h:62
Definition: uldaman.h:33
void ActivateWallMinions()
Definition: instance_uldaman.cpp:194
Definition: uldaman.h:32
Definition: uldaman.h:31
void RespawnMinions()
Definition: instance_uldaman.cpp:281
Definition: uldaman.h:29
ObjectGuid altarOfTheKeeperTempleDoor
Definition: instance_uldaman.cpp:80
void DeActivateMinions()
Definition: instance_uldaman.cpp:217
std::string str_data
Definition: instance_uldaman.cpp:97
#define OUT_SAVE_INST_DATA_COMPLETE
Definition: InstanceScript.h:30
uint32 m_auiEncounter[MAX_ENCOUNTER]
Definition: instance_uldaman.cpp:96

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void instance_uldaman::instance_uldaman_InstanceMapScript::SetDoor ( ObjectGuid  guid,
bool  open 
)
inline
155  {
156  GameObject* go = instance->GetGameObject(guid);
157  if (!go)
158  return;
159 
160  HandleGameObject(guid, open);
161  }
Map * instance
Definition: InstanceScript.h:148
Definition: GameObject.h:880
void HandleGameObject(ObjectGuid guid, bool open, GameObject *go=nullptr)
Definition: InstanceScript.cpp:397
GameObject * GetGameObject(ObjectGuid const &guid)
Definition: Map.cpp:3545

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void instance_uldaman::instance_uldaman_InstanceMapScript::SetFrozenState ( Creature creature)
inline
146  {
147  creature->setFaction(35);
148  creature->RemoveAllAuras();
151  creature->AddAura(SPELL_MINION_FREEZE_ANIM, creature);
152  }
void RemoveAllAuras()
Definition: Unit.cpp:3920
Aura * AddAura(uint32 spellId, Unit *target)
Definition: Unit.cpp:14463
Definition: Unit.h:675
void SetFlag(uint16 index, uint32 newFlag)
Definition: Object.cpp:1199
void setFaction(uint32 faction)
Definition: Unit.h:1467
Definition: UpdateFields.h:109
Definition: instance_uldaman.cpp:36
Definition: Unit.h:698

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void instance_uldaman::instance_uldaman_InstanceMapScript::SetGuidData ( uint32  type,
ObjectGuid  data 
)
inlineoverridevirtual

Reimplemented from ZoneScript.

405  {
406  // Archaedas
407  if (type == 0)
408  {
409  ActivateArchaedas (data);
410  SetDoor(archaedasTempleDoor, false); //close when event is started
411  }
412  }
ObjectGuid archaedasTempleDoor
Definition: instance_uldaman.cpp:81
void SetDoor(ObjectGuid guid, bool open)
Definition: instance_uldaman.cpp:154
void ActivateArchaedas(ObjectGuid target)
Definition: instance_uldaman.cpp:250

+ Here is the call graph for this function:

void instance_uldaman::instance_uldaman_InstanceMapScript::Update ( uint32  diff)
inlineoverridevirtual

Reimplemented from InstanceScript.

320  {
321  if (!keystoneCheck)
322  return;
323 
324  if (ironayaSealDoorTimer <= diff)
325  {
326  ActivateIronaya();
327 
328  SetDoor(ironayaSealDoor, true);
330 
331  SetData(DATA_IRONAYA_DOOR, DONE); //save state
332  keystoneCheck = false;
333  }
334  else
335  ironayaSealDoorTimer -= diff;
336  }
void SetData(uint32 type, uint32 data) override
Definition: instance_uldaman.cpp:338
uint32 ironayaSealDoorTimer
Definition: instance_uldaman.cpp:87
ObjectGuid ironayaSealDoor
Definition: instance_uldaman.cpp:83
void BlockGO(ObjectGuid guid)
Definition: instance_uldaman.cpp:163
Definition: inflate.h:49
bool keystoneCheck
Definition: instance_uldaman.cpp:88
void SetDoor(ObjectGuid guid, bool open)
Definition: instance_uldaman.cpp:154
Definition: uldaman.h:30
void ActivateIronaya()
Definition: instance_uldaman.cpp:264
ObjectGuid keystoneGUID
Definition: instance_uldaman.cpp:85

+ Here is the call graph for this function:

Member Data Documentation

GuidVector instance_uldaman::instance_uldaman_InstanceMapScript::altarOfTheKeeperCounts
ObjectGuid instance_uldaman::instance_uldaman_InstanceMapScript::altarOfTheKeeperTempleDoor
ObjectGuid instance_uldaman::instance_uldaman_InstanceMapScript::ancientVaultDoor
ObjectGuid instance_uldaman::instance_uldaman_InstanceMapScript::archaedasGUID
ObjectGuid instance_uldaman::instance_uldaman_InstanceMapScript::archaedasTempleDoor
GuidVector instance_uldaman::instance_uldaman_InstanceMapScript::archaedasWallMinions
GuidVector instance_uldaman::instance_uldaman_InstanceMapScript::earthenGuardians
ObjectGuid instance_uldaman::instance_uldaman_InstanceMapScript::ironayaGUID
ObjectGuid instance_uldaman::instance_uldaman_InstanceMapScript::ironayaSealDoor
uint32 instance_uldaman::instance_uldaman_InstanceMapScript::ironayaSealDoorTimer
bool instance_uldaman::instance_uldaman_InstanceMapScript::keystoneCheck
ObjectGuid instance_uldaman::instance_uldaman_InstanceMapScript::keystoneGUID
uint32 instance_uldaman::instance_uldaman_InstanceMapScript::m_auiEncounter[MAX_ENCOUNTER]
GuidVector instance_uldaman::instance_uldaman_InstanceMapScript::stoneKeepers
std::string instance_uldaman::instance_uldaman_InstanceMapScript::str_data
GuidVector instance_uldaman::instance_uldaman_InstanceMapScript::vaultWalkers
ObjectGuid instance_uldaman::instance_uldaman_InstanceMapScript::whoWokeuiArchaedasGUID

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