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

Public Member Functions

 instance_oculus_InstanceMapScript (Map *map)
 
void OnCreatureCreate (Creature *creature) override
 
void OnGameObjectCreate (GameObject *go) override
 
void OnGameObjectRemove (GameObject *go) override
 
void OnUnitDeath (Unit *unit) override
 
void FillInitialWorldStates (WorldPackets::WorldState::InitWorldStates &packet) override
 
void ProcessEvent (WorldObject *, uint32 eventId) override
 
bool SetBossState (uint32 type, EncounterState state) override
 
uint32 GetData (uint32 type) const override
 
ObjectGuid GetGuidData (uint32 type) const override
 
void FreeDragons ()
 
void Update (uint32 diff) override
 
void GreaterWhelps ()
 
- 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 bool IsEncounterInProgress () const
 
virtual void OnCreatureRemove (Creature *creature) override
 
ObjectGuid GetObjectGuid (uint32 type) const
 
CreatureGetCreature (uint32 type)
 
GameObjectGetGameObject (uint32 type)
 
virtual void OnPlayerEnter (Player *)
 
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)
 
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 void SetData (uint32, uint32)
 

Protected Attributes

ObjectGuid DrakosGUID
 
ObjectGuid VarosGUID
 
ObjectGuid UromGUID
 
ObjectGuid EregosGUID
 
ObjectGuid BelgaristraszGUID
 
ObjectGuid EternosGUID
 
ObjectGuid VerdisaGUID
 
uint8 CentrifugueConstructCounter
 
ObjectGuid EregosCacheGUID
 
GuidList GreaterWhelpList
 
EventMap events
 

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_oculus::instance_oculus_InstanceMapScript::instance_oculus_InstanceMapScript ( Map map)
inline
41  : InstanceScript(map)
42  {
46 
48  }
uint8 CentrifugueConstructCounter
Definition: instance_oculus.cpp:326
uint32 const EncounterCount
Definition: baradin_hold.h:28
void SetBossNumber(uint32 number)
Definition: InstanceScript.h:258
DoorData const doorData[]
Definition: instance_oculus.cpp:24
void SetHeaders(std::string const &dataHeaders)
Definition: InstanceScript.cpp:98
#define DataHeader
Definition: baradin_hold.h:25
InstanceScript(Map *map)
Definition: InstanceScript.h:144
void LoadDoorData(DoorData const *data)
Definition: InstanceScript.cpp:124

+ Here is the call graph for this function:

Member Function Documentation

void instance_oculus::instance_oculus_InstanceMapScript::FillInitialWorldStates ( WorldPackets::WorldState::InitWorldStates packet)
inlineoverridevirtual

Reimplemented from InstanceScript.

157  {
159  {
162  }
163  else
164  {
167  }
168  }
uint8 CentrifugueConstructCounter
Definition: instance_oculus.cpp:326
std::list< WorldStateInfo > Worldstates
Definition: WorldStatePackets.h:47
Definition: inflate.h:49
int32_t int32
Definition: g3dmath.h:167
Definition: oculus.h:30
uint32_t uint32
Definition: g3dmath.h:168
EncounterState GetBossState(uint32 id) const
Definition: InstanceScript.h:227
Definition: oculus.h:29

+ Here is the call graph for this function:

void instance_oculus::instance_oculus_InstanceMapScript::FreeDragons ( )
inline
267  {
268  if (Creature* belgaristrasz = instance->GetCreature(BelgaristraszGUID))
269  {
270  belgaristrasz->SetWalk(true);
271  belgaristrasz->GetMotionMaster()->MovePoint(POINT_MOVE_OUT, BelgaristraszMove);
272  }
273 
274  if (Creature* eternos = instance->GetCreature(EternosGUID))
275  {
276  eternos->SetWalk(true);
277  eternos->GetMotionMaster()->MovePoint(POINT_MOVE_OUT, EternosMove);
278  }
279 
280  if (Creature* verdisa = instance->GetCreature(VerdisaGUID))
281  {
282  verdisa->SetWalk(true);
283  verdisa->GetMotionMaster()->MovePoint(POINT_MOVE_OUT, VerdisaMove);
284  }
285  }
Definition: oculus.h:105
Definition: Creature.h:467
ObjectGuid VerdisaGUID
Definition: instance_oculus.cpp:324
Map * instance
Definition: InstanceScript.h:148
Position const VerdisaMove
Definition: instance_oculus.cpp:30
Position const BelgaristraszMove
Definition: instance_oculus.cpp:31
ObjectGuid BelgaristraszGUID
Definition: instance_oculus.cpp:322
Creature * GetCreature(ObjectGuid const &guid)
Definition: Map.cpp:3535
ObjectGuid EternosGUID
Definition: instance_oculus.cpp:323
Position const EternosMove
Definition: instance_oculus.cpp:32

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

