TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
instance_eye_of_eternity::instance_eye_of_eternity_InstanceMapScript Struct Reference

Public Member Functions

 instance_eye_of_eternity_InstanceMapScript (Map *map)
 
void OnPlayerEnter (Player *player) override
 
bool SetBossState (uint32 type, EncounterState state) override
 
void SpawnGameObject (uint32 entry, Position const &pos)
 
void OnGameObjectCreate (GameObject *go) override
 
void OnCreatureCreate (Creature *creature) override
 
void OnUnitDeath (Unit *unit) override
 
void ProcessEvent (WorldObject *, uint32 eventId) override
 
void VortexHandling ()
 
void PowerSparksHandling ()
 
void SetData (uint32 data, uint32) override
 
ObjectGuid GetGuidData (uint32 data) const override
 
- Public Member Functions inherited from InstanceScript
 InstanceScript (Map *map)
 
virtual ~InstanceScript ()
 
virtual void Initialize ()
 
virtual void Load (char const *data)
 
virtual std::string GetSaveData ()
 
void SaveToDB ()
 
virtual void Update (uint32)
 
virtual bool IsEncounterInProgress () const
 
virtual void OnCreatureRemove (Creature *creature) override
 
virtual void OnGameObjectRemove (GameObject *go) override
 
ObjectGuid GetObjectGuid (uint32 type) const
 
CreatureGetCreature (uint32 type)
 
GameObjectGetGameObject (uint32 type)
 
void HandleGameObject (ObjectGuid guid, bool open, GameObject *go=nullptr)
 
void DoUseDoorOrButton (ObjectGuid guid, uint32 withRestoreTime=0, bool useAlternativeState=false)
 
void DoCloseDoorOrButton (ObjectGuid guid)
 
void DoRespawnGameObject (ObjectGuid guid, uint32 timeToDespawn=MINUTE)
 
void DoUpdateWorldState (uint32 worldstateId, uint32 worldstateValue)
 
void DoSendNotifyToInstance (char const *format,...)
 
void DoUpdateAchievementCriteria (AchievementCriteriaTypes type, uint32 miscValue1=0, uint32 miscValue2=0, Unit *unit=NULL)
 
void DoStartTimedAchievement (AchievementCriteriaTimedTypes type, uint32 entry)
 
void DoStopTimedAchievement (AchievementCriteriaTimedTypes type, uint32 entry)
 
void DoRemoveAurasDueToSpellOnPlayers (uint32 spell)
 
void DoCastSpellOnPlayers (uint32 spell)
 
bool ServerAllowsTwoSideGroups ()
 
EncounterState GetBossState (uint32 id) const
 
CreatureBoundary constGetBossBoundary (uint32 id) const
 
virtual bool CheckAchievementCriteriaMeet (uint32, Player const *, Unit const *=NULL, uint32=0)
 
virtual bool CheckRequiredBosses (uint32, Player const *=nullptr) const
 
void UpdateEncounterState (EncounterCreditType type, uint32 creditEntry, Unit *source)
 
void SetCompletedEncountersMask (uint32 newMask)
 
uint32 GetCompletedEncounterMask () const
 
void SendEncounterUnit (uint32 type, Unit *unit=NULL, uint8 param1=0, uint8 param2=0)
 
virtual void FillInitialWorldStates (WorldPackets::WorldState::InitWorldStates &)
 
void UpdatePhasing ()
 
uint32 GetEncounterCount () 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 SetGuidData (uint32, ObjectGuid)
 
virtual uint64 GetData64 (uint32) const
 
virtual void SetData64 (uint32, uint64)
 
virtual uint32 GetData (uint32) const
 

Private Attributes

GuidList vortexTriggers
 
GuidList portalTriggers
 
ObjectGuid malygosGUID
 
ObjectGuid irisGUID
 
ObjectGuid lastPortalGUID
 
ObjectGuid platformGUID
 
ObjectGuid exitPortalGUID
 
ObjectGuid heartOfMagicGUID
 
ObjectGuid alexstraszaBunnyGUID
 
ObjectGuid giftBoxBunnyGUID
 
Position focusingIrisPosition
 
Position exitPortalPosition
 

Additional Inherited Members

- Static Public Member Functions inherited from InstanceScript
static std::string GetBossStateName (uint8 state)
 
- Public Attributes inherited from InstanceScript
Mapinstance
 
- Protected Member Functions inherited from InstanceScript
void SetHeaders (std::string const &dataHeaders)
 
void SetBossNumber (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)
 
void AddObject (GameObject *obj, bool add)
 
