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

Public Member Functions

 instance_naxxramas_InstanceMapScript (Map *map)
 
void OnCreatureCreate (Creature *creature) override
 
void OnCreatureRemove (Creature *creature) override
 
void ProcessEvent (WorldObject *, uint32 eventId) override
 
void OnGameObjectCreate (GameObject *go) override
 
void OnGameObjectRemove (GameObject *go) override
 
void OnUnitDeath (Unit *unit) override
 
void SetData (uint32 id, uint32 value) override
 
uint32 GetData (uint32 id) const override
 
ObjectGuid GetGuidData (uint32 id) const override
 
bool SetBossState (uint32 id, EncounterState state) override
 
void Update (uint32 diff) override
 
void HeiganErupt (uint32 section)
 
bool AreAllEncountersDone ()
 
bool CheckAchievementCriteriaMeet (uint32 criteria_id, Player const *, Unit const *, uint32) override
 
- Public Member Functions inherited from InstanceScript
 InstanceScript (Map *map)
 
virtual ~InstanceScript ()
 
virtual void Initialize ()
 
virtual void Load (char const *data)
 
virtual std::string GetSaveData ()
 
void SaveToDB ()
 
virtual bool IsEncounterInProgress () const
 
ObjectGuid GetObjectGuid (uint32 type) const
 
CreatureGetCreature (uint32 type)
 
GameObjectGetGameObject (uint32 type)
 
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 ()
 
EncounterState GetBossState (uint32 id) const
 
CreatureBoundary constGetBossBoundary (uint32 id) const
 
virtual bool CheckRequiredBosses (uint32, Player const *=nullptr) const
 
void UpdateEncounterState (EncounterCreditType type, uint32 creditEntry, Unit *source)
 
void SetCompletedEncountersMask (uint32 newMask)
 
uint32 GetCompletedEncounterMask () const
 
void SendEncounterUnit (uint32 type, Unit *unit=NULL, uint8 param1=0, uint8 param2=0)
 
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 SetGuidData (uint32, ObjectGuid)
 
virtual uint64 GetData64 (uint32) const
 
virtual void SetData64 (uint32, uint64)
 

Protected Attributes

ObjectGuid AnubRekhanGUID
 
ObjectGuid FaerlinaGUID
 
GuidSet HeiganEruptionGUID [4]
 
ObjectGuid HeiganGUID
 
ObjectGuid RazuviousGUID
 
ObjectGuid GothikGateGUID
 
ObjectGuid ThaneGUID
 
ObjectGuid LadyGUID
 
ObjectGuid BaronGUID
 
ObjectGuid SirGUID
 
ObjectGuid HorsemenChestGUID
 
time_t minHorsemenDiedTime
 
time_t maxHorsemenDiedTime
 
ObjectGuid ThaddiusGUID
 
ObjectGuid FeugenGUID
 
ObjectGuid StalaggGUID
 
ObjectGuid SapphironGUID
 
ObjectGuid KelthuzadGUID
 
ObjectGuid KelthuzadTriggerGUID
 
ObjectGuid PortalsGUID [4]
 
ObjectGuid KelthuzadDoorGUID
 
ObjectGuid LichKingGUID
 
uint8 AbominationCount
 
bool hadAnubRekhanGreet
 
bool hadFaerlinaGreet
 
bool hadThaddiusGreet
 
uint8 CurrentWingTaunt
 
uint32 playerDied
 
EventMap events
 

Additional Inherited Members

- Static Public Member Functions inherited from InstanceScript
static std::string GetBossStateName (uint8 state)
 
- Public Attributes inherited from InstanceScript
Mapinstance
 
- 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_naxxramas::instance_naxxramas_InstanceMapScript::instance_naxxramas_InstanceMapScript ( Map map)
inline
149  : InstanceScript(map)
150  {
156  LoadObjectData(nullptr, objectData);
157 
160  AbominationCount = 0;
161  hadAnubRekhanGreet = false;
162  hadFaerlinaGreet = false;
163  hadThaddiusGreet = false;
165 
166  playerDied = 0;
167  }
uint32 const EncounterCount
Definition: baradin_hold.h:28
Definition: naxxramas.h:209
void SetBossNumber(uint32 number)
Definition: InstanceScript.h:258
DoorData const doorData[]
Definition: instance_naxxramas.cpp:56
MinionData const minionData[]
Definition: instance_naxxramas.cpp:94
time_t minHorsemenDiedTime
Definition: instance_naxxramas.cpp:703
uint32 playerDied
Definition: instance_naxxramas.cpp:728
void SetHeaders(std::string const &dataHeaders)
Definition: InstanceScript.cpp:98
#define DataHeader
Definition: baradin_hold.h:25
ObjectData const objectData[]
Definition: instance_naxxramas.cpp:103
InstanceScript(Map *map)
Definition: InstanceScript.h:144
void LoadMinionData(MinionData const *data)
Definition: InstanceScript.cpp:112
BossBoundaryData const boundaries
Definition: instance_naxxramas.cpp:23
uint8 AbominationCount
Definition: instance_naxxramas.cpp:721
time_t maxHorsemenDiedTime
Definition: instance_naxxramas.cpp:704
bool hadFaerlinaGreet
Definition: instance_naxxramas.cpp:723
void LoadDoorData(DoorData const *data)
Definition: InstanceScript.cpp:124
bool hadAnubRekhanGreet
Definition: instance_naxxramas.cpp:722
void LoadBossBoundaries(BossBoundaryData const &data)
Definition: InstanceScript.cpp:105
bool hadThaddiusGreet
Definition: instance_naxxramas.cpp:724
void LoadObjectData(ObjectData const *creatureData, ObjectData const *gameObjectData)
Definition: InstanceScript.cpp:136
uint8 CurrentWingTaunt
Definition: instance_naxxramas.cpp:725

