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

Public Member Functions

 instance_blackfathom_deeps_InstanceMapScript (Map *map)
 
void Initialize () override
 
void OnCreatureCreate (Creature *creature) override
 
void OnUnitDeath (Unit *unit) override
 
void OnGameObjectCreate (GameObject *gameobject) override
 
void SetData (uint32 type, uint32 data) override
 
void ReadSaveDataMore (std::istringstream &data) override
 
void WriteSaveDataMore (std::ostringstream &data) override
 
bool IsFireEventDone ()
 
- 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

uint32 _encounters [MAX_ENCOUNTERS]
 
ObjectGuid _akumaiPortalGUID
 
uint8 _requiredDeaths
 

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

instance_blackfathom_deeps::instance_blackfathom_deeps_InstanceMapScript::instance_blackfathom_deeps_InstanceMapScript ( Map map)
inline
34: InstanceScript(map) { }
Definition: InstanceScript.h:142

Member Function Documentation

◆ Initialize()

void instance_blackfathom_deeps::instance_blackfathom_deeps_InstanceMapScript::Initialize ( )
inlineoverridevirtual

Reimplemented from InstanceScript.

37 {
39 memset(&_encounters, 0, sizeof(_encounters));
41 }
#define DataHeader
Definition: blackrock_depths.h:23
void SetHeaders(std::string const &dataHeaders)
Definition: InstanceScript.cpp:138
uint8 _requiredDeaths
Definition: instance_blackfathom_deeps.cpp:143
uint32 _encounters[MAX_ENCOUNTERS]
Definition: instance_blackfathom_deeps.cpp:141

References _encounters, _requiredDeaths, DataHeader, and InstanceScript::SetHeaders().

◆ IsFireEventDone()

bool instance_blackfathom_deeps::instance_blackfathom_deeps_InstanceMapScript::IsFireEventDone ( )
inline
136 {
138 }
@ DONE
Definition: InstanceScript.h:60
@ TYPE_FIRE4
Definition: blackfathom_deeps.h:29
@ TYPE_FIRE2
Definition: blackfathom_deeps.h:27
@ TYPE_FIRE3
Definition: blackfathom_deeps.h:28
@ TYPE_FIRE1
Definition: blackfathom_deeps.h:26

References _encounters, DONE, TYPE_FIRE1, TYPE_FIRE2, TYPE_FIRE3, and TYPE_FIRE4.

Referenced by OnGameObjectCreate(), and OnUnitDeath().

◆ OnCreatureCreate()

void instance_blackfathom_deeps::instance_blackfathom_deeps_InstanceMapScript::OnCreatureCreate ( Creature creature)
inlineoverridevirtual

Reimplemented from InstanceScript.

44 {
45 if (creature->IsSummon() && (creature->GetEntry() == NPC_BARBED_CRUSTACEAN || creature->GetEntry() == NPC_AKU_MAI_SERVANT ||
46 creature->GetEntry() == NPC_MURKSHALLOW_SOFTSHELL || creature->GetEntry() == NPC_AKU_MAI_SNAPJAW))
48 }
@ NPC_BARBED_CRUSTACEAN
Definition: blackfathom_deeps.h:40
@ NPC_AKU_MAI_SERVANT
Definition: blackfathom_deeps.h:39
@ NPC_MURKSHALLOW_SOFTSHELL
Definition: blackfathom_deeps.h:38
@ NPC_AKU_MAI_SNAPJAW
Definition: blackfathom_deeps.h:37
uint32 GetEntry() const
Definition: Object.h:112
bool IsSummon() const
Definition: Unit.h:707

References _requiredDeaths, Object::GetEntry(), Unit::IsSummon(), NPC_AKU_MAI_SERVANT, NPC_AKU_MAI_SNAPJAW, NPC_BARBED_CRUSTACEAN, and NPC_MURKSHALLOW_SOFTSHELL.

◆ OnGameObjectCreate()

void instance_blackfathom_deeps::instance_blackfathom_deeps_InstanceMapScript::OnGameObjectCreate ( GameObject gameobject)
inlineoverridevirtual

Reimplemented from InstanceScript.

67 {
68 switch (gameobject->GetEntry())
69 {
75 {
77 gameobject->SetGoState(GO_STATE_ACTIVE);
78 }
79 break;
83 break;
87 break;
88 case GO_AKU_MAI_DOOR:
90 HandleGameObject(ObjectGuid::Empty, true, gameobject);
91 _akumaiPortalGUID = gameobject->GetGUID();
92 break;
93 }
94 }
@ GO_STATE_ACTIVE
Definition: GameObjectData.h:690
@ GO_FIRE_OF_AKU_MAI_3
Definition: blackfathom_deeps.h:48
@ GO_FIRE_OF_AKU_MAI_4
Definition: blackfathom_deeps.h:49
@ GO_ALTAR_OF_THE_DEEPS
Definition: blackfathom_deeps.h:51
@ GO_FIRE_OF_AKU_MAI_1
Definition: blackfathom_deeps.h:46
@ GO_AKU_MAI_DOOR
Definition: blackfathom_deeps.h:50
@ GO_FIRE_OF_AKU_MAI_2
Definition: blackfathom_deeps.h:47
@ GO_SHRINE_OF_GELIHAST
Definition: blackfathom_deeps.h:45
@ TYPE_AKU_MAI
Definition: blackfathom_deeps.h:31
@ TYPE_GELIHAST
Definition: blackfathom_deeps.h:25
@ TYPE_AKU_MAI_EVENT
Definition: blackfathom_deeps.h:30
@ GO_FLAG_NOT_SELECTABLE
Definition: SharedDefines.h:1607
@ GO_FLAG_IN_USE
Definition: SharedDefines.h:1603
void SetGoState(GOState state)
Definition: GameObject.cpp:2477
void SetGameObjectFlag(GameObjectFlags flags)
Definition: GameObject.h:219
void RemoveGameObjectFlag(GameObjectFlags flags)
Definition: GameObject.h:220
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:109
static ObjectGuid const Empty
Definition: ObjectGuid.h:120
void HandleGameObject(ObjectGuid guid, bool open, GameObject *go=nullptr)
Definition: InstanceScript.cpp:110
ObjectGuid _akumaiPortalGUID
Definition: instance_blackfathom_deeps.cpp:142
bool IsFireEventDone()
Definition: instance_blackfathom_deeps.cpp:135

References _akumaiPortalGUID, _encounters, DONE, ObjectGuid::Empty, Object::GetEntry(), Object::GetGUID(), GO_AKU_MAI_DOOR, GO_ALTAR_OF_THE_DEEPS, GO_FIRE_OF_AKU_MAI_1, GO_FIRE_OF_AKU_MAI_2, GO_FIRE_OF_AKU_MAI_3, GO_FIRE_OF_AKU_MAI_4, GO_FLAG_IN_USE, GO_FLAG_NOT_SELECTABLE, GO_SHRINE_OF_GELIHAST, GO_STATE_ACTIVE, InstanceScript::HandleGameObject(), IsFireEventDone(), GameObject::RemoveGameObjectFlag(), GameObject::SetGameObjectFlag(), GameObject::SetGoState(), TYPE_AKU_MAI, TYPE_AKU_MAI_EVENT, and TYPE_GELIHAST.

◆ OnUnitDeath()

void instance_blackfathom_deeps::instance_blackfathom_deeps_InstanceMapScript::OnUnitDeath ( Unit unit)
inlineoverridevirtual

◆ ReadSaveDataMore()

void instance_blackfathom_deeps::instance_blackfathom_deeps_InstanceMapScript::ReadSaveDataMore ( std::istringstream &  data)
inlineoverridevirtual

Reimplemented from InstanceScript.

116 {
117 data >> _encounters[0];
118 data >> _encounters[1];
119 data >> _encounters[2];
120 data >> _encounters[3];
121 data >> _encounters[4];
122 data >> _encounters[5];
123 }

References _encounters.

◆ SetData()

void instance_blackfathom_deeps::instance_blackfathom_deeps_InstanceMapScript::SetData ( uint32  type,
uint32  data 
)
inlineoverridevirtual

Reimplemented from ZoneScript.

97 {
98 switch (type)
99 {
100 case TYPE_GELIHAST:
101 case TYPE_FIRE1:
102 case TYPE_FIRE2:
103 case TYPE_FIRE3:
104 case TYPE_FIRE4:
105 case TYPE_AKU_MAI:
107 _encounters[type] = data;
108 break;
109 }
110
111 if (data == DONE)
112 SaveToDB();
113 }
void SaveToDB()
Definition: InstanceScript.cpp:41

References _encounters, DONE, InstanceScript::SaveToDB(), TYPE_AKU_MAI, TYPE_AKU_MAI_EVENT, TYPE_FIRE1, TYPE_FIRE2, TYPE_FIRE3, TYPE_FIRE4, and TYPE_GELIHAST.

◆ WriteSaveDataMore()

void instance_blackfathom_deeps::instance_blackfathom_deeps_InstanceMapScript::WriteSaveDataMore ( std::ostringstream &  data)
inlineoverridevirtual

Reimplemented from InstanceScript.

126 {
127 data << _encounters[0] << ' '
128 << _encounters[1] << ' '
129 << _encounters[2] << ' '
130 << _encounters[3] << ' '
131 << _encounters[4] << ' '
132 << _encounters[5];
133 }

References _encounters.

Member Data Documentation

◆ _akumaiPortalGUID

ObjectGuid instance_blackfathom_deeps::instance_blackfathom_deeps_InstanceMapScript::_akumaiPortalGUID
private

Referenced by OnGameObjectCreate(), and OnUnitDeath().

◆ _encounters

uint32 instance_blackfathom_deeps::instance_blackfathom_deeps_InstanceMapScript::_encounters[MAX_ENCOUNTERS]
private

◆ _requiredDeaths

uint8 instance_blackfathom_deeps::instance_blackfathom_deeps_InstanceMapScript::_requiredDeaths
private