void AddObject (WorldObject *obj, uint32 type, bool add)
 
virtual void AddDoor (GameObject *door, bool add)
 
void AddMinion (Creature *minion, bool add)
 
virtual void UpdateDoorState (GameObject *door)
 
void UpdateMinionState (Creature *minion, EncounterState state)
 
BossInfoGetBossInfo (uint32 id)
 
bool ReadSaveDataHeaders (std::istringstream &data)
 
void ReadSaveDataBossStates (std::istringstream &data)
 
virtual void ReadSaveDataMore (std::istringstream &)
 
void WriteSaveDataHeaders (std::ostringstream &data)
 
void WriteSaveDataBossStates (std::ostringstream &data)
 
virtual void WriteSaveDataMore (std::ostringstream &)
 
bool _SkipCheckRequiredBosses (Player const *player=nullptr) const
 

Constructor & Destructor Documentation

instance_eye_of_eternity::instance_eye_of_eternity_InstanceMapScript::instance_eye_of_eternity_InstanceMapScript ( Map map)
inline
41  : InstanceScript(map)
42  {
46  }
void SetBossNumber(uint32 number)
Definition: InstanceScript.h:258
void SetHeaders(std::string const &dataHeaders)
Definition: InstanceScript.cpp:98
#define DataHeader
Definition: baradin_hold.h:25
BossBoundaryData const boundaries
Definition: instance_eye_of_eternity.cpp:24
InstanceScript(Map *map)
Definition: InstanceScript.h:144
#define MAX_ENCOUNTER
Definition: instance_blackrock_depths.cpp:25
void LoadBossBoundaries(BossBoundaryData const &data)
Definition: InstanceScript.cpp:105

+ Here is the call graph for this function:

Member Function Documentation

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

Reimplemented from InstanceScript.

250  {
251  switch (data)
252  {
253  case DATA_TRIGGER:
254  return vortexTriggers.front();
255  case DATA_MALYGOS:
256  return malygosGUID;
257  case DATA_PLATFORM:
258  return platformGUID;
260  return alexstraszaBunnyGUID;
262  return heartOfMagicGUID;
264  return irisGUID;
266  return giftBoxBunnyGUID;
267  }
268 
269  return ObjectGuid::Empty;
270  }
Definition: eye_of_eternity.h:41
static ObjectGuid const Empty
Definition: ObjectGuid.h:196
ObjectGuid giftBoxBunnyGUID
Definition: instance_eye_of_eternity.cpp:282
ObjectGuid irisGUID
Definition: instance_eye_of_eternity.cpp:276
ObjectGuid heartOfMagicGUID
Definition: instance_eye_of_eternity.cpp:280
Definition: eye_of_eternity.h:40
ObjectGuid malygosGUID
Definition: instance_eye_of_eternity.cpp:275
Definition: eye_of_eternity.h:38
Definition: eye_of_eternity.h:39
Definition: eye_of_eternity.h:35
Definition: eye_of_eternity.h:36
ObjectGuid alexstraszaBunnyGUID
Definition: instance_eye_of_eternity.cpp:281
ObjectGuid platformGUID
Definition: instance_eye_of_eternity.cpp:278
Definition: eye_of_eternity.h:37
GuidList vortexTriggers
Definition: instance_eye_of_eternity.cpp:273
void instance_eye_of_eternity::instance_eye_of_eternity_InstanceMapScript::OnCreatureCreate ( Creature creature)
inlineoverridevirtual

Reimplemented from InstanceScript.

125  {
126  switch (creature->GetEntry())
127  {
128  case NPC_VORTEX_TRIGGER:
129  vortexTriggers.push_back(creature->GetGUID());
130  break;
131  case NPC_MALYGOS:
132  malygosGUID = creature->GetGUID();
133  break;
134  case NPC_PORTAL_TRIGGER:
135  portalTriggers.push_back(creature->GetGUID());
136  break;
138  alexstraszaBunnyGUID = creature->GetGUID();
139  break;
141  giftBoxBunnyGUID = creature->GetGUID();
142  break;
143  }
144  }
ObjectGuid giftBoxBunnyGUID
Definition: instance_eye_of_eternity.cpp:282
GuidList portalTriggers
Definition: instance_eye_of_eternity.cpp:274
Definition: eye_of_eternity.h:46
Definition: eye_of_eternity.h:56
Definition: eye_of_eternity.h:55
ObjectGuid malygosGUID
Definition: instance_eye_of_eternity.cpp:275
Definition: eye_of_eternity.h:48
ObjectGuid const & GetGUID() const
Definition: Object.h:105
uint32 GetEntry() const
Definition: Object.h:107
ObjectGuid alexstraszaBunnyGUID
Definition: instance_eye_of_eternity.cpp:281
Definition: eye_of_eternity.h:47
GuidList vortexTriggers
Definition: instance_eye_of_eternity.cpp:273