+ Here is the call graph for this function:

Member Function Documentation

bool instance_naxxramas::instance_naxxramas_InstanceMapScript::AreAllEncountersDone ( )
inline
636  {
637  uint32 numBossAlive = 0;
638  for (uint32 i = 0; i < EncounterCount; ++i)
639  if (GetBossState(i) != DONE)
640  numBossAlive++;
641 
642  if (numBossAlive > 1)
643  return false;
644  return true;
645  }
uint32 const EncounterCount
Definition: baradin_hold.h:28
Definition: inflate.h:49
uint32_t uint32
Definition: Define.h:150
EncounterState GetBossState(uint32 id) const
Definition: InstanceScript.h:227

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool instance_naxxramas::instance_naxxramas_InstanceMapScript::CheckAchievementCriteriaMeet ( uint32  criteria_id,
Player const ,
Unit const ,
uint32   
)
inlineoverridevirtual

Reimplemented from InstanceScript.

648  {
649  switch (criteria_id)
650  {
651  case 7600: // Criteria for achievement 2176: And They Would All Go Down Together 15sec of each other 10-man
653  return true;
654  return false;
655  case 7601: // Criteria for achievement 2177: And They Would All Go Down Together 15sec of each other 25-man
657  return true;
658  return false;
659  // Difficulty checks are done on DB.
660  // Criteria for achievement 2186: The Immortal (25-man)
661  case 13233: // The Four Horsemen
662  case 13234: // Maexxna
663  case 13235: // Thaddius
664  case 13236: // Loatheb
665  case 7616: // Kel'Thuzad
666  // Criteria for achievement 2187: The Undying (10-man)
667  case 13237: // The Four Horsemen
668  case 13238: // Maexxna
669  case 13239: // Loatheb
670  case 13240: // Thaddius
671  case 7617: // Kel'Thuzad
673  return true;
674  return false;
675  }
676 
677  return false;
678  }
Difficulty
Definition: DBCEnums.h:402
uint8 GetSpawnMode() const
Definition: Map.h:369
Definition: DBCEnums.h:407
time_t minHorsemenDiedTime
Definition: instance_naxxramas.cpp:703
uint32 playerDied
Definition: instance_naxxramas.cpp:728
Map * instance
Definition: InstanceScript.h:148
Definition: DBCEnums.h:408
time_t maxHorsemenDiedTime
Definition: instance_naxxramas.cpp:704
bool AreAllEncountersDone()
Definition: instance_naxxramas.cpp:635

+ Here is the call graph for this function:

uint32 instance_naxxramas::instance_naxxramas_InstanceMapScript::GetData ( uint32  id) const
inlineoverridevirtual

Reimplemented from ZoneScript.

391  {
392  switch (id)
393  {
395  return AbominationCount;
397  return hadAnubRekhanGreet ? 1u : 0u;
399  return hadFaerlinaGreet ? 1u : 0u;
401  return hadThaddiusGreet ? 1u : 0u;
402  default:
403  break;
404  }
405 
406  return 0;
407  }
Definition: naxxramas.h:51
Definition: naxxramas.h:49
Definition: naxxramas.h:50
uint8 AbominationCount
Definition: instance_naxxramas.cpp:721
bool hadFaerlinaGreet
Definition: instance_naxxramas.cpp:723
bool hadAnubRekhanGreet
Definition: instance_naxxramas.cpp:722
bool hadThaddiusGreet
Definition: instance_naxxramas.cpp:724
Definition: naxxramas.h:57
ObjectGuid instance_naxxramas::instance_naxxramas_InstanceMapScript::GetGuidData ( uint32  id) const
inlineoverridevirtual

Reimplemented from InstanceScript.

