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

Public Member Functions

 instance_onyxias_lair_InstanceMapScript (Map *pMap)
 
void Initialize () override
 
void OnGameObjectCreate (GameObject *go) override
 
bool SetBossState (uint32 type, EncounterState state) override
 
void SetData (uint32 uiType, uint32) override
 
bool CheckAchievementCriteriaMeet (uint32 criteria_id, Player const *, Unit const *, 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)
 

Public Attributes

std::string str_data
 
uint16 ManyWhelpsCounter
 
bool bDeepBreath
 
- Public Attributes inherited from InstanceScript
Mapinstance
 
TaskScheduler scheduler
 

Additional Inherited Members

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

instance_onyxias_lair::instance_onyxias_lair_InstanceMapScript::instance_onyxias_lair_InstanceMapScript ( Map pMap)
inline
40: InstanceScript(pMap) {Initialize();};
Definition: InstanceScript.h:142
void Initialize() override
Definition: instance_onyxias_lair.cpp:46

References Initialize().

Member Function Documentation

◆ CheckAchievementCriteriaMeet()

bool instance_onyxias_lair::instance_onyxias_lair_InstanceMapScript::CheckAchievementCriteriaMeet ( uint32  criteria_id,
Player const *  ,
Unit const *  ,
uint32   
)
inlineoverridevirtual

Reimplemented from InstanceScript.

99 {
100 switch (criteria_id)
101 {
104 return ManyWhelpsCounter >= 50;
107 return bDeepBreath;
108 }
109 return false;
110 }
@ ACHIEV_CRITERIA_MANY_WHELPS_10_PLAYER
Definition: onyxias_lair.h:50
@ ACHIEV_CRITERIA_DEEP_BREATH_25_PLAYER
Definition: onyxias_lair.h:53
@ ACHIEV_CRITERIA_DEEP_BREATH_10_PLAYER
Definition: onyxias_lair.h:52
@ ACHIEV_CRITERIA_MANY_WHELPS_25_PLAYER
Definition: onyxias_lair.h:51
bool bDeepBreath
Definition: instance_onyxias_lair.cpp:44
uint16 ManyWhelpsCounter
Definition: instance_onyxias_lair.cpp:43

References ACHIEV_CRITERIA_DEEP_BREATH_10_PLAYER, ACHIEV_CRITERIA_DEEP_BREATH_25_PLAYER, ACHIEV_CRITERIA_MANY_WHELPS_10_PLAYER, ACHIEV_CRITERIA_MANY_WHELPS_25_PLAYER, bDeepBreath, and ManyWhelpsCounter.

◆ Initialize()

void instance_onyxias_lair::instance_onyxias_lair_InstanceMapScript::Initialize ( )
inlineoverridevirtual

Reimplemented from InstanceScript.

47 {
51 bDeepBreath = true;
53 }
ObjectData const creatureData[]
Definition: instance_onyxias_lair.cpp:22
#define MAX_ENCOUNTER
Definition: violet_hold.h:21
#define DataHeader
Definition: blackrock_depths.h:23
void SetBossNumber(uint32 number)
Definition: InstanceScript.h:285
void SetHeaders(std::string const &dataHeaders)
Definition: InstanceScript.cpp:141
void LoadObjectData(ObjectData const *creatureData, ObjectData const *gameObjectData)
Definition: InstanceScript.cpp:176

References bDeepBreath, creatureData, DataHeader, InstanceScript::LoadObjectData(), ManyWhelpsCounter, MAX_ENCOUNTER, InstanceScript::SetBossNumber(), and InstanceScript::SetHeaders().

Referenced by instance_onyxias_lair_InstanceMapScript().

◆ OnGameObjectCreate()

void instance_onyxias_lair::instance_onyxias_lair_InstanceMapScript::OnGameObjectCreate ( GameObject go)
inlineoverridevirtual

Reimplemented from InstanceScript.

56 {
57 switch (go->GetEntry())
58 {
60 go->CastSpell((Unit*)nullptr, 17646);
61 if (Creature* onyxia = GetCreature(DATA_ONYXIA))
62 {
63 onyxia->AI()->DoAction(-1);
64 }
65 break;
66 }
67 }
@ GO_WHELP_SPAWNER
Definition: onyxias_lair.h:44
@ DATA_ONYXIA
Definition: onyxias_lair.h:29
Definition: Creature.h:43
void CastSpell(Unit *target, uint32 spell)
Definition: GameObject.cpp:2087
uint32 GetEntry() const
Definition: Object.h:115
Definition: Unit.h:630
Creature * GetCreature(uint32 type)
Definition: InstanceScript.cpp:103

References GameObject::CastSpell(), DATA_ONYXIA, InstanceScript::GetCreature(), Object::GetEntry(), and GO_WHELP_SPAWNER.

◆ SetBossState()

bool instance_onyxias_lair::instance_onyxias_lair_InstanceMapScript::SetBossState ( uint32  type,
EncounterState  state 
)
inlineoverridevirtual

Reimplemented from InstanceScript.

70 {
71 if (!InstanceScript::SetBossState(type, state))
72 {
73 return false;
74 }
75
76 if (type == DATA_ONYXIA && state == NOT_STARTED)
77 {
79 bDeepBreath = true;
80 }
81
82 return true;
83 }
@ NOT_STARTED
Definition: InstanceScript.h:57
virtual bool SetBossState(uint32 id, EncounterState state)
Definition: InstanceScript.cpp:373

References bDeepBreath, DATA_ONYXIA, ManyWhelpsCounter, NOT_STARTED, and InstanceScript::SetBossState().

◆ SetData()

void instance_onyxias_lair::instance_onyxias_lair_InstanceMapScript::SetData ( uint32  uiType,
uint32   
)
inlineoverridevirtual

Reimplemented from ZoneScript.

86 {
87 switch (uiType)
88 {
91 break;
93 bDeepBreath = false;
94 break;
95 }
96 }
@ DATA_DEEP_BREATH_FAILED
Definition: onyxias_lair.h:32
@ DATA_WHELP_SUMMONED
Definition: onyxias_lair.h:31

References bDeepBreath, DATA_DEEP_BREATH_FAILED, DATA_WHELP_SUMMONED, and ManyWhelpsCounter.

Member Data Documentation

◆ bDeepBreath

bool instance_onyxias_lair::instance_onyxias_lair_InstanceMapScript::bDeepBreath

◆ ManyWhelpsCounter

uint16 instance_onyxias_lair::instance_onyxias_lair_InstanceMapScript::ManyWhelpsCounter

◆ str_data

std::string instance_onyxias_lair::instance_onyxias_lair_InstanceMapScript::str_data