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

Public Member Functions

 instance_zulgurub_InstanceMapScript (Map *map)
 
void OnCreatureCreate (Creature *creature) override
 
void OnGameObjectCreate (GameObject *go) override
 
ObjectGuid GetGuidData (uint32 uiData) const override
 
uint32 GetData (uint32 type) const override
 
void RemoveHakkarPowerStack ()
 
bool SetBossState (uint32 type, EncounterState state) 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)
 

Private Attributes

ObjectGuid _jindoTheHexxerGUID
 
ObjectGuid _vilebranchSpeakerGUID
 
ObjectGuid _arlokkGUID
 
ObjectGuid _goGongOfBethekkGUID
 
ObjectGuid _hakkarGUID
 
ObjectGuid _gahzrankaGUID
 
ObjectGuid _edgeOfMadnessGUID
 

Additional Inherited Members

- Static Public Member Functions inherited from InstanceScript
static std::string GetBossStateName (uint8 state)
 
- Public Attributes inherited from InstanceScript
Mapinstance
 
TaskScheduler scheduler
 
- 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_zulgurub_InstanceMapScript()

instance_zulgurub::instance_zulgurub_InstanceMapScript::instance_zulgurub_InstanceMapScript ( Map map)
inline
54 : InstanceScript(map)
55 {
60 }
#define DataHeader
Definition: blackrock_depths.h:23
uint32 const EncounterCount
Definition: blackrock_spire.h:23
ObjectData const creatureData[]
Definition: instance_zulgurub.cpp:38
DoorData const doorData[]
Definition: instance_zulgurub.cpp:32
Definition: InstanceScript.h:142
void SetBossNumber(uint32 number)
Definition: InstanceScript.h:285
void LoadDoorData(DoorData const *data)
Definition: InstanceScript.cpp:164
void SetHeaders(std::string const &dataHeaders)
Definition: InstanceScript.cpp:141
void LoadObjectData(ObjectData const *creatureData, ObjectData const *gameObjectData)
Definition: InstanceScript.cpp:176

References creatureData, DataHeader, doorData, EncounterCount, InstanceScript::LoadDoorData(), InstanceScript::LoadObjectData(), InstanceScript::SetBossNumber(), and InstanceScript::SetHeaders().

Member Function Documentation

◆ GetData()

uint32 instance_zulgurub::instance_zulgurub_InstanceMapScript::GetData ( uint32  type) const
inlineoverridevirtual

Reimplemented from ZoneScript.

138 {
139 if (type == DATA_GAHZRANKA)
140 {
142 }
143
144 return 0;
145 }
@ DATA_GAHZRANKA
Definition: zulgurub.h:39
@ DONE
Definition: InstanceScript.h:60
EncounterState GetBossState(uint32 id) const
Definition: InstanceScript.h:235
ObjectGuid _gahzrankaGUID
Definition: instance_zulgurub.cpp:186

References _gahzrankaGUID, DATA_GAHZRANKA, DONE, and InstanceScript::GetBossState().

◆ GetGuidData()

ObjectGuid instance_zulgurub::instance_zulgurub_InstanceMapScript::GetGuidData ( uint32  uiData) const
inlineoverridevirtual

Reimplemented from InstanceScript.

119 {
120 switch (uiData)
121 {
122 case DATA_JINDO:
123 return _jindoTheHexxerGUID;
124 case NPC_ARLOKK:
125 return _arlokkGUID;
128 case DATA_HAKKAR:
129 return _hakkarGUID;
131 return _edgeOfMadnessGUID;
132 }
133
134 return ObjectGuid::Empty;
135 }
@ NPC_ARLOKK
Definition: zulgurub.h:49
@ GO_GONG_OF_BETHEKK
Definition: zulgurub.h:79
@ DATA_HAKKAR
Definition: zulgurub.h:36
@ DATA_JINDO
Definition: zulgurub.h:38
@ DATA_EDGE_OF_MADNESS
Definition: zulgurub.h:40
static ObjectGuid const Empty
Definition: ObjectGuid.h:120
ObjectGuid _goGongOfBethekkGUID
Definition: instance_zulgurub.cpp:184
ObjectGuid _jindoTheHexxerGUID
Definition: instance_zulgurub.cpp:181
ObjectGuid _arlokkGUID
Definition: instance_zulgurub.cpp:183
ObjectGuid _edgeOfMadnessGUID
Definition: instance_zulgurub.cpp:187
ObjectGuid _hakkarGUID
Definition: instance_zulgurub.cpp:185