410  {
411  switch (id)
412  {
413  case DATA_ANUBREKHAN:
414  return AnubRekhanGUID;
415  case DATA_FAERLINA:
416  return FaerlinaGUID;
417  case DATA_RAZUVIOUS:
418  return RazuviousGUID;
419  case DATA_THANE:
420  return ThaneGUID;
421  case DATA_LADY:
422  return LadyGUID;
423  case DATA_BARON:
424  return BaronGUID;
425  case DATA_SIR:
426  return SirGUID;
427  case DATA_HEIGAN:
428  return HeiganGUID;
429  case DATA_FEUGEN:
430  return FeugenGUID;
431  case DATA_STALAGG:
432  return StalaggGUID;
433  case DATA_THADDIUS:
434  return ThaddiusGUID;
435  case DATA_KELTHUZAD:
436  return KelthuzadGUID;
438  return PortalsGUID[0];
440  return PortalsGUID[1];
442  return PortalsGUID[2];
444  return PortalsGUID[3];
446  return KelthuzadTriggerGUID;
447  case DATA_LICH_KING:
448  return LichKingGUID;
449  }
450 
451  return ObjectGuid::Empty;
452  }
ObjectGuid BaronGUID
Definition: instance_naxxramas.cpp:700
Definition: naxxramas.h:78
static ObjectGuid const Empty
Definition: ObjectGuid.h:196
ObjectGuid LadyGUID
Definition: instance_naxxramas.cpp:699
ObjectGuid ThaddiusGUID
Definition: instance_naxxramas.cpp:708
Definition: stratholme.h:35
Definition: naxxramas.h:68
Definition: naxxramas.h:69
ObjectGuid SirGUID
Definition: instance_naxxramas.cpp:701
ObjectGuid StalaggGUID
Definition: instance_naxxramas.cpp:710
Definition: naxxramas.h:71
ObjectGuid PortalsGUID[4]
Definition: instance_naxxramas.cpp:718
Definition: naxxramas.h:73
Definition: naxxramas.h:79
Definition: naxxramas.h:67
ObjectGuid LichKingGUID
Definition: instance_naxxramas.cpp:720
ObjectGuid KelthuzadGUID
Definition: instance_naxxramas.cpp:716
Definition: naxxramas.h:75
Definition: naxxramas.h:74
Definition: naxxramas.h:82
ObjectGuid FeugenGUID
Definition: instance_naxxramas.cpp:709
ObjectGuid ThaneGUID
Definition: instance_naxxramas.cpp:698
Definition: naxxramas.h:84
Definition: naxxramas.h:76
ObjectGuid RazuviousGUID
Definition: instance_naxxramas.cpp:694
Definition: naxxramas.h:77
Definition: naxxramas.h:81
ObjectGuid FaerlinaGUID
Definition: instance_naxxramas.cpp:685
ObjectGuid KelthuzadTriggerGUID
Definition: instance_naxxramas.cpp:717
ObjectGuid AnubRekhanGUID
Definition: instance_naxxramas.cpp:683
Definition: naxxramas.h:70
ObjectGuid HeiganGUID
Definition: instance_naxxramas.cpp:690
Definition: naxxramas.h:80
Definition: naxxramas.h:83
void instance_naxxramas::instance_naxxramas_InstanceMapScript::HeiganErupt ( uint32  section)
inline
615  {
616  for (uint32 i = 0; i < 4; ++i)
617  {
618  if (i == section)
619  continue;
620 
621  for (ObjectGuid guid : HeiganEruptionGUID[i])
622  {
623  if (GameObject* heiganEruption = instance->GetGameObject(guid))
624  {
625  heiganEruption->SendCustomAnim(heiganEruption->GetGoAnimProgress());
626  heiganEruption->CastSpell(NULL, SPELL_ERUPTION);
627  }
628  }
629  }
630  }
GuidSet HeiganEruptionGUID[4]
Definition: instance_naxxramas.cpp:689
arena_t NULL
Definition: jemalloc_internal.h:624
uint32_t uint32
Definition: Define.h:150
Map * instance
Definition: InstanceScript.h:148
Definition: boss_garr.cpp:39
Definition: GameObject.h:880
Definition: ObjectGuid.h:189
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_naxxramas::instance_naxxramas_InstanceMapScript::OnCreatureCreate ( Creature creature)
inlineoverridevirtual

Reimplemented from InstanceScript.