+ Here is the call graph for this function:

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

Reimplemented from InstanceScript.

100  {
101  switch (go->GetEntry())
102  {
104  platformGUID = go->GetGUID();
105  break;
106  case GO_FOCUSING_IRIS_10:
107  case GO_FOCUSING_IRIS_25:
108  irisGUID = go->GetGUID();
110  break;
111  case GO_EXIT_PORTAL:
112  exitPortalGUID = go->GetGUID();
114  break;
117  heartOfMagicGUID = go->GetGUID();
118  break;
119  default:
120  break;
121  }
122  }
Definition: eye_of_eternity.h:62
Definition: eye_of_eternity.h:64
Definition: eye_of_eternity.h:65
Position exitPortalPosition
Definition: instance_eye_of_eternity.cpp:284
ObjectGuid irisGUID
Definition: instance_eye_of_eternity.cpp:276
Position focusingIrisPosition
Definition: instance_eye_of_eternity.cpp:283
Definition: eye_of_eternity.h:69
ObjectGuid heartOfMagicGUID
Definition: instance_eye_of_eternity.cpp:280
Definition: eye_of_eternity.h:68
void GetPosition(float &x, float &y) const
Definition: Position.h:109
Definition: eye_of_eternity.h:63
ObjectGuid const & GetGUID() const
Definition: Object.h:105
uint32 GetEntry() const
Definition: Object.h:107
ObjectGuid exitPortalGUID
Definition: instance_eye_of_eternity.cpp:279
ObjectGuid platformGUID
Definition: instance_eye_of_eternity.cpp:278

+ Here is the call graph for this function:

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

Reimplemented from InstanceScript.

49  {
51  player->CastSpell(player, SPELL_SUMMOM_RED_DRAGON_BUDDY, true);
52  }
Definition: inflate.h:49
Definition: eye_of_eternity.h:25
Definition: eye_of_eternity.h:84
EncounterState GetBossState(uint32 id) const
Definition: InstanceScript.h:227

+ Here is the call graph for this function:

void instance_eye_of_eternity::instance_eye_of_eternity_InstanceMapScript::OnUnitDeath ( Unit unit)
inlineoverridevirtual

Reimplemented from ZoneScript.

147  {
148  if (unit->GetTypeId() != TYPEID_PLAYER)
149  return;
150 
151  // Player continues to be moving after death no matter if spline will be cleared along with all movements,
152  // so on next world tick was all about delay if box will pop or not (when new movement will be registered)
153  // since in EoE you never stop falling. However root at this precise* moment works,
154  // it will get cleared on release. If by any chance some lag happen "Reload()" and "RepopMe()" works,
155  // last test I made now gave me 50/0 of this bug so I can't do more about it.
156  unit->SetControlled(true, UNIT_STATE_ROOT);
157  }
TypeID GetTypeId() const
Definition: Object.h:113
void SetControlled(bool apply, UnitState state)
Definition: Unit.cpp:13808
Definition: ObjectGuid.h:33
Definition: Unit.h:560

+ Here is the call graph for this function:

void instance_eye_of_eternity::instance_eye_of_eternity_InstanceMapScript::PowerSparksHandling ( )
inline
213  {
214  bool next = (lastPortalGUID == portalTriggers.back() || !lastPortalGUID ? true : false);
215 
216  for (GuidList::const_iterator itr_trigger = portalTriggers.begin(); itr_trigger != portalTriggers.end(); ++itr_trigger)
217  {
218  if (next)
219  {
220  if (Creature* trigger = instance->GetCreature(*itr_trigger))
221  {
222  lastPortalGUID = trigger->GetGUID();
223  trigger->CastSpell(trigger, SPELL_PORTAL_OPENED, true);
224  return;
225  }
226  }
227 
228  if (*itr_trigger == lastPortalGUID)
229  next = true;
230  }
231  }
Definition: eye_of_eternity.h:81
ObjectGuid lastPortalGUID
Definition: instance_eye_of_eternity.cpp:277
GuidList portalTriggers
Definition: instance_eye_of_eternity.cpp:274
int next(int i, int n)
Definition: RecastContour.cpp:469
Definition: Creature.h:467
Map * instance
Definition: InstanceScript.h:148
Creature * GetCreature(ObjectGuid const &guid)
Definition: Map.cpp:3535

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Reimplemented from ZoneScript.