References _arlokkGUID, _edgeOfMadnessGUID, _goGongOfBethekkGUID, _hakkarGUID, _jindoTheHexxerGUID, DATA_EDGE_OF_MADNESS, DATA_HAKKAR, DATA_JINDO, ObjectGuid::Empty, GO_GONG_OF_BETHEKK, and NPC_ARLOKK.

◆ OnCreatureCreate()

void instance_zulgurub::instance_zulgurub_InstanceMapScript::OnCreatureCreate ( Creature creature)
inlineoverridevirtual

Reimplemented from InstanceScript.

63 {
65
66 switch (creature->GetEntry())
67 {
69 _jindoTheHexxerGUID = creature->GetGUID();
70 break;
72 _vilebranchSpeakerGUID = creature->GetGUID();
73 break;
74 case NPC_ARLOKK:
75 _arlokkGUID = creature->GetGUID();
76 break;
77 case NPC_HAKKAR:
78 _hakkarGUID = creature->GetGUID();
79 break;
81 if (Creature* marli = GetCreature(DATA_MARLI))
82 {
83 marli->AI()->JustSummoned(creature);
84 }
85 break;
86 case NPC_GAHZRANKA:
87 _gahzrankaGUID = creature->GetGUID();
88 break;
89 case NPC_GRILEK:
90 case NPC_HAZZARAH:
91 case NPC_RENATAKI:
92 case NPC_WUSHOOLAY:
93 _edgeOfMadnessGUID = creature->GetGUID();
94 break;
95 default:
96 break;
97 }
98 }
@ NPC_HAKKAR
Definition: zulgurub.h:66
@ NPC_VILEBRANCH_SPEAKER
Definition: zulgurub.h:64
@ NPC_HAZZARAH
Definition: zulgurub.h:71
@ NPC_GAHZRANKA
Definition: zulgurub.h:69
@ NPC_JINDO_THE_HEXXER
Definition: zulgurub.h:58
@ NPC_RENATAKI
Definition: zulgurub.h:72
@ NPC_WUSHOOLAY
Definition: zulgurub.h:73
@ NPC_SPAWN_OF_MARLI
Definition: zulgurub.h:56
@ NPC_GRILEK
Definition: zulgurub.h:70
@ DATA_MARLI
Definition: zulgurub.h:33
Definition: Creature.h:43
uint32 GetEntry() const
Definition: Object.h:115
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:112
void OnCreatureCreate(Creature *creature) override
Definition: InstanceScript.cpp:58
Creature * GetCreature(uint32 type)
Definition: InstanceScript.cpp:103
ObjectGuid _vilebranchSpeakerGUID
Definition: instance_zulgurub.cpp:182

References _arlokkGUID, _edgeOfMadnessGUID, _gahzrankaGUID, _hakkarGUID, _jindoTheHexxerGUID, _vilebranchSpeakerGUID, DATA_MARLI, InstanceScript::GetCreature(), Object::GetEntry(), Object::GetGUID(), NPC_ARLOKK, NPC_GAHZRANKA, NPC_GRILEK, NPC_HAKKAR, NPC_HAZZARAH, NPC_JINDO_THE_HEXXER, NPC_RENATAKI, NPC_SPAWN_OF_MARLI, NPC_VILEBRANCH_SPEAKER, NPC_WUSHOOLAY, and InstanceScript::OnCreatureCreate().

◆ OnGameObjectCreate()

void instance_zulgurub::instance_zulgurub_InstanceMapScript::OnGameObjectCreate ( GameObject go)
inlineoverridevirtual

Reimplemented from InstanceScript.

101 {
103
104 switch (go->GetEntry())
105 {
110 else
112 break;
113 default:
114 break;
115 }
116 }
@ DATA_ARLOKK
Definition: zulgurub.h:34
@ GO_FLAG_NOT_SELECTABLE
Definition: SharedDefines.h:1607
void SetGameObjectFlag(GameObjectFlags flags)
Definition: GameObject.h:218
void RemoveGameObjectFlag(GameObjectFlags flags)
Definition: GameObject.h:219
void OnGameObjectCreate(GameObject *go) override
Definition: InstanceScript.cpp:73

References _goGongOfBethekkGUID, DATA_ARLOKK, DONE, InstanceScript::GetBossState(), Object::GetEntry(), Object::GetGUID(), GO_FLAG_NOT_SELECTABLE, GO_GONG_OF_BETHEKK, InstanceScript::OnGameObjectCreate(), GameObject::RemoveGameObjectFlag(), and GameObject::SetGameObjectFlag().

◆ RemoveHakkarPowerStack()

void instance_zulgurub::instance_zulgurub_InstanceMapScript::RemoveHakkarPowerStack ( )
inline
148 {
150 {
151 hakkar->CastSpell(hakkar, SPELL_HAKKAR_POWER_DOWN, true);
152 }
153 }
@ SPELL_HAKKAR_POWER_DOWN
Definition: zulgurub.h:85
Map * instance
Definition: InstanceScript.h:148
Creature * GetCreature(ObjectGuid const guid)
Definition: Map.cpp:3317

References _hakkarGUID, Map::GetCreature(), InstanceScript::instance, and SPELL_HAKKAR_POWER_DOWN.

Referenced by SetBossState().

◆ SetBossState()

bool instance_zulgurub::instance_zulgurub_InstanceMapScript::SetBossState ( uint32  type,
EncounterState  state 
)
inlineoverridevirtual

Reimplemented from InstanceScript.

156 {
157 if (!InstanceScript::SetBossState(type, state))
158 return false;
159
160 switch (type)
161 {
162 case DATA_JEKLIK:
163 case DATA_VENOXIS:
164 case DATA_MARLI:
165 case DATA_ARLOKK:
166 case DATA_THEKAL:
167 if (state == DONE)
169 break;
170 default:
171 break;
172 }
173
174 return true;
175 }
@ DATA_THEKAL
Definition: zulgurub.h:35
@ DATA_JEKLIK
Definition: zulgurub.h:31
@ DATA_VENOXIS
Definition: zulgurub.h:32
virtual bool SetBossState(uint32 id, EncounterState state)
Definition: InstanceScript.cpp:373
void RemoveHakkarPowerStack()
Definition: instance_zulgurub.cpp:147

References DATA_ARLOKK, DATA_JEKLIK, DATA_MARLI, DATA_THEKAL, DATA_VENOXIS, DONE, RemoveHakkarPowerStack(), and InstanceScript::SetBossState().

Member Data Documentation

◆ _arlokkGUID

ObjectGuid instance_zulgurub::instance_zulgurub_InstanceMapScript::_arlokkGUID
private

Referenced by GetGuidData(), and OnCreatureCreate().

◆ _edgeOfMadnessGUID

ObjectGuid instance_zulgurub::instance_zulgurub_InstanceMapScript::_edgeOfMadnessGUID
private

Referenced by GetGuidData(), and OnCreatureCreate().

◆ _gahzrankaGUID

ObjectGuid instance_zulgurub::instance_zulgurub_InstanceMapScript::_gahzrankaGUID
private

Referenced by GetData(), and OnCreatureCreate().

◆ _goGongOfBethekkGUID

ObjectGuid instance_zulgurub::instance_zulgurub_InstanceMapScript::_goGongOfBethekkGUID
private

Referenced by GetGuidData(), and OnGameObjectCreate().

◆ _hakkarGUID

ObjectGuid instance_zulgurub::instance_zulgurub_InstanceMapScript::_hakkarGUID
private

◆ _jindoTheHexxerGUID

ObjectGuid instance_zulgurub::instance_zulgurub_InstanceMapScript::_jindoTheHexxerGUID
private

Referenced by GetGuidData(), and OnCreatureCreate().

◆ _vilebranchSpeakerGUID

ObjectGuid instance_zulgurub::instance_zulgurub_InstanceMapScript::_vilebranchSpeakerGUID
private

Referenced by OnCreatureCreate().