170  {
171  switch (creature->GetEntry())
172  {
173  case NPC_ANUBREKHAN:
174  AnubRekhanGUID = creature->GetGUID();
175  break;
176  case NPC_FAERLINA:
177  FaerlinaGUID = creature->GetGUID();
178  break;
179  case NPC_RAZUVIOUS:
180  RazuviousGUID = creature->GetGUID();
181  break;
182  case NPC_THANE:
183  ThaneGUID = creature->GetGUID();
184  break;
185  case NPC_LADY:
186  LadyGUID = creature->GetGUID();
187  break;
188  case NPC_BARON:
189  BaronGUID = creature->GetGUID();
190  break;
191  case NPC_SIR:
192  SirGUID = creature->GetGUID();
193  break;
194  case NPC_HEIGAN:
195  HeiganGUID = creature->GetGUID();
196  break;
197  case NPC_THADDIUS:
198  ThaddiusGUID = creature->GetGUID();
199  break;
200  case NPC_FEUGEN:
201  FeugenGUID = creature->GetGUID();
202  break;
203  case NPC_STALAGG:
204  StalaggGUID = creature->GetGUID();
205  break;
206  case NPC_SAPPHIRON:
207  SapphironGUID = creature->GetGUID();
208  break;
209  case NPC_KEL_THUZAD:
210  KelthuzadGUID = creature->GetGUID();
211  break;
212  case NPC_LICH_KING:
213  LichKingGUID = creature->GetGUID();
214  break;
215  default:
216  break;
217  }
218 
219  AddMinion(creature, true);
220  }
Definition: stratholme.h:49
ObjectGuid BaronGUID
Definition: instance_naxxramas.cpp:700
ObjectGuid LadyGUID
Definition: instance_naxxramas.cpp:699
ObjectGuid ThaddiusGUID
Definition: instance_naxxramas.cpp:708
Definition: naxxramas.h:95
ObjectGuid SirGUID
Definition: instance_naxxramas.cpp:701
ObjectGuid StalaggGUID
Definition: instance_naxxramas.cpp:710
Definition: trial_of_the_crusader.h:186
Definition: naxxramas.h:98
Definition: naxxramas.h:96
Definition: naxxramas.h:101
Definition: naxxramas.h:99
ObjectGuid LichKingGUID
Definition: instance_naxxramas.cpp:720
ObjectGuid KelthuzadGUID
Definition: instance_naxxramas.cpp:716
Definition: naxxramas.h:102
ObjectGuid const & GetGUID() const
Definition: Object.h:105
Definition: naxxramas.h:91
ObjectGuid FeugenGUID
Definition: instance_naxxramas.cpp:709
Definition: naxxramas.h:90
Definition: naxxramas.h:97
ObjectGuid ThaneGUID
Definition: instance_naxxramas.cpp:698
ObjectGuid SapphironGUID
Definition: instance_naxxramas.cpp:714
Definition: naxxramas.h:92
ObjectGuid RazuviousGUID
Definition: instance_naxxramas.cpp:694
Definition: naxxramas.h:89
uint32 GetEntry() const
Definition: Object.h:107
void AddMinion(Creature *minion, bool add)
Definition: InstanceScript.cpp:261
ObjectGuid FaerlinaGUID
Definition: instance_naxxramas.cpp:685
ObjectGuid AnubRekhanGUID
Definition: instance_naxxramas.cpp:683
Definition: naxxramas.h:93
ObjectGuid HeiganGUID
Definition: instance_naxxramas.cpp:690

+ Here is the call graph for this function:

void instance_naxxramas::instance_naxxramas_InstanceMapScript::OnCreatureRemove ( Creature creature)
inlineoverridevirtual

Reimplemented from InstanceScript.

223  {
224  AddMinion(creature, false);
225  }
void AddMinion(Creature *minion, bool add)
Definition: InstanceScript.cpp:261

+ Here is the call graph for this function:

void instance_naxxramas::instance_naxxramas_InstanceMapScript::OnGameObjectCreate ( GameObject go)
inlineoverridevirtual

Reimplemented from InstanceScript.

241  {
242  if (go->GetGOInfo()->displayId == 6785 || go->GetGOInfo()->displayId == 1287)
243  {
244  uint32 section = GetEruptionSection(go->GetPositionX(), go->GetPositionY());
245  HeiganEruptionGUID[section].insert(go->GetGUID());
246  return;
247  }
248 
249  switch (go->GetEntry())
250  {
251  case GO_GOTHIK_GATE:
252  GothikGateGUID = go->GetGUID();
253  break;
254  case GO_HORSEMEN_CHEST:
256  HorsemenChestGUID = go->GetGUID();
257  break;
259  PortalsGUID[0] = go->GetGUID();
260  break;
262  PortalsGUID[1] = go->GetGUID();
263  break;
265  PortalsGUID[2] = go->GetGUID();
266  break;
268  PortalsGUID[3] = go->GetGUID();
269  break;
272  break;
273  case GO_ROOM_KELTHUZAD:
274  KelthuzadDoorGUID = go->GetGUID();
275  break;
279  break;
283  break;
287  break;
291  break;
292  default:
293  break;
294  }
295 
297  }
Definition: naxxramas.h:159
Definition: naxxramas.h:117
uint32 GetEruptionSection(float x, float y)
Definition: instance_naxxramas.cpp:125
Definition: naxxramas.h:115
GuidSet HeiganEruptionGUID[4]
Definition: instance_naxxramas.cpp:689
ObjectGuid KelthuzadDoorGUID
Definition: instance_naxxramas.cpp:719
Definition: naxxramas.h:114
Definition: SharedDefines.h:2125
Definition: naxxramas.h:121
Definition: naxxramas.h:39
Definition: naxxramas.h:156
ObjectGuid GothikGateGUID
Definition: instance_naxxramas.cpp:696
Definition: inflate.h:49
Definition: naxxramas.h:36
uint32 displayId
Definition: GameObject.h:38
Definition: naxxramas.h:32
ObjectGuid PortalsGUID[4]
Definition: instance_naxxramas.cpp:718
virtual void OnGameObjectCreate(GameObject *go) override
Definition: InstanceScript.cpp:73
Definition: naxxramas.h:158
float GetPositionY() const
Definition: Position.h:105
Definition: naxxramas.h:118
uint32_t uint32
Definition: Define.h:150
GameObjectTemplate const * GetGOInfo() const
Definition: GameObject.h:894
Definition: naxxramas.h:138
Definition: naxxramas.h:157
Definition: UpdateFields.h:319
void RemoveFlag(uint16 index, uint32 oldFlag)
Definition: Object.cpp:1214
ObjectGuid const & GetGUID() const
Definition: Object.h:105
ObjectGuid HorsemenChestGUID
Definition: instance_naxxramas.cpp:702
Definition: naxxramas.h:116
uint32 GetEntry() const
Definition: Object.h:107
Definition: naxxramas.h:119
ObjectGuid KelthuzadTriggerGUID
Definition: instance_naxxramas.cpp:717
Definition: naxxramas.h:29
float GetPositionX() const
Definition: Position.h:104
EncounterState GetBossState(uint32 id) const
Definition: InstanceScript.h:227
Definition: naxxramas.h:120

+ Here is the call graph for this function:

void instance_naxxramas::instance_naxxramas_InstanceMapScript::OnGameObjectRemove ( GameObject go)
inlineoverridevirtual

Reimplemented from InstanceScript.

300  {
301  if (go->GetGOInfo()->displayId == 6785 || go->GetGOInfo()->displayId == 1287)
302  {
303  uint32 section = GetEruptionSection(go->GetPositionX(), go->GetPositionY());
304  HeiganEruptionGUID[section].erase(go->GetGUID());
305  return;
306  }
307 
308  switch (go->GetEntry())
309  {
310  case GO_BIRTH:
311  if (!SapphironGUID.IsEmpty())
312  {
313  if (Creature* sapphiron = instance->GetCreature(SapphironGUID))
314  sapphiron->AI()->DoAction(DATA_SAPPHIRON_BIRTH);
315  return;
316  }
317  break;
318  default:
319  break;
320  }
321 
323  }
Definition: naxxramas.h:48
uint32 GetEruptionSection(float x, float y)
Definition: instance_naxxramas.cpp:125
GuidSet HeiganEruptionGUID[4]
Definition: instance_naxxramas.cpp:689
virtual void OnGameObjectRemove(GameObject *go) override
Definition: InstanceScript.cpp:79
Definition: Creature.h:467
uint32 displayId
Definition: GameObject.h:38
float GetPositionY() const
Definition: Position.h:105
uint32_t uint32
Definition: Define.h:150
GameObjectTemplate const * GetGOInfo() const
Definition: GameObject.h:894
Map * instance
Definition: InstanceScript.h:148
ObjectGuid const & GetGUID() const
Definition: Object.h:105
Definition: naxxramas.h:153
Creature * GetCreature(ObjectGuid const &guid)
Definition: Map.cpp:3535
ObjectGuid SapphironGUID
Definition: instance_naxxramas.cpp:714
uint32 GetEntry() const
Definition: Object.h:107
float GetPositionX() const
Definition: Position.h:104
bool IsEmpty() const
Definition: ObjectGuid.h:242

+ Here is the call graph for this function:

void instance_naxxramas::instance_naxxramas_InstanceMapScript::OnUnitDeath ( Unit unit)
inlineoverridevirtual

Reimplemented from ZoneScript.

326  {
327  if (unit->GetTypeId() == TYPEID_PLAYER && IsEncounterInProgress())
328  {
329  playerDied = 1;
330  SaveToDB();
331  }
332 
333  if (Creature* creature = unit->ToCreature())
334  if (creature->GetEntry() == NPC_BIGGLESWORTH)
335  {
336  // Loads Kel'Thuzad's grid. We need this as he must be active in order for his texts to work.
337  instance->LoadGrid(3749.67f, -5114.06f);
338  if (Creature* kelthuzad = instance->GetCreature(KelthuzadGUID))
339  kelthuzad->AI()->Talk(SAY_KELTHUZAD_CAT_DIED);
340  }
341  }
virtual bool IsEncounterInProgress() const
Definition: InstanceScript.cpp:52
void LoadGrid(float x, float y)
Definition: Map.cpp:508
Definition: naxxramas.h:107
Definition: Creature.h:467
uint32 playerDied
Definition: instance_naxxramas.cpp:728
TypeID GetTypeId() const
Definition: Object.h:113
void SaveToDB()
Definition: InstanceScript.cpp:39
Map * instance
Definition: InstanceScript.h:148
ObjectGuid KelthuzadGUID
Definition: instance_naxxramas.cpp:716
Definition: ObjectGuid.h:33
Creature * GetCreature(ObjectGuid const &guid)
Definition: Map.cpp:3535
Creature * ToCreature()
Definition: Object.h:194
Definition: naxxramas.h:208

+ Here is the call graph for this function:

void instance_naxxramas::instance_naxxramas_InstanceMapScript::ProcessEvent ( WorldObject ,
uint32  eventId 
)
inlineoverridevirtual

Reimplemented from ZoneScript.

228  {
229  switch (eventId)
230  {
232  if (GetBossState(BOSS_THADDIUS) == SPECIAL) // this is the initial spawn, we want a shorter spawn time
234  else
236  break;
237  }
238  }
Definition: naxxramas.h:181
Definition: naxxramas.h:36
EventMap events
Definition: instance_naxxramas.cpp:730
Definition: InstanceScript.h:62
void ScheduleEvent(uint32 eventId, Milliseconds const &time, uint32 group=0, uint8 phase=0)
Definition: EventMap.h:123
Definition: Common.h:103
Definition: naxxramas.h:182
EncounterState GetBossState(uint32 id) const
Definition: InstanceScript.h:227

+ Here is the call graph for this function:

bool instance_naxxramas::instance_naxxramas_InstanceMapScript::SetBossState ( uint32  id,
EncounterState  state 
)
inlineoverridevirtual

Reimplemented from InstanceScript.

455  {
456  if (!InstanceScript::SetBossState(id, state))
457  return false;
458 
459  switch (id)
460  {
461  case BOSS_MAEXXNA:
462  if (state == DONE)
463  {
465  teleporter->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
466 
468  }
469  break;
470  case BOSS_LOATHEB:
471  if (state == DONE)
472  {
474  teleporter->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
475 
477  }
478  break;
479  case BOSS_THADDIUS:
480  if (state == DONE)
481  {
483  teleporter->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
484 
486  }
487  break;
488  case BOSS_GOTHIK:
489  if (state == DONE)
491  break;
492  case BOSS_HORSEMEN:
493  if (state == DONE)
494  {
495  if (GameObject* horsemenChest = instance->GetGameObject(HorsemenChestGUID))
496  {
497  horsemenChest->SetRespawnTime(horsemenChest->GetRespawnDelay());
498  horsemenChest->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
499  }
500 
502  teleporter->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
503 
505  }
506  break;
507  case BOSS_SAPPHIRON:
508  if (state == DONE)
510  break;
511  default:
512  break;
513  }
514 
515  return true;
516  }
Definition: SharedDefines.h:2125
Definition: naxxramas.h:39
Definition: inflate.h:49
Definition: naxxramas.h:36
Definition: naxxramas.h:62
EventMap events
Definition: instance_naxxramas.cpp:730
Definition: naxxramas.h:61
Definition: naxxramas.h:32
Definition: naxxramas.h:40
GameObject * GetGameObject(uint32 type)
Definition: InstanceScript.h:184
Map * instance
Definition: InstanceScript.h:148
Definition: GameObject.h:880
void ScheduleEvent(uint32 eventId, Milliseconds const &time, uint32 group=0, uint8 phase=0)
Definition: EventMap.h:123
virtual bool SetBossState(uint32 id, EncounterState state)
Definition: InstanceScript.cpp:273
Definition: UpdateFields.h:319
Definition: naxxramas.h:188
ObjectGuid HorsemenChestGUID
Definition: instance_naxxramas.cpp:702
Definition: naxxramas.h:185
Definition: naxxramas.h:38
Definition: naxxramas.h:171
Definition: naxxramas.h:59
GameObject * GetGameObject(ObjectGuid const &guid)
Definition: Map.cpp:3545
Definition: naxxramas.h:29
Definition: naxxramas.h:60

+ Here is the call graph for this function:

void instance_naxxramas::instance_naxxramas_InstanceMapScript::SetData ( uint32  id,
uint32  value 
)
inlineoverridevirtual

Reimplemented from ZoneScript.

344  {
345  switch (id)
346  {
347  case DATA_HEIGAN_ERUPT:
349  break;
350  case DATA_GOTHIK_GATE:
352  gate->SetGoState(GOState(value));
353  break;
354  case DATA_HORSEMEN0:
355  case DATA_HORSEMEN1:
356  case DATA_HORSEMEN2:
357  case DATA_HORSEMEN3:
358  if (value == NOT_STARTED)
359  {
362  }
363  else if (value == DONE)
364  {
365  time_t now = time(NULL);
366 
367  if (minHorsemenDiedTime == 0)
368  minHorsemenDiedTime = now;
369 
370  maxHorsemenDiedTime = now;
371  }
372  break;
375  break;
377  hadAnubRekhanGreet = (value == 1u);
378  break;
380  hadFaerlinaGreet = (value == 1u);
381  break;
383  hadThaddiusGreet = (value == 1u);
384  break;
385  default:
386  break;
387  }
388  }
Definition: naxxramas.h:51
ObjectGuid GothikGateGUID
Definition: instance_naxxramas.cpp:696
Definition: inflate.h:49
arena_t NULL
Definition: jemalloc_internal.h:624
Definition: naxxramas.h:49
Definition: naxxramas.h:55
time_t minHorsemenDiedTime
Definition: instance_naxxramas.cpp:703
Definition: naxxramas.h:53
Definition: naxxramas.h:46
Definition: naxxramas.h:56
Definition: naxxramas.h:47
Definition: InstanceScript.h:58
Map * instance
Definition: InstanceScript.h:148
Definition: GameObject.h:880
Definition: naxxramas.h:50
uint8 AbominationCount
Definition: instance_naxxramas.cpp:721
void HeiganErupt(uint32 section)
Definition: instance_naxxramas.cpp:614
GOState
Definition: GameObject.h:820
time_t maxHorsemenDiedTime
Definition: instance_naxxramas.cpp:704
bool hadFaerlinaGreet
Definition: instance_naxxramas.cpp:723
Definition: naxxramas.h:54
const FieldDescriptor value
Definition: descriptor.h:1522
bool hadAnubRekhanGreet
Definition: instance_naxxramas.cpp:722
GameObject * GetGameObject(ObjectGuid const &guid)
Definition: Map.cpp:3545
bool hadThaddiusGreet
Definition: instance_naxxramas.cpp:724
Definition: naxxramas.h:57

+ Here is the call graph for this function:

void instance_naxxramas::instance_naxxramas_InstanceMapScript::Update ( uint32  diff)
inlineoverridevirtual

Reimplemented from InstanceScript.

519  {
520  events.Update(diff);
521 
522  while (uint32 eventId = events.ExecuteEvent())
523  {
524  switch (eventId)
525  {
527  if (Creature* korthazz = instance->GetCreature(ThaneGUID))
528  korthazz->AI()->Talk(SAY_DIALOGUE_GOTHIK_HORSEMAN);
530  break;
532  if (Creature* zeliek = instance->GetCreature(SirGUID))
533  zeliek->AI()->Talk(SAY_DIALOGUE_GOTHIK_HORSEMAN);
535  break;
537  if (Creature* blaumeux = instance->GetCreature(LadyGUID))
538  blaumeux->AI()->Talk(SAY_DIALOGUE_GOTHIK_HORSEMAN);
540  break;
542  if (Creature* rivendare = instance->GetCreature(BaronGUID))
543  rivendare->AI()->Talk(SAY_DIALOGUE_GOTHIK_HORSEMAN);
545  break;
547  if (Creature* blaumeux = instance->GetCreature(LadyGUID))
548  blaumeux->AI()->Talk(SAY_DIALOGUE_GOTHIK_HORSEMAN2);
550  break;
552  if (Creature* zeliek = instance->GetCreature(SirGUID))
553  zeliek->AI()->Talk(SAY_DIALOGUE_GOTHIK_HORSEMAN2);
555  break;
557  if (Creature* korthazz = instance->GetCreature(ThaneGUID))
558  korthazz->AI()->Talk(SAY_DIALOGUE_GOTHIK_HORSEMAN2);
560  break;
562  if (Creature* rivendare = instance->GetCreature(BaronGUID))
563  rivendare->AI()->Talk(SAY_DIALOGUE_GOTHIK_HORSEMAN2);
564  break;
566  // Loads Kel'Thuzad's grid. We need this as he must be active in order for his texts to work.
567  instance->LoadGrid(3749.67f, -5114.06f);
568  if (Creature* kelthuzad = instance->GetCreature(KelthuzadGUID))
569  kelthuzad->AI()->Talk(CurrentWingTaunt);
571  break;
573  if (Creature* kelthuzad = instance->GetCreature(KelthuzadGUID))
574  kelthuzad->AI()->Talk(SAY_DIALOGUE_SAPPHIRON_KELTHUZAD);
577  break;
579  if (Creature* lichKing = instance->GetCreature(LichKingGUID))
580  lichKing->AI()->Talk(SAY_DIALOGUE_SAPPHIRON_LICH_KING);
582  break;
584  if (Creature* kelthuzad = instance->GetCreature(KelthuzadGUID))
585  kelthuzad->AI()->Talk(SAY_DIALOGUE_SAPPHIRON_KELTHUZAD2);
587  break;
589  if (Creature* lichKing = instance->GetCreature(LichKingGUID))
590  lichKing->AI()->Talk(SAY_DIALOGUE_SAPPHIRON_LICH_KING2);
592  break;
594  if (Creature* kelthuzad = instance->GetCreature(KelthuzadGUID))
595  kelthuzad->AI()->Talk(SAY_DIALOGUE_SAPPHIRON_KELTHUZAD3);
597  break;
599  if (Creature* kelthuzad = instance->GetCreature(KelthuzadGUID))
600  kelthuzad->AI()->Talk(SAY_DIALOGUE_SAPPHIRON_KELTHUZAD4);
602  break;
605  if (Creature* thaddius = instance->GetCreature(ThaddiusGUID))
606  thaddius->AI()->DoAction(-1);
607  break;
608  default:
609  break;
610  }
611  }
612  }
Definition: naxxramas.h:176
ObjectGuid BaronGUID
Definition: instance_naxxramas.cpp:700
void LoadGrid(float x, float y)
Definition: Map.cpp:508
ObjectGuid LadyGUID
Definition: instance_naxxramas.cpp:699
ObjectGuid ThaddiusGUID
Definition: instance_naxxramas.cpp:708
ObjectGuid KelthuzadDoorGUID
Definition: instance_naxxramas.cpp:719
Definition: naxxramas.h:191
Definition: naxxramas.h:177
Definition: inflate.h:49
Definition: naxxramas.h:36
Definition: naxxramas.h:173
Definition: naxxramas.h:200
Definition: Creature.h:467
Definition: naxxramas.h:189
EventMap events
Definition: instance_naxxramas.cpp:730
ObjectGuid SirGUID
Definition: instance_naxxramas.cpp:701
Definition: naxxramas.h:205
Definition: naxxramas.h:175
Definition: naxxramas.h:212
Definition: naxxramas.h:178
uint32_t uint32
Definition: Define.h:150
Map * instance
Definition: InstanceScript.h:148
void HandleGameObject(ObjectGuid guid, bool open, GameObject *go=nullptr)
Definition: InstanceScript.cpp:397
void ScheduleEvent(uint32 eventId, Milliseconds const &time, uint32 group=0, uint8 phase=0)
Definition: EventMap.h:123
ObjectGuid LichKingGUID
Definition: instance_naxxramas.cpp:720
ObjectGuid KelthuzadGUID
Definition: instance_naxxramas.cpp:716
void Update(uint32 time)
Definition: EventMap.h:54
Definition: naxxramas.h:174
Definition: naxxramas.h:188
Definition: naxxramas.h:185
Definition: naxxramas.h:199
Creature * GetCreature(ObjectGuid const &guid)
Definition: Map.cpp:3535
Definition: naxxramas.h:193
uint32 ExecuteEvent()
Definition: EventMap.cpp:46
ObjectGuid ThaneGUID
Definition: instance_naxxramas.cpp:698
Definition: naxxramas.h:182
Definition: naxxramas.h:172
Definition: naxxramas.h:204
Definition: naxxramas.h:171
Definition: naxxramas.h:213
EncounterState GetBossState(uint32 id) const
Definition: InstanceScript.h:227
Definition: naxxramas.h:203
Definition: naxxramas.h:206
uint8 CurrentWingTaunt
Definition: instance_naxxramas.cpp:725
Definition: naxxramas.h:192
Definition: naxxramas.h:190

+ Here is the call graph for this function:

Member Data Documentation

uint8 instance_naxxramas::instance_naxxramas_InstanceMapScript::AbominationCount
protected
ObjectGuid instance_naxxramas::instance_naxxramas_InstanceMapScript::AnubRekhanGUID
protected
ObjectGuid instance_naxxramas::instance_naxxramas_InstanceMapScript::BaronGUID
protected
uint8 instance_naxxramas::instance_naxxramas_InstanceMapScript::CurrentWingTaunt
protected
EventMap instance_naxxramas::instance_naxxramas_InstanceMapScript::events
protected
ObjectGuid instance_naxxramas::instance_naxxramas_InstanceMapScript::FaerlinaGUID
protected
ObjectGuid instance_naxxramas::instance_naxxramas_InstanceMapScript::FeugenGUID
protected
ObjectGuid instance_naxxramas::instance_naxxramas_InstanceMapScript::GothikGateGUID
protected
bool instance_naxxramas::instance_naxxramas_InstanceMapScript::hadAnubRekhanGreet
protected
bool instance_naxxramas::instance_naxxramas_InstanceMapScript::hadFaerlinaGreet
protected
bool instance_naxxramas::instance_naxxramas_InstanceMapScript::hadThaddiusGreet
protected
GuidSet instance_naxxramas::instance_naxxramas_InstanceMapScript::HeiganEruptionGUID[4]
protected
ObjectGuid instance_naxxramas::instance_naxxramas_InstanceMapScript::HeiganGUID
protected
ObjectGuid instance_naxxramas::instance_naxxramas_InstanceMapScript::HorsemenChestGUID
protected
ObjectGuid instance_naxxramas::instance_naxxramas_InstanceMapScript::KelthuzadDoorGUID
protected
ObjectGuid instance_naxxramas::instance_naxxramas_InstanceMapScript::KelthuzadGUID
protected
ObjectGuid instance_naxxramas::instance_naxxramas_InstanceMapScript::KelthuzadTriggerGUID
protected
ObjectGuid instance_naxxramas::instance_naxxramas_InstanceMapScript::LadyGUID
protected
ObjectGuid instance_naxxramas::instance_naxxramas_InstanceMapScript::LichKingGUID
protected
time_t instance_naxxramas::instance_naxxramas_InstanceMapScript::maxHorsemenDiedTime
protected
time_t instance_naxxramas::instance_naxxramas_InstanceMapScript::minHorsemenDiedTime
protected
uint32 instance_naxxramas::instance_naxxramas_InstanceMapScript::playerDied
protected
ObjectGuid instance_naxxramas::instance_naxxramas_InstanceMapScript::PortalsGUID[4]
protected
ObjectGuid instance_naxxramas::instance_naxxramas_InstanceMapScript::RazuviousGUID
protected
ObjectGuid instance_naxxramas::instance_naxxramas_InstanceMapScript::SapphironGUID
protected
ObjectGuid instance_naxxramas::instance_naxxramas_InstanceMapScript::SirGUID
protected
ObjectGuid instance_naxxramas::instance_naxxramas_InstanceMapScript::StalaggGUID
protected
ObjectGuid instance_naxxramas::instance_naxxramas_InstanceMapScript::ThaddiusGUID
protected
ObjectGuid instance_naxxramas::instance_naxxramas_InstanceMapScript::ThaneGUID
protected

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