uint32 instance_oculus::instance_oculus_InstanceMapScript::GetData ( uint32  type) const
inlineoverridevirtual

Reimplemented from ZoneScript.

233  {
234  if (type == DATA_CONSTRUCTS)
235  {
237  return KILL_NO_CONSTRUCT;
238  else if (CentrifugueConstructCounter == 1)
239  return KILL_ONE_CONSTRUCT;
240  else if (CentrifugueConstructCounter > 1)
241  return KILL_MORE_CONSTRUCT;
242  }
243 
244  return KILL_NO_CONSTRUCT;
245  }
uint8 CentrifugueConstructCounter
Definition: instance_oculus.cpp:326
Definition: oculus.h:100
Definition: oculus.h:99
Definition: oculus.h:34
Definition: oculus.h:98
ObjectGuid instance_oculus::instance_oculus_InstanceMapScript::GetGuidData ( uint32  type) const
inlineoverridevirtual

Reimplemented from InstanceScript.

248  {
249  switch (type)
250  {
251  case DATA_DRAKOS:
252  return DrakosGUID;
253  case DATA_VAROS:
254  return VarosGUID;
255  case DATA_UROM:
256  return UromGUID;
257  case DATA_EREGOS:
258  return EregosGUID;
259  default:
260  break;
261  }
262 
263  return ObjectGuid::Empty;
264  }
static ObjectGuid const Empty
Definition: ObjectGuid.h:196
Definition: oculus.h:31
ObjectGuid DrakosGUID
Definition: instance_oculus.cpp:317
ObjectGuid VarosGUID
Definition: instance_oculus.cpp:318
ObjectGuid EregosGUID
Definition: instance_oculus.cpp:320
Definition: oculus.h:30
ObjectGuid UromGUID
Definition: instance_oculus.cpp:319
Definition: oculus.h:32
Definition: oculus.h:29
void instance_oculus::instance_oculus_InstanceMapScript::GreaterWhelps ( )
inline
310  {
311  for (ObjectGuid guid : GreaterWhelpList)
312  if (Creature* gwhelp = instance->GetCreature(guid))
313  gwhelp->SetPhaseMask(1, true);
314  }
Definition: Creature.h:467
Map * instance
Definition: InstanceScript.h:148
GuidList GreaterWhelpList
Definition: instance_oculus.cpp:330
Creature * GetCreature(ObjectGuid const &guid)
Definition: Map.cpp:3535
Definition: ObjectGuid.h:189

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void instance_oculus::instance_oculus_InstanceMapScript::OnCreatureCreate ( Creature creature)
inlineoverridevirtual

Reimplemented from InstanceScript.

51  {
52  switch (creature->GetEntry())
53  {
54  case NPC_DRAKOS:
55  DrakosGUID = creature->GetGUID();
56  break;
57  case NPC_VAROS:
58  VarosGUID = creature->GetGUID();
60  creature->SetPhaseMask(1, true);
61  break;
62  case NPC_UROM:
63  UromGUID = creature->GetGUID();
65  creature->SetPhaseMask(1, true);
66  break;
67  case NPC_EREGOS:
68  EregosGUID = creature->GetGUID();
69  if (GetBossState(DATA_UROM) == DONE)
70  creature->SetPhaseMask(1, true);
71  break;
73  if (creature->IsAlive())
75  break;
76  case NPC_BELGARISTRASZ:
77  BelgaristraszGUID = creature->GetGUID();
79  {
81  creature->Relocate(BelgaristraszMove);
82  }
83  break;
84  case NPC_ETERNOS:
85  EternosGUID = creature->GetGUID();
87  {
89  creature->Relocate(EternosMove);
90  }
91  break;
92  case NPC_VERDISA:
93  VerdisaGUID = creature->GetGUID();
95  {
97  creature->Relocate(VerdisaMove);
98  }
99  break;
100  case NPC_GREATER_WHELP:
101  if (GetBossState(DATA_UROM) == DONE)
102  {
103  creature->SetPhaseMask(1, true);
104  GreaterWhelpList.push_back(creature->GetGUID());
105  }
106  break;
107  default:
108  break;
109  }
110  }
uint8 CentrifugueConstructCounter
Definition: instance_oculus.cpp:326
Definition: Unit.h:735
virtual void SetPhaseMask(uint32 newPhaseMask, bool update)
Definition: Object.cpp:2795
Definition: oculus.h:39
Definition: oculus.h:41
Definition: oculus.h:49
Definition: oculus.h:45
Definition: oculus.h:31
Definition: inflate.h:49
Definition: oculus.h:42
Definition: oculus.h:52
ObjectGuid DrakosGUID
Definition: instance_oculus.cpp:317
void SetFlag(uint16 index, uint32 newFlag)
Definition: Object.cpp:1199
Definition: oculus.h:40
ObjectGuid VerdisaGUID
Definition: instance_oculus.cpp:324
ObjectGuid VarosGUID
Definition: instance_oculus.cpp:318
void Relocate(float x, float y)
Definition: Position.h:67
bool IsAlive() const
Definition: Unit.h:1692
ObjectGuid EregosGUID
Definition: instance_oculus.cpp:320
Position const VerdisaMove
Definition: instance_oculus.cpp:30
Position const BelgaristraszMove
Definition: instance_oculus.cpp:31
void DoUpdateWorldState(uint32 worldstateId, uint32 worldstateValue)
Definition: InstanceScript.cpp:473
ObjectGuid const & GetGUID() const
Definition: Object.h:105
GuidList GreaterWhelpList
Definition: instance_oculus.cpp:330
ObjectGuid BelgaristraszGUID
Definition: instance_oculus.cpp:322
Definition: oculus.h:50
Definition: UpdateFields.h:135
Definition: oculus.h:30
ObjectGuid EternosGUID
Definition: instance_oculus.cpp:323
uint32 GetEntry() const
Definition: Object.h:107
Definition: oculus.h:51
EncounterState GetBossState(uint32 id) const
Definition: InstanceScript.h:227
Position const EternosMove
Definition: instance_oculus.cpp:32
ObjectGuid UromGUID
Definition: instance_oculus.cpp:319
Definition: oculus.h:29

+ Here is the call graph for this function:

void instance_oculus::instance_oculus_InstanceMapScript::OnGameObjectCreate ( GameObject go)
inlineoverridevirtual

Reimplemented from InstanceScript.

113  {
114  switch (go->GetEntry())
115  {
116  case GO_DRAGON_CAGE_DOOR:
117  AddDoor(go, true);
118  break;
119  case GO_EREGOS_CACHE_N:
120  case GO_EREGOS_CACHE_H:
121  EregosCacheGUID = go->GetGUID();
122  break;
123  default:
124  break;
125  }
126  }
Definition: oculus.h:58
Definition: oculus.h:59
ObjectGuid EregosCacheGUID
Definition: instance_oculus.cpp:328
ObjectGuid const & GetGUID() const
Definition: Object.h:105
Definition: oculus.h:57
uint32 GetEntry() const
Definition: Object.h:107
virtual void AddDoor(GameObject *door, bool add)
Definition: InstanceScript.cpp:239

+ Here is the call graph for this function:

void instance_oculus::instance_oculus_InstanceMapScript::OnGameObjectRemove ( GameObject go)
inlineoverridevirtual

Reimplemented from InstanceScript.

129  {
130  switch (go->GetEntry())
131  {
132  case GO_DRAGON_CAGE_DOOR:
133  AddDoor(go, false);
134  break;
135  default:
136  break;
137  }
138  }
Definition: oculus.h:57
uint32 GetEntry() const
Definition: Object.h:107
virtual void AddDoor(GameObject *door, bool add)
Definition: InstanceScript.cpp:239

+ Here is the call graph for this function:

void instance_oculus::instance_oculus_InstanceMapScript::OnUnitDeath ( Unit unit)
inlineoverridevirtual

Reimplemented from ZoneScript.

141  {
142  Creature* creature = unit->ToCreature();
143  if (!creature)
144  return;
145 
146  if (creature->GetEntry() == NPC_CENTRIFUGE_CONSTRUCT)
147  {
149 
151  if (Creature* varos = instance->GetCreature(VarosGUID))
152  varos->RemoveAllAuras();
153  }
154  }
uint8 CentrifugueConstructCounter
Definition: instance_oculus.cpp:326
Definition: oculus.h:45
Definition: Creature.h:467
ObjectGuid VarosGUID
Definition: instance_oculus.cpp:318
Map * instance
Definition: InstanceScript.h:148
void DoUpdateWorldState(uint32 worldstateId, uint32 worldstateValue)
Definition: InstanceScript.cpp:473
Creature * GetCreature(ObjectGuid const &guid)
Definition: Map.cpp:3535
Creature * ToCreature()
Definition: Object.h:194
uint32 GetEntry() const
Definition: Object.h:107

+ Here is the call graph for this function:

void instance_oculus::instance_oculus_InstanceMapScript::ProcessEvent ( WorldObject ,
uint32  eventId 
)
inlineoverridevirtual

Reimplemented from ZoneScript.

171  {
172  if (eventId != EVENT_CALL_DRAGON)
173  return;
174 
175  if (Creature* varos = instance->GetCreature(VarosGUID))
176  if (Creature* drake = varos->SummonCreature(NPC_AZURE_RING_GUARDIAN, varos->GetPositionX(), varos->GetPositionY(), varos->GetPositionZ() + 40))
177  drake->AI()->DoAction(ACTION_CALL_DRAGON_EVENT);
178  }
Definition: oculus.h:69
Definition: oculus.h:64
Definition: Creature.h:467
ObjectGuid VarosGUID
Definition: instance_oculus.cpp:318
Definition: oculus.h:44
Map * instance
Definition: InstanceScript.h:148
Creature * GetCreature(ObjectGuid const &guid)
Definition: Map.cpp:3535
TempSummon * SummonCreature(uint32 id, Position const &pos, TempSummonType spwtype=TEMPSUMMON_MANUAL_DESPAWN, uint32 despwtime=0, uint32 vehId=0) const
Definition: Object.cpp:2346

+ Here is the call graph for this function:

bool instance_oculus::instance_oculus_InstanceMapScript::SetBossState ( uint32  type,
EncounterState  state 
)
inlineoverridevirtual

Reimplemented from InstanceScript.