160  {
161  if (eventId == EVENT_FOCUSING_IRIS)
162  {
163  if (Creature* alexstraszaBunny = instance->GetCreature(alexstraszaBunnyGUID))
164  alexstraszaBunny->CastSpell(alexstraszaBunny, SPELL_IRIS_OPENED);
165 
167  iris->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_IN_USE);
168 
169  if (Creature* malygos = instance->GetCreature(malygosGUID))
170  malygos->AI()->DoAction(0); // ACTION_LAND_ENCOUNTER_START
171 
172  if (GameObject* exitPortal = instance->GetGameObject(exitPortalGUID))
173  exitPortal->Delete();
174  }
175  }
Definition: eye_of_eternity.h:83
ObjectGuid irisGUID
Definition: instance_eye_of_eternity.cpp:276
Definition: Creature.h:467
Definition: SharedDefines.h:2121
ObjectGuid malygosGUID
Definition: instance_eye_of_eternity.cpp:275
Map * instance
Definition: InstanceScript.h:148
Definition: GameObject.h:880
Definition: UpdateFields.h:319
Creature * GetCreature(ObjectGuid const &guid)
Definition: Map.cpp:3535
GameObject * GetGameObject(ObjectGuid const &guid)
Definition: Map.cpp:3545
ObjectGuid alexstraszaBunnyGUID
Definition: instance_eye_of_eternity.cpp:281
ObjectGuid exitPortalGUID
Definition: instance_eye_of_eternity.cpp:279
Definition: eye_of_eternity.h:74

+ Here is the call graph for this function:

bool instance_eye_of_eternity::instance_eye_of_eternity_InstanceMapScript::SetBossState ( uint32  type,
EncounterState  state 
)
inlineoverridevirtual

Reimplemented from InstanceScript.

55  {
56  if (!InstanceScript::SetBossState(type, state))
57  return false;
58 
59  if (type == DATA_MALYGOS_EVENT)
60  {
61  if (state == FAIL)
62  {
63  for (GuidList::const_iterator itr_trigger = portalTriggers.begin(); itr_trigger != portalTriggers.end(); ++itr_trigger)
64  {
65  if (Creature* trigger = instance->GetCreature(*itr_trigger))
66  {
67  // just in case
68  trigger->RemoveAllAuras();
69  trigger->AI()->Reset();
70  }
71  }
72 
74 
76  platform->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_DESTROYED);
77  }
78  else if (state == DONE)
80  }
81  return true;
82  }
void SpawnGameObject(uint32 entry, Position const &pos)
Definition: instance_eye_of_eternity.cpp:86
GuidList portalTriggers
Definition: instance_eye_of_eternity.cpp:274
Position exitPortalPosition
Definition: instance_eye_of_eternity.cpp:284
Definition: inflate.h:49
Definition: eye_of_eternity.h:25
Definition: Creature.h:467
Definition: InstanceScript.h:60
Definition: SharedDefines.h:2129
Map * instance
Definition: InstanceScript.h:148
Definition: GameObject.h:880
Definition: eye_of_eternity.h:63
virtual bool SetBossState(uint32 id, EncounterState state)
Definition: InstanceScript.cpp:273
Definition: UpdateFields.h:319
Creature * GetCreature(ObjectGuid const &guid)
Definition: Map.cpp:3535
GameObject * GetGameObject(ObjectGuid const &guid)
Definition: Map.cpp:3545
ObjectGuid platformGUID
Definition: instance_eye_of_eternity.cpp:278

+ Here is the call graph for this function:

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

Reimplemented from ZoneScript.

234  {
235  switch (data)
236  {
238  VortexHandling();
239  break;
242  break;
243  case DATA_RESPAWN_IRIS:
245  break;
246  }
247  }
Definition: eye_of_eternity.h:64
Definition: DBCEnums.h:407
void SpawnGameObject(uint32 entry, Position const &pos)
Definition: instance_eye_of_eternity.cpp:86
Definition: eye_of_eternity.h:65
Difficulty GetDifficultyID() const
Definition: Map.h:390
Position focusingIrisPosition
Definition: instance_eye_of_eternity.cpp:283
Definition: eye_of_eternity.h:30
void VortexHandling()
Definition: instance_eye_of_eternity.cpp:177
Map * instance
Definition: InstanceScript.h:148
Definition: eye_of_eternity.h:29
Definition: eye_of_eternity.h:28
void PowerSparksHandling()
Definition: instance_eye_of_eternity.cpp:212

