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

Public Member Functions

 instance_eye_of_eternity_InstanceMapScript (Map *pMap)
 
void Initialize () override
 
bool IsEncounterInProgress () const override
 
void OnPlayerEnter (Player *pPlayer) override
 
void OnCreatureCreate (Creature *creature) override
 
void OnGameObjectCreate (GameObject *go) override
 
void SetData (uint32 type, uint32 data) override
 
ObjectGuid GetGuidData (uint32 type) const override
 
void ProcessEvent (WorldObject *, uint32 eventId) override
 
void ReadSaveDataMore (std::istringstream &data) override
 
void WriteSaveDataMore (std::ostringstream &data) override
 
bool CheckAchievementCriteriaMeet (uint32 criteria_id, Player const *source, 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

uint32 EncounterStatus
 
std::string str_data
 
ObjectGuid NPC_MalygosGUID
 
ObjectGuid GO_IrisGUID
 
ObjectGuid GO_ExitPortalGUID
 
ObjectGuid GO_PlatformGUID
 
bool bPokeAchiev
 
- 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 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_eye_of_eternity_InstanceMapScript()

instance_eye_of_eternity::instance_eye_of_eternity_InstanceMapScript::instance_eye_of_eternity_InstanceMapScript ( Map pMap)
inline
48: InstanceScript(pMap) { Initialize(); }
Definition: InstanceScript.h:142
void Initialize() override
Definition: instance_eye_of_eternity.cpp:59

References Initialize().

Member Function Documentation

◆ CheckAchievementCriteriaMeet()

bool instance_eye_of_eternity::instance_eye_of_eternity_InstanceMapScript::CheckAchievementCriteriaMeet ( uint32  criteria_id,
Player const *  source,
Unit const *  ,
uint32   
)
inlineoverridevirtual

Reimplemented from InstanceScript.

235 {
236 switch (criteria_id)
237 {
240 return bPokeAchiev;
243 return (source && source->GetVehicle() && source->GetVehicle()->GetVehicleInfo()->m_ID == 224);
244 }
245 return false;
246 }
@ ACHIEV_CRITERIA_A_POKE_IN_THE_EYE_10
Definition: eye_of_eternity.h:87
@ ACHIEV_CRITERIA_DENYIN_THE_SCION_10
Definition: eye_of_eternity.h:85
@ ACHIEV_CRITERIA_DENYIN_THE_SCION_25
Definition: eye_of_eternity.h:86
@ ACHIEV_CRITERIA_A_POKE_IN_THE_EYE_25
Definition: eye_of_eternity.h:88
bool bPokeAchiev
Definition: instance_eye_of_eternity.cpp:57

References ACHIEV_CRITERIA_A_POKE_IN_THE_EYE_10, ACHIEV_CRITERIA_A_POKE_IN_THE_EYE_25, ACHIEV_CRITERIA_DENYIN_THE_SCION_10, ACHIEV_CRITERIA_DENYIN_THE_SCION_25, bPokeAchiev, Unit::GetVehicle(), Vehicle::GetVehicleInfo(), and VehicleEntry::m_ID.

◆ GetGuidData()

ObjectGuid instance_eye_of_eternity::instance_eye_of_eternity_InstanceMapScript::GetGuidData ( uint32  type) const
inlineoverridevirtual

Reimplemented from InstanceScript.

186 {
187 switch (type)
188 {
190 return NPC_MalygosGUID;
191 }
192
193 return ObjectGuid::Empty;
194 }
@ DATA_MALYGOS_GUID
Definition: eye_of_eternity.h:60
static ObjectGuid const Empty
Definition: ObjectGuid.h:120
ObjectGuid NPC_MalygosGUID
Definition: instance_eye_of_eternity.cpp:53

References DATA_MALYGOS_GUID, ObjectGuid::Empty, and NPC_MalygosGUID.

◆ Initialize()

void instance_eye_of_eternity::instance_eye_of_eternity_InstanceMapScript::Initialize ( )
inlineoverridevirtual

Reimplemented from InstanceScript.

60 {
62
63 bPokeAchiev = false;
64 }
@ NOT_STARTED
Definition: InstanceScript.h:57
uint32 EncounterStatus
Definition: instance_eye_of_eternity.cpp:50

References bPokeAchiev, EncounterStatus, and NOT_STARTED.

Referenced by instance_eye_of_eternity_InstanceMapScript().

◆ IsEncounterInProgress()

bool instance_eye_of_eternity::instance_eye_of_eternity_InstanceMapScript::IsEncounterInProgress ( ) const
inlineoverridevirtual

Reimplemented from InstanceScript.

67 {
69 }
@ IN_PROGRESS
Definition: InstanceScript.h:58

References EncounterStatus, and IN_PROGRESS.

◆ OnCreatureCreate()

void instance_eye_of_eternity::instance_eye_of_eternity_InstanceMapScript::OnCreatureCreate ( Creature creature)
inlineoverridevirtual

Reimplemented from InstanceScript.

99 {
100 switch (creature->GetEntry())
101 {
102 case NPC_MALYGOS:
103 NPC_MalygosGUID = creature->GetGUID();
104 break;
105 }
106 }
@ NPC_MALYGOS
Definition: eye_of_eternity.h:39
uint32 GetEntry() const
Definition: Object.h:112
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:109

References Object::GetEntry(), Object::GetGUID(), NPC_MALYGOS, and NPC_MalygosGUID.

◆ OnGameObjectCreate()

void instance_eye_of_eternity::instance_eye_of_eternity_InstanceMapScript::OnGameObjectCreate ( GameObject go)
inlineoverridevirtual

Reimplemented from InstanceScript.

109 {
110 switch (go->GetEntry())
111 {
112 case GO_IRIS_N:
113 case GO_IRIS_H:
114 GO_IrisGUID = go->GetGUID();
115 break;
116 case GO_EXIT_PORTAL:
118 break;
120 GO_PlatformGUID = go->GetGUID();
121 break;
122 }
123 }
@ GO_IRIS_N
Definition: eye_of_eternity.h:30
@ GO_IRIS_H
Definition: eye_of_eternity.h:31
@ GO_EXIT_PORTAL
Definition: eye_of_eternity.h:32
@ GO_NEXUS_PLATFORM
Definition: eye_of_eternity.h:29
ObjectGuid GO_ExitPortalGUID
Definition: instance_eye_of_eternity.cpp:55
ObjectGuid GO_PlatformGUID
Definition: instance_eye_of_eternity.cpp:56
ObjectGuid GO_IrisGUID
Definition: instance_eye_of_eternity.cpp:54

References Object::GetEntry(), Object::GetGUID(), GO_EXIT_PORTAL, GO_ExitPortalGUID, GO_IRIS_H, GO_IRIS_N, GO_IrisGUID, GO_NEXUS_PLATFORM, and GO_PlatformGUID.

◆ OnPlayerEnter()

void instance_eye_of_eternity::instance_eye_of_eternity_InstanceMapScript::OnPlayerEnter ( Player pPlayer)
inlineoverridevirtual

Reimplemented from InstanceScript.

72 {
73 if (EncounterStatus == DONE)
74 {
75 // destroy platform, hide iris (actually ensure, done at loading, but doesn't always work
76 ProcessEvent(nullptr, 20158);
78 if (go->GetPhaseMask() != 2)
79 go->SetPhaseMask(2, true);
80
81 // no floor, so put players on drakes
82 if (pPlayer)
83 {
84 if (!pPlayer->IsAlive())
85 return;
86
87 if (Creature* c = pPlayer->SummonCreature(NPC_WYRMREST_SKYTALON, pPlayer->GetPositionX(), pPlayer->GetPositionY(), pPlayer->GetPositionZ() - 20.0f, 0.0f, TEMPSUMMON_MANUAL_DESPAWN, 0))
88 {
89 c->SetCanFly(true);
90 c->SetFaction(pPlayer->GetFaction());
91 //pPlayer->CastCustomSpell(60683, SPELLVALUE_BASE_POINT0, 1, c, true);
92 c->m_Events.AddEvent(new EoEDrakeEnterVehicleEvent(*c, pPlayer->GetGUID()), c->m_Events.CalculateTime(500));
93 }
94 }
95 }
96 }
@ DONE
Definition: InstanceScript.h:60
@ TEMPSUMMON_MANUAL_DESPAWN
Definition: Object.h:52
@ NPC_WYRMREST_SKYTALON
Definition: eye_of_eternity.h:49
Definition: Creature.h:46
Definition: GameObject.h:121
TempSummon * SummonCreature(uint32 id, const Position &pos, TempSummonType spwtype=TEMPSUMMON_MANUAL_DESPAWN, uint32 despwtime=0, uint32 vehId=0, SummonPropertiesEntry const *properties=nullptr, bool visibleBySummonerOnly=false) const
Definition: Object.cpp:2355
float GetPositionZ() const
Definition: Position.h:119
float GetPositionX() const
Definition: Position.h:117
float GetPositionY() const
Definition: Position.h:118
bool IsAlive() const
Definition: Unit.h:1204
uint32 GetFaction() const
Definition: Unit.h:755
Map * instance
Definition: InstanceScript.h:148
GameObject * GetGameObject(ObjectGuid const guid)
Definition: Map.cpp:3319
Definition: eye_of_eternity.h:111
void ProcessEvent(WorldObject *, uint32 eventId) override
Definition: instance_eye_of_eternity.cpp:196

References DONE, EncounterStatus, Unit::GetFaction(), Map::GetGameObject(), Object::GetGUID(), Position::GetPositionX(), Position::GetPositionY(), Position::GetPositionZ(), GO_IrisGUID, InstanceScript::instance, Unit::IsAlive(), NPC_WYRMREST_SKYTALON, ProcessEvent(), WorldObject::SummonCreature(), and TEMPSUMMON_MANUAL_DESPAWN.

◆ ProcessEvent()

void instance_eye_of_eternity::instance_eye_of_eternity_InstanceMapScript::ProcessEvent ( WorldObject ,
uint32  eventId 
)
inlineoverridevirtual

Reimplemented from ZoneScript.

197 {
198 switch (eventId)
199 {
200 case 20158:
203 {
204 go->ModifyHealth(-6500000, c); // We have HP 6 million in the database... So we have to do at least that
205 go->EnableCollision(false);
206 }
207 break;
208 }
209 }
Creature * GetCreature(ObjectGuid const guid)
Definition: Map.cpp:3314

References Map::GetCreature(), Map::GetGameObject(), GO_PlatformGUID, InstanceScript::instance, and NPC_MalygosGUID.

Referenced by OnPlayerEnter(), and ReadSaveDataMore().

◆ ReadSaveDataMore()

void instance_eye_of_eternity::instance_eye_of_eternity_InstanceMapScript::ReadSaveDataMore ( std::istringstream &  data)
inlineoverridevirtual

Reimplemented from InstanceScript.

212 {
213 data >> EncounterStatus;
214
215 switch (EncounterStatus)
216 {
217 case IN_PROGRESS:
219 break;
220 case DONE:
221 // destroy platform, hide iris
222 ProcessEvent(nullptr, 20158);
224 go->SetPhaseMask(2, true);
225 break;
226 }
227 }

References DONE, EncounterStatus, Map::GetGameObject(), GO_IrisGUID, IN_PROGRESS, InstanceScript::instance, NOT_STARTED, and ProcessEvent().

◆ SetData()

void instance_eye_of_eternity::instance_eye_of_eternity_InstanceMapScript::SetData ( uint32  type,
uint32  data 
)
inlineoverridevirtual

Reimplemented from ZoneScript.

126 {
127 switch (type)
128 {
132 if (Player* plr = c->SelectNearestPlayer(250.0f))
133 c->AI()->AttackStart(plr);
134 break;
136 EncounterStatus = data;
137 switch (data)
138 {
139 case NOT_STARTED:
140 bPokeAchiev = false;
142 {
143 go->SetPhaseMask(1, true);
144 HandleGameObject(GO_IrisGUID, false, go);
145 }
147 go->SetPhaseMask(1, true);
149 {
150 go->SetDestructibleState(GO_DESTRUCTIBLE_REBUILDING, nullptr, true);
151 go->EnableCollision(true);
152 }
153 break;
154 case IN_PROGRESS:
156 break;
157 case DONE:
158 bPokeAchiev = false;
160 go->SetPhaseMask(1, true);
162 if (c->SummonCreature(NPC_ALEXSTRASZA, 798.0f, 1268.0f, 299.0f, 2.45f, TEMPSUMMON_TIMED_DESPAWN, 604800000))
163 break;
164 }
165 if (data == DONE)
166 SaveToDB();
167 break;
170 {
171 HandleGameObject(GO_IrisGUID, true, go);
173 c->CastSpell(c, SPELL_IRIS_ACTIVATED, true);
174 }
175 break;
178 go->SetPhaseMask(2, true);
180 go->SetPhaseMask(2, true);
181 break;
182 }
183 }
std::uint32_t uint32
Definition: Define.h:107
@ TEMPSUMMON_TIMED_DESPAWN
Definition: Object.h:47
@ NPC_WORLD_TRIGGER_LAOI
Definition: eye_of_eternity.h:41
@ NPC_ALEXSTRASZA
Definition: eye_of_eternity.h:51
@ SPELL_IRIS_ACTIVATED
Definition: eye_of_eternity.h:66
@ DATA_ENCOUNTER_STATUS
Definition: eye_of_eternity.h:57
@ DATA_SET_IRIS_INACTIVE
Definition: eye_of_eternity.h:58
@ DATA_HIDE_IRIS_AND_PORTAL
Definition: eye_of_eternity.h:59
@ DATA_IRIS_ACTIVATED
Definition: eye_of_eternity.h:56
@ GO_DESTRUCTIBLE_REBUILDING
Definition: SharedDefines.h:1630
Player * SelectNearestPlayer(float distance=0) const
Definition: Object.cpp:2473
Definition: Player.h:1064
void HandleGameObject(ObjectGuid guid, bool open, GameObject *go=nullptr)
Definition: InstanceScript.cpp:110
void SaveToDB()
Definition: InstanceScript.cpp:41
uint8 GetSpawnMode() const
Definition: Map.h:420
uint32 GetPlayersCountExceptGMs() const
Definition: Map.cpp:2745

References bPokeAchiev, DATA_ENCOUNTER_STATUS, DATA_HIDE_IRIS_AND_PORTAL, DATA_IRIS_ACTIVATED, DATA_SET_IRIS_INACTIVE, DONE, EncounterStatus, Map::GetCreature(), Map::GetGameObject(), Map::GetPlayersCountExceptGMs(), Map::GetSpawnMode(), GO_DESTRUCTIBLE_REBUILDING, GO_ExitPortalGUID, GO_IrisGUID, GO_PlatformGUID, InstanceScript::HandleGameObject(), IN_PROGRESS, InstanceScript::instance, NOT_STARTED, NPC_ALEXSTRASZA, NPC_MalygosGUID, NPC_WORLD_TRIGGER_LAOI, InstanceScript::SaveToDB(), WorldObject::SelectNearestPlayer(), SPELL_IRIS_ACTIVATED, WorldObject::SummonCreature(), and TEMPSUMMON_TIMED_DESPAWN.

◆ WriteSaveDataMore()

void instance_eye_of_eternity::instance_eye_of_eternity_InstanceMapScript::WriteSaveDataMore ( std::ostringstream &  data)
inlineoverridevirtual

Reimplemented from InstanceScript.

230 {
231 data << EncounterStatus;
232 }

References EncounterStatus.

Member Data Documentation

◆ bPokeAchiev

bool instance_eye_of_eternity::instance_eye_of_eternity_InstanceMapScript::bPokeAchiev

◆ EncounterStatus

uint32 instance_eye_of_eternity::instance_eye_of_eternity_InstanceMapScript::EncounterStatus

◆ GO_ExitPortalGUID

ObjectGuid instance_eye_of_eternity::instance_eye_of_eternity_InstanceMapScript::GO_ExitPortalGUID

Referenced by OnGameObjectCreate(), and SetData().

◆ GO_IrisGUID

ObjectGuid instance_eye_of_eternity::instance_eye_of_eternity_InstanceMapScript::GO_IrisGUID

◆ GO_PlatformGUID

ObjectGuid instance_eye_of_eternity::instance_eye_of_eternity_InstanceMapScript::GO_PlatformGUID

◆ NPC_MalygosGUID

ObjectGuid instance_eye_of_eternity::instance_eye_of_eternity_InstanceMapScript::NPC_MalygosGUID

◆ str_data

std::string instance_eye_of_eternity::instance_eye_of_eternity_InstanceMapScript::str_data