181  {
182  if (!InstanceScript::SetBossState(type, state))
183  return false;
184 
185  switch (type)
186  {
187  case DATA_DRAKOS:
188  if (state == DONE)
189  {
192  FreeDragons();
193  if (Creature* varos = instance->GetCreature(VarosGUID))
194  varos->SetPhaseMask(1, true);
196  }
197  break;
198  case DATA_VAROS:
199  if (state == DONE)
200  {
202  if (Creature* urom = instance->GetCreature(UromGUID))
203  urom->SetPhaseMask(1, true);
204  }
205  break;
206  case DATA_UROM:
207  if (state == DONE)
208  {
209  if (Creature* eregos = instance->GetCreature(EregosGUID))
210  {
211  eregos->SetPhaseMask(1, true);
212  GreaterWhelps();
214  }
215  }
216  break;
217  case DATA_EREGOS:
218  if (state == DONE)
219  {
221  {
222  cache->SetRespawnTime(cache->GetRespawnDelay());
223  cache->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
224  }
225  }
226  break;
227  }
228 
229  return true;
230  }
uint8 CentrifugueConstructCounter
Definition: instance_oculus.cpp:326
Definition: SharedDefines.h:2125
Definition: oculus.h:31
void FreeDragons()
Definition: instance_oculus.cpp:266
Definition: inflate.h:49
Definition: Creature.h:467
Definition: oculus.h:93
ObjectGuid VarosGUID
Definition: instance_oculus.cpp:318
void GreaterWhelps()
Definition: instance_oculus.cpp:309
Definition: oculus.h:92
EventMap events
Definition: instance_oculus.cpp:332
ObjectGuid EregosGUID
Definition: instance_oculus.cpp:320
Map * instance
Definition: InstanceScript.h:148
Definition: GameObject.h:880
void ScheduleEvent(uint32 eventId, Milliseconds const &time, uint32 group=0, uint8 phase=0)
Definition: EventMap.h:123
virtual bool SetBossState(uint32 id, EncounterState state)
Definition: InstanceScript.cpp:273
Definition: UpdateFields.h:319
ObjectGuid EregosCacheGUID
Definition: instance_oculus.cpp:328
void DoUpdateWorldState(uint32 worldstateId, uint32 worldstateValue)
Definition: InstanceScript.cpp:473
Creature * GetCreature(ObjectGuid const &guid)
Definition: Map.cpp:3535
Definition: oculus.h:30
GameObject * GetGameObject(ObjectGuid const &guid)
Definition: Map.cpp:3545
ObjectGuid UromGUID
Definition: instance_oculus.cpp:319
Definition: oculus.h:32
Definition: oculus.h:29

+ Here is the call graph for this function:

void instance_oculus::instance_oculus_InstanceMapScript::Update ( uint32  diff)
inlineoverridevirtual

Reimplemented from InstanceScript.

288  {
289  events.Update(diff);
290 
291  while (uint32 eventId = events.ExecuteEvent())
292  {
293  switch (eventId)
294  {
295  case EVENT_VAROS_INTRO:
296  if (Creature* varos = instance->GetCreature(VarosGUID))
297  varos->AI()->Talk(SAY_VAROS_INTRO_TEXT);
298  break;
299  case EVENT_EREGOS_INTRO:
300  if (Creature* eregos = instance->GetCreature(EregosGUID))
301  eregos->AI()->Talk(SAY_EREGOS_INTRO_TEXT);
302  break;
303  default:
304  break;
305  }
306  }
307  }
Definition: Creature.h:467
Definition: oculus.h:93
ObjectGuid VarosGUID
Definition: instance_oculus.cpp:318
Definition: oculus.h:92
EventMap events
Definition: instance_oculus.cpp:332
ObjectGuid EregosGUID
Definition: instance_oculus.cpp:320
uint32_t uint32
Definition: Define.h:150
Map * instance
Definition: InstanceScript.h:148
Definition: oculus.h:87
void Update(uint32 time)
Definition: EventMap.h:54
Creature * GetCreature(ObjectGuid const &guid)
Definition: Map.cpp:3535
uint32 ExecuteEvent()
Definition: EventMap.cpp:46
Definition: oculus.h:86

+ Here is the call graph for this function:

Member Data Documentation

ObjectGuid instance_oculus::instance_oculus_InstanceMapScript::BelgaristraszGUID
protected
uint8 instance_oculus::instance_oculus_InstanceMapScript::CentrifugueConstructCounter
protected
ObjectGuid instance_oculus::instance_oculus_InstanceMapScript::DrakosGUID
protected
ObjectGuid instance_oculus::instance_oculus_InstanceMapScript::EregosCacheGUID
protected
ObjectGuid instance_oculus::instance_oculus_InstanceMapScript::EregosGUID
protected
ObjectGuid instance_oculus::instance_oculus_InstanceMapScript::EternosGUID
protected
EventMap instance_oculus::instance_oculus_InstanceMapScript::events
protected
GuidList instance_oculus::instance_oculus_InstanceMapScript::GreaterWhelpList
protected
ObjectGuid instance_oculus::instance_oculus_InstanceMapScript::UromGUID
protected
ObjectGuid instance_oculus::instance_oculus_InstanceMapScript::VarosGUID
protected
ObjectGuid instance_oculus::instance_oculus_InstanceMapScript::VerdisaGUID
protected

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