+ Here is the call graph for this function:

void instance_eye_of_eternity::instance_eye_of_eternity_InstanceMapScript::SpawnGameObject ( uint32  entry,
Position const pos 
)
inline
Todo:
this should be handled in map, maybe add a summon function in map
87  {
88  GameObject* go = new GameObject();
90  PHASEMASK_NORMAL, pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), pos.GetOrientation(),
91  0, 0, 0, 0, 120, GO_STATE_READY))
92  {
93  delete go;
94  return;
95  }
96  instance->AddToMap(go);
97  }
Definition: Object.h:66
bool AddToMap(T *)
Definition: Map.cpp:566
Map * instance
Definition: InstanceScript.h:148
Definition: GameObject.h:880
Definition: GameObject.h:823
bool Create(ObjectGuid::LowType guidlow, uint32 name_id, Map *map, uint32 phaseMask, float x, float y, float z, float ang, float rotation0, float rotation1, float rotation2, float rotation3, uint32 animprogress, GOState go_state, uint32 artKit=0)
Definition: GameObject.cpp:173
ObjectGuid::LowType GenerateLowGuid()
Definition: Map.h:561

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void instance_eye_of_eternity::instance_eye_of_eternity_InstanceMapScript::VortexHandling ( )
inline
178  {
179  if (Creature* malygos = instance->GetCreature(malygosGUID))
180  {
181  ThreatContainer::StorageType const& threatList = malygos->getThreatManager().getThreatList();
182  for (GuidList::const_iterator itr_vortex = vortexTriggers.begin(); itr_vortex != vortexTriggers.end(); ++itr_vortex)
183  {
184  if (threatList.empty())
185  return;
186 
187  uint8 counter = 0;
188  if (Creature* trigger = instance->GetCreature(*itr_vortex))
189  {
190  // each trigger have to cast the spell to 5 players.
191  for (ThreatContainer::StorageType::const_iterator itr = threatList.begin(); itr != threatList.end(); ++itr)
192  {
193  if (counter >= 5)
194  break;
195 
196  if (Unit* target = (*itr)->getTarget())
197  {
198  Player* player = target->ToPlayer();
199 
200  if (!player || player->IsGameMaster() || player->HasAura(SPELL_VORTEX_4))
201  continue;
202 
203  player->CastSpell(trigger, SPELL_VORTEX_4, true);
204  counter++;
205  }
206  }
207  }
208  }
209  }
210  }
Definition: Creature.h:467
ObjectGuid malygosGUID
Definition: instance_eye_of_eternity.cpp:275
Map * instance
Definition: InstanceScript.h:148
Creature * GetCreature(ObjectGuid const &guid)
Definition: Map.cpp:3535
std::list< HostileReference * > StorageType
Definition: ThreatManager.h:149
uint8_t uint8
Definition: Define.h:152
Definition: Unit.h:1305
Definition: eye_of_eternity.h:79
GuidList vortexTriggers
Definition: instance_eye_of_eternity.cpp:273

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

ObjectGuid instance_eye_of_eternity::instance_eye_of_eternity_InstanceMapScript::alexstraszaBunnyGUID
private
ObjectGuid instance_eye_of_eternity::instance_eye_of_eternity_InstanceMapScript::exitPortalGUID
private
Position instance_eye_of_eternity::instance_eye_of_eternity_InstanceMapScript::exitPortalPosition
private
Position instance_eye_of_eternity::instance_eye_of_eternity_InstanceMapScript::focusingIrisPosition
private
ObjectGuid instance_eye_of_eternity::instance_eye_of_eternity_InstanceMapScript::giftBoxBunnyGUID
private
ObjectGuid instance_eye_of_eternity::instance_eye_of_eternity_InstanceMapScript::heartOfMagicGUID
private
ObjectGuid instance_eye_of_eternity::instance_eye_of_eternity_InstanceMapScript::irisGUID
private
ObjectGuid instance_eye_of_eternity::instance_eye_of_eternity_InstanceMapScript::lastPortalGUID
private
ObjectGuid instance_eye_of_eternity::instance_eye_of_eternity_InstanceMapScript::malygosGUID
private
ObjectGuid instance_eye_of_eternity::instance_eye_of_eternity_InstanceMapScript::platformGUID
private
GuidList instance_eye_of_eternity::instance_eye_of_eternity_InstanceMapScript::portalTriggers
private
GuidList instance_eye_of_eternity::instance_eye_of_eternity_InstanceMapScript::vortexTriggers
private

The documentation for this struct was generated from the following file: