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

Public Member Functions

 instance_black_temple_InstanceMapScript (Map *map)
 
void OnCreatureCreate (Creature *creature) override
 
void OnGameObjectCreate (GameObject *go) override
 
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)
 

Protected Attributes

GuidSet ashtongueGUIDs
 

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 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_black_temple_InstanceMapScript()

instance_black_temple::instance_black_temple_InstanceMapScript::instance_black_temple_InstanceMapScript ( Map map)
inline
96 : InstanceScript(map)
97 {
103
104 ashtongueGUIDs.clear();
105 }
ObjectData const creatureData[]
Definition: instance_black_temple.cpp:48
ObjectData const objectData[]
Definition: instance_black_temple.cpp:69
DoorData const doorData[]
Definition: instance_black_temple.cpp:27
BossBoundaryData const boundaries
Definition: instance_black_temple.cpp:74
#define DataHeader
Definition: blackrock_depths.h:23
@ MAX_ENCOUNTERS
Definition: deadmines.h:30
Definition: InstanceScript.h:142
void SetBossNumber(uint32 number)
Definition: InstanceScript.h:285
void LoadDoorData(DoorData const *data)
Definition: InstanceScript.cpp:161
void LoadBossBoundaries(BossBoundaryData const &data)
Definition: InstanceScript.cpp:131
void SetHeaders(std::string const &dataHeaders)
Definition: InstanceScript.cpp:138
void LoadObjectData(ObjectData const *creatureData, ObjectData const *gameObjectData)
Definition: InstanceScript.cpp:173
GuidSet ashtongueGUIDs
Definition: instance_black_temple.cpp:198

References ashtongueGUIDs, boundaries, creatureData, DataHeader, doorData, InstanceScript::LoadBossBoundaries(), InstanceScript::LoadDoorData(), InstanceScript::LoadObjectData(), MAX_ENCOUNTERS, objectData, InstanceScript::SetBossNumber(), and InstanceScript::SetHeaders().

Member Function Documentation

◆ OnCreatureCreate()

void instance_black_temple::instance_black_temple_InstanceMapScript::OnCreatureCreate ( Creature creature)
inlineoverridevirtual

Reimplemented from InstanceScript.

108 {
109 switch (creature->GetEntry())
110 {
113 teron->AI()->JustSummoned(creature);
114 break;
117 reliquary->AI()->JustSummoned(creature);
118 break;
123 illidan->AI()->JustSummoned(creature);
124 break;
128 creature->SetCorpseDelay(5);
129 break;
136 case NPC_STORM_FURY:
139 else
140 ashtongueGUIDs.insert(creature->GetGUID());
141 break;
142 default:
143 break;
144 }
145
147 }
@ DONE
Definition: InstanceScript.h:60
@ NPC_SHADOWY_CONSTRUCT
Definition: black_temple.h:60
@ NPC_FLAME_OF_AZZINOTH
Definition: black_temple.h:76
@ NPC_ASHTONGUE_PRIMALIST
Definition: black_temple.h:81
@ NPC_ENSLAVED_SOUL
Definition: black_temple.h:65
@ NPC_ASHTONGUE_MYSTIC
Definition: black_temple.h:79
@ NPC_ASHTONGUE_STORMCALLER
Definition: black_temple.h:80
@ NPC_ANGERED_SOUL_FRAGMENT
Definition: black_temple.h:61
@ NPC_ASHTONGUE_FERAL_SPIRIT
Definition: black_temple.h:82
@ NPC_HUNGERING_SOUL_FRAGMENT
Definition: black_temple.h:62
@ NPC_ASHTONGUE_STALKER
Definition: black_temple.h:83
@ NPC_BLADE_OF_AZZINOTH
Definition: black_temple.h:75
@ NPC_ASHTONGUE_BATTLELORD
Definition: black_temple.h:78
@ NPC_PARASITIC_SHADOWFIEND
Definition: black_temple.h:74
@ NPC_SUFFERING_SOUL_FRAGMENT
Definition: black_temple.h:63
@ NPC_STORM_FURY
Definition: black_temple.h:84
@ DATA_TERON_GOREFIEND
Definition: black_temple.h:32
@ DATA_ILLIDAN_STORMRAGE
Definition: black_temple.h:38
@ DATA_SHADE_OF_AKAMA
Definition: black_temple.h:31
@ DATA_RELIQUARY_OF_SOULS
Definition: black_temple.h:34
@ FACTION_ASHTONGUE_DEATHSWORN
Definition: SharedDefines.h:231
Definition: Creature.h:46
void SetCorpseDelay(uint32 delay)
Definition: Creature.h:73
uint32 GetEntry() const
Definition: Object.h:112
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:109
void SetFaction(uint32 faction)
Definition: Unit.cpp:10018
void OnCreatureCreate(Creature *creature) override
Definition: InstanceScript.cpp:58
Creature * GetCreature(uint32 type)
Definition: InstanceScript.cpp:100
EncounterState GetBossState(uint32 id) const
Definition: InstanceScript.h:235

References ashtongueGUIDs, DATA_ILLIDAN_STORMRAGE, DATA_RELIQUARY_OF_SOULS, DATA_SHADE_OF_AKAMA, DATA_TERON_GOREFIEND, DONE, FACTION_ASHTONGUE_DEATHSWORN, InstanceScript::GetBossState(), InstanceScript::GetCreature(), Object::GetEntry(), Object::GetGUID(), NPC_ANGERED_SOUL_FRAGMENT, NPC_ASHTONGUE_BATTLELORD, NPC_ASHTONGUE_FERAL_SPIRIT, NPC_ASHTONGUE_MYSTIC, NPC_ASHTONGUE_PRIMALIST, NPC_ASHTONGUE_STALKER, NPC_ASHTONGUE_STORMCALLER, NPC_BLADE_OF_AZZINOTH, NPC_ENSLAVED_SOUL, NPC_FLAME_OF_AZZINOTH, NPC_HUNGERING_SOUL_FRAGMENT, NPC_PARASITIC_SHADOWFIEND, NPC_SHADOWY_CONSTRUCT, NPC_STORM_FURY, NPC_SUFFERING_SOUL_FRAGMENT, InstanceScript::OnCreatureCreate(), Creature::SetCorpseDelay(), and Unit::SetFaction().

◆ OnGameObjectCreate()

void instance_black_temple::instance_black_temple_InstanceMapScript::OnGameObjectCreate ( GameObject go)
inlineoverridevirtual

Reimplemented from InstanceScript.

150 {
151 // If created after Illidari Council is done, then skip Akama's event. Used for crashes/reset
152 if (go->GetEntry() == GO_ILLIDAN_GATE)
153 {
155 {
158 }
159 }
160
162 }
@ GO_ILLIDAN_GATE
Definition: black_temple.h:102
@ DATA_ILLIDARI_COUNCIL
Definition: black_temple.h:36
@ DATA_AKAMA_ILLIDAN
Definition: black_temple.h:37
static ObjectGuid const Empty
Definition: ObjectGuid.h:120
void HandleGameObject(ObjectGuid guid, bool open, GameObject *go=nullptr)
Definition: InstanceScript.cpp:110
void OnGameObjectCreate(GameObject *go) override
Definition: InstanceScript.cpp:70
bool SetBossState(uint32 type, EncounterState state) override
Definition: instance_black_temple.cpp:164

References DATA_AKAMA_ILLIDAN, DATA_ILLIDARI_COUNCIL, DONE, ObjectGuid::Empty, InstanceScript::GetBossState(), Object::GetEntry(), GO_ILLIDAN_GATE, InstanceScript::HandleGameObject(), InstanceScript::OnGameObjectCreate(), and SetBossState().

◆ SetBossState()

bool instance_black_temple::instance_black_temple_InstanceMapScript::SetBossState ( uint32  type,
EncounterState  state 
)
inlineoverridevirtual

Reimplemented from InstanceScript.

165 {
166 if (!InstanceScript::SetBossState(type, state))
167 return false;
168
169 if (state == DONE)
170 {
171 switch (type)
172 {
175 trigger->AI()->Talk(EMOTE_NAJENTUS_DEFEATED);
176 break;
178 for (ObjectGuid const& guid : ashtongueGUIDs)
179 if (Creature* ashtongue = instance->GetCreature(guid))
180 ashtongue->SetFaction(FACTION_ASHTONGUE_DEATHSWORN);
181 break;
184 akama->AI()->DoAction(0);
185 break;
186 default:
187 break;
188 }
189
192 trigger->AI()->Talk(EMOTE_LOWER_TEMPLE_DEFEATED);
193 }
194 return true;
195 }
@ EMOTE_LOWER_TEMPLE_DEFEATED
Definition: black_temple.h:121
@ EMOTE_NAJENTUS_DEFEATED
Definition: black_temple.h:120
@ DATA_BLACK_TEMPLE_TRIGGER
Definition: black_temple.h:46
@ DATA_HIGH_WARLORD_NAJENTUS
Definition: black_temple.h:29
@ DATA_GURTOGG_BLOODBOIL
Definition: black_temple.h:33
Definition: ObjectGuid.h:118
virtual bool SetBossState(uint32 id, EncounterState state)
Definition: InstanceScript.cpp:351
Map * instance
Definition: InstanceScript.h:148
bool AllBossesDone() const
Definition: InstanceScript.cpp:764
Creature * GetCreature(ObjectGuid const guid)
Definition: Map.cpp:3314

References InstanceScript::AllBossesDone(), ashtongueGUIDs, DATA_AKAMA_ILLIDAN, DATA_BLACK_TEMPLE_TRIGGER, DATA_GURTOGG_BLOODBOIL, DATA_HIGH_WARLORD_NAJENTUS, DATA_ILLIDARI_COUNCIL, DATA_RELIQUARY_OF_SOULS, DATA_SHADE_OF_AKAMA, DATA_TERON_GOREFIEND, DONE, EMOTE_LOWER_TEMPLE_DEFEATED, EMOTE_NAJENTUS_DEFEATED, FACTION_ASHTONGUE_DEATHSWORN, Map::GetCreature(), InstanceScript::GetCreature(), InstanceScript::instance, and InstanceScript::SetBossState().

Referenced by OnGameObjectCreate().

Member Data Documentation

◆ ashtongueGUIDs

GuidSet instance_black_temple::instance_black_temple_InstanceMapScript::ashtongueGUIDs
protected