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

Public Member Functions

 instance_ahnkahet_InstanceScript (Map *pMap)
 
void OnGameObjectCreate (GameObject *go) override
 
void SetData (uint32 type, uint32) 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 Member Functions

bool IsAllSpheresActivated () const
 

Private Attributes

ObjectGuid taldaramPlatform_GUID
 

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

instance_ahnkahet::instance_ahnkahet_InstanceScript::instance_ahnkahet_InstanceScript ( Map pMap)
inline
48 : InstanceScript(pMap)
49 {
55 }
@ MAX_PERSISTENT_DATA
Definition: ahnkahet.h:76
ObjectData const creatureData[]
Definition: instance_ahnkahet.cpp:25
DoorData const doorData[]
Definition: instance_ahnkahet.cpp:35
#define MAX_ENCOUNTER
Definition: violet_hold.h:21
#define DataHeader
Definition: blackrock_depths.h:23
Definition: InstanceScript.h:142
void SetBossNumber(uint32 number)
Definition: InstanceScript.h:285
void SetPersistentDataCount(uint32 number)
Definition: InstanceScript.h:286
void LoadDoorData(DoorData const *data)
Definition: InstanceScript.cpp:161
void SetHeaders(std::string const &dataHeaders)
Definition: InstanceScript.cpp:138
void LoadObjectData(ObjectData const *creatureData, ObjectData const *gameObjectData)
Definition: InstanceScript.cpp:173

References creatureData, DataHeader, doorData, InstanceScript::LoadDoorData(), InstanceScript::LoadObjectData(), MAX_ENCOUNTER, MAX_PERSISTENT_DATA, InstanceScript::SetBossNumber(), InstanceScript::SetHeaders(), and InstanceScript::SetPersistentDataCount().

Member Function Documentation

◆ IsAllSpheresActivated()

bool instance_ahnkahet::instance_ahnkahet_InstanceScript::IsAllSpheresActivated ( ) const
inlineprivate
117 {
120 }
@ DONE
Definition: InstanceScript.h:60
@ DATA_TELDRAM_SPHERE1
Definition: ahnkahet.h:74
@ DATA_TELDRAM_SPHERE2
Definition: ahnkahet.h:75
@ DATA_PRINCE_TALDARAM
Definition: ahnkahet.h:28
uint32 GetPersistentData(uint32 index) const
Definition: InstanceScript.h:240
EncounterState GetBossState(uint32 id) const
Definition: InstanceScript.h:235

References DATA_PRINCE_TALDARAM, DATA_TELDRAM_SPHERE1, DATA_TELDRAM_SPHERE2, DONE, InstanceScript::GetBossState(), and InstanceScript::GetPersistentData().

Referenced by OnGameObjectCreate(), and SetData().

◆ OnGameObjectCreate()

void instance_ahnkahet::instance_ahnkahet_InstanceScript::OnGameObjectCreate ( GameObject go)
inlineoverridevirtual

Reimplemented from InstanceScript.

58 {
59 switch (go->GetEntry())
60 {
62 {
65 break;
66 }
69 {
71 {
74 }
75 else
76 {
78 }
79
80 break;
81 }
82 }
83
85 }
@ GO_STATE_ACTIVE
Definition: GameObjectData.h:690
@ GO_TELDARAM_SPHERE1
Definition: ahnkahet.h:57
@ GO_TELDARAM_SPHERE2
Definition: ahnkahet.h:58
@ GO_TELDARAM_PLATFORM
Definition: ahnkahet.h:59
@ GO_FLAG_NOT_SELECTABLE
Definition: SharedDefines.h:1607
void SetGoState(GOState state)
Definition: GameObject.cpp:2477
void SetGameObjectFlag(GameObjectFlags flags)
Definition: GameObject.h:219
void RemoveGameObjectFlag(GameObjectFlags flags)
Definition: GameObject.h:220
uint32 GetEntry() const
Definition: Object.h:112
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
void OnGameObjectCreate(GameObject *go) override
Definition: InstanceScript.cpp:70
bool IsAllSpheresActivated() const
Definition: instance_ahnkahet.cpp:116
ObjectGuid taldaramPlatform_GUID
Definition: instance_ahnkahet.cpp:114

References DATA_PRINCE_TALDARAM, DONE, ObjectGuid::Empty, InstanceScript::GetBossState(), Object::GetEntry(), Object::GetGUID(), InstanceScript::GetPersistentData(), GO_FLAG_NOT_SELECTABLE, GO_STATE_ACTIVE, GO_TELDARAM_PLATFORM, GO_TELDARAM_SPHERE1, GO_TELDARAM_SPHERE2, InstanceScript::HandleGameObject(), IsAllSpheresActivated(), InstanceScript::OnGameObjectCreate(), GameObject::RemoveGameObjectFlag(), GameObject::SetGameObjectFlag(), GameObject::SetGoState(), and taldaramPlatform_GUID.

◆ SetData()

void instance_ahnkahet::instance_ahnkahet_InstanceScript::SetData ( uint32  type,
uint32   
)
inlineoverridevirtual

Reimplemented from ZoneScript.

88 {
89 uint8 index = type == DATA_TELDRAM_SPHERE1 ? 0 : 1;
90
91 if ((type == DATA_TELDRAM_SPHERE1 || type == DATA_TELDRAM_SPHERE2) && GetPersistentData(index) != DONE)
92 {
94 SaveToDB();
95
97 {
98 if (taldaram->IsAlive())
99 {
100 taldaram->AI()->Talk(SAY_SPHERE_ACTIVATED);
101
103 {
105 taldaram->AI()->DoAction(ACTION_REMOVE_PRISON);
106 }
107 }
108 }
109 }
110 }
std::uint8_t uint8
Definition: Define.h:109
@ ACTION_REMOVE_PRISON
Definition: ahnkahet.h:64
@ SAY_SPHERE_ACTIVATED
Definition: ahnkahet.h:69
Definition: Creature.h:46
Creature * GetCreature(uint32 type)
Definition: InstanceScript.cpp:100
void StorePersistentData(uint32 index, uint32 data)
Definition: InstanceScript.cpp:388
void SaveToDB()
Definition: InstanceScript.cpp:41

References ACTION_REMOVE_PRISON, DATA_PRINCE_TALDARAM, DATA_TELDRAM_SPHERE1, DATA_TELDRAM_SPHERE2, DONE, InstanceScript::GetCreature(), InstanceScript::GetPersistentData(), InstanceScript::HandleGameObject(), IsAllSpheresActivated(), InstanceScript::SaveToDB(), SAY_SPHERE_ACTIVATED, InstanceScript::StorePersistentData(), and taldaramPlatform_GUID.

Member Data Documentation

◆ taldaramPlatform_GUID

ObjectGuid instance_ahnkahet::instance_ahnkahet_InstanceScript::taldaramPlatform_GUID
private

Referenced by OnGameObjectCreate(), and SetData().