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

Public Member Functions

 instance_zulaman_InstanceScript (InstanceMap *map)
 
void FillInitialWorldStates (WorldPackets::WorldState::InitWorldStates &packet) override
 
void OnCreatureCreate (Creature *creature) override
 
void OnGameObjectCreate (GameObject *go) override
 
void OnGameObjectRemove (GameObject *go) override
 
ObjectGuid GetGuidData (uint32 type) const override
 
void SetData (uint32 type, uint32 data) override
 
uint32 GetData (uint32 type) const override
 
bool SetBossState (uint32 type, EncounterState state) override
 
void ProcessEvent (WorldObject *, uint32 eventId) override
 
void Update (uint32 diff) override
 
void WriteSaveDataMore (std::ostringstream &data) override
 
void ReadSaveDataMore (std::istringstream &data) 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 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 OnUnitDeath (Unit *)
 
virtual void SetGuidData (uint32, ObjectGuid)
 
virtual uint64 GetData64 (uint32) const
 
virtual void SetData64 (uint32, uint64)
 

Protected Attributes

EventMap events
 
ObjectGuid AkilzonGUID
 
ObjectGuid NalorakkGUID
 
ObjectGuid JanalaiGUID
 
ObjectGuid HalazziGUID
 
ObjectGuid HexLordMalacrassGUID
 
ObjectGuid DaakaraGUID
 
ObjectGuid VoljinGUID
 
ObjectGuid HexLordTriggerGUID
 
ObjectGuid StrangeGongGUID
 
ObjectGuid MasiveGateGUID
 
uint32 SpeedRunTimer
 
uint32 ZulAmanState
 
uint32 ZulAmanBossCount
 

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)
 
void WriteSaveDataHeaders (std::ostringstream &data)
 
void WriteSaveDataBossStates (std::ostringstream &data)
 
bool _SkipCheckRequiredBosses (Player const *player=nullptr) const
 

Constructor & Destructor Documentation

instance_zulaman::instance_zulaman_InstanceScript::instance_zulaman_InstanceScript ( InstanceMap map)
inline
30  : InstanceScript(map)
31  {
34 
35  SpeedRunTimer = 16;
37  ZulAmanBossCount = 0;
38  }
uint32 const EncounterCount
Definition: baradin_hold.h:28
void SetBossNumber(uint32 number)
Definition: InstanceScript.h:258
uint32 ZulAmanState
Definition: instance_zulaman.cpp:296
void SetHeaders(std::string const &dataHeaders)
Definition: InstanceScript.cpp:98
#define DataHeader
Definition: baradin_hold.h:25
uint32 ZulAmanBossCount
Definition: instance_zulaman.cpp:297
uint32 SpeedRunTimer
Definition: instance_zulaman.cpp:295
InstanceScript(Map *map)
Definition: InstanceScript.h:144
Definition: InstanceScript.h:58

+ Here is the call graph for this function:

Member Function Documentation

void instance_zulaman::instance_zulaman_InstanceScript::FillInitialWorldStates ( WorldPackets::WorldState::InitWorldStates packet)
inlineoverridevirtual

Reimplemented from InstanceScript.

41  {
44  }
std::list< WorldStateInfo > Worldstates
Definition: WorldStatePackets.h:47
uint32 ZulAmanState
Definition: instance_zulaman.cpp:296
uint32 SpeedRunTimer
Definition: instance_zulaman.cpp:295
Definition: zulaman.h:77
int32_t int32
Definition: g3dmath.h:167
uint32_t uint32
Definition: g3dmath.h:168
Definition: zulaman.h:78
uint32 instance_zulaman::instance_zulaman_InstanceScript::GetData ( uint32  type) const
inlineoverridevirtual

Reimplemented from ZoneScript.

161  {
162  switch (type)
163  {
164  case DATA_ZULAMAN_STATE:
165  return ZulAmanState;
166  default:
167  break;
168  }
169 
170  return 0;
171  }
Definition: zulaman.h:42
uint32 ZulAmanState
Definition: instance_zulaman.cpp:296
ObjectGuid instance_zulaman::instance_zulaman_InstanceScript::GetGuidData ( uint32  type) const
inlineoverridevirtual

Reimplemented from InstanceScript.

110  {
111  switch (type)
112  {
113  case DATA_AKILZON:
114  return AkilzonGUID;
115  case DATA_NALORAKK:
116  return NalorakkGUID;
117  case DATA_JANALAI:
118  return JanalaiGUID;
119  case DATA_HALAZZI:
120  return HalazziGUID;
121  case DATA_HEXLORD:
122  return HexLordMalacrassGUID;
123  case DATA_DAAKARA:
124  return DaakaraGUID;
126  return HexLordTriggerGUID;
127  case DATA_STRANGE_GONG:
128  return StrangeGongGUID;
129  case DATA_MASSIVE_GATE:
130  return MasiveGateGUID;
131  default:
132  break;
133  }
134 
135  return ObjectGuid::Empty;
136  }
ObjectGuid HexLordMalacrassGUID
Definition: instance_zulaman.cpp:289
static ObjectGuid const Empty
Definition: ObjectGuid.h:196
ObjectGuid StrangeGongGUID
Definition: instance_zulaman.cpp:293
ObjectGuid MasiveGateGUID
Definition: instance_zulaman.cpp:294
ObjectGuid NalorakkGUID
Definition: instance_zulaman.cpp:286
ObjectGuid HexLordTriggerGUID
Definition: instance_zulaman.cpp:292
Definition: zulaman.h:39
ObjectGuid JanalaiGUID
Definition: instance_zulaman.cpp:287
Definition: zulaman.h:36
Definition: zulaman.h:28
Definition: zulaman.h:31
ObjectGuid DaakaraGUID
Definition: instance_zulaman.cpp:290
Definition: zulaman.h:30
ObjectGuid HalazziGUID
Definition: instance_zulaman.cpp:288
ObjectGuid AkilzonGUID
Definition: instance_zulaman.cpp:285
Definition: zulaman.h:32
Definition: zulaman.h:38
Definition: zulaman.h:33
Definition: zulaman.h:29
void instance_zulaman::instance_zulaman_InstanceScript::OnCreatureCreate ( Creature creature)
inlineoverridevirtual

Reimplemented from InstanceScript.

47  {
48  switch (creature->GetEntry())
49  {
50  case NPC_AKILZON:
51  AkilzonGUID = creature->GetGUID();
52  break;
53  case NPC_NALORAKK:
54  NalorakkGUID = creature->GetGUID();
55  break;
56  case NPC_JANALAI:
57  JanalaiGUID = creature->GetGUID();
58  break;
59  case NPC_HALAZZI:
60  HalazziGUID = creature->GetGUID();
61  break;
62  case NPC_HEXLORD:
63  HexLordMalacrassGUID = creature->GetGUID();
64  break;
65  case NPC_DAAKARA:
66  DaakaraGUID = creature->GetGUID();
67  break;
68  case NPC_VOLJIN:
69  VoljinGUID = creature->GetGUID();
70  break;
72  HexLordTriggerGUID = creature->GetGUID();
73  break;
74  default:
75  break;
76  }
77  }
ObjectGuid HexLordMalacrassGUID
Definition: instance_zulaman.cpp:289
Definition: zulaman.h:52
Definition: zulaman.h:50
ObjectGuid NalorakkGUID
Definition: instance_zulaman.cpp:286
ObjectGuid HexLordTriggerGUID
Definition: instance_zulaman.cpp:292
Definition: zulaman.h:48
Definition: zulaman.h:54
ObjectGuid JanalaiGUID
Definition: instance_zulaman.cpp:287
Definition: zulaman.h:55
ObjectGuid DaakaraGUID
Definition: instance_zulaman.cpp:290
ObjectGuid VoljinGUID
Definition: instance_zulaman.cpp:291
ObjectGuid HalazziGUID
Definition: instance_zulaman.cpp:288
ObjectGuid const & GetGUID() const
Definition: Object.h:105
ObjectGuid AkilzonGUID
Definition: instance_zulaman.cpp:285
uint32 GetEntry() const
Definition: Object.h:107
Definition: zulaman.h:51
Definition: zulaman.h:49
Definition: zulaman.h:47

+ Here is the call graph for this function:

void instance_zulaman::instance_zulaman_InstanceScript::OnGameObjectCreate ( GameObject go)
inlineoverridevirtual

Reimplemented from InstanceScript.

80  {
81  switch (go->GetEntry())
82  {
83  case GO_STRANGE_GONG:
84  StrangeGongGUID = go->GetGUID();
85  break;
86  case GO_MASSIVE_GATE:
87  MasiveGateGUID = go->GetGUID();
88  AddDoor(go, true);
91  break;
92  default:
93  break;
94  }
95  }
ObjectGuid StrangeGongGUID
Definition: instance_zulaman.cpp:293
Definition: zulaman.h:61
ObjectGuid MasiveGateGUID
Definition: instance_zulaman.cpp:294
uint32 ZulAmanState
Definition: instance_zulaman.cpp:296
Definition: zulaman.h:60
Definition: InstanceScript.h:58
Definition: GameObject.h:822
void SetGoState(GOState state)
Definition: GameObject.cpp:2137
ObjectGuid const & GetGUID() const
Definition: Object.h:105
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_zulaman::instance_zulaman_InstanceScript::OnGameObjectRemove ( GameObject go)
inlineoverridevirtual

Reimplemented from InstanceScript.

98  {
99  switch (go->GetEntry())
100  {
101  case GO_MASSIVE_GATE:
102  AddDoor(go, false);
103  break;
104  default:
105  break;
106  }
107  }
Definition: zulaman.h:61
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_zulaman::instance_zulaman_InstanceScript::ProcessEvent ( WorldObject ,
uint32  eventId 
)
inlineoverridevirtual

Reimplemented from ZoneScript.

218  {
219  switch (eventId)
220  {
221  case EVENT_START_ZULAMAN:
222  if (Creature* voljin = instance->GetCreature(VoljinGUID))
223  {
224  if (voljin->IsAIEnabled)
225  voljin->AI()->DoAction(ACTION_START_ZULAMAN);
226  }
227  break;
228  default:
229  break;
230  }
231  }
Definition: zulaman.h:66
Definition: Creature.h:467
Definition: zulaman.h:72
Map * instance
Definition: InstanceScript.h:148
ObjectGuid VoljinGUID
Definition: instance_zulaman.cpp:291
Creature * GetCreature(ObjectGuid const &guid)
Definition: Map.cpp:3535

+ Here is the call graph for this function:

void instance_zulaman::instance_zulaman_InstanceScript::ReadSaveDataMore ( std::istringstream &  data)
inlineoverridevirtual

Reimplemented from InstanceScript.

270  {
271  data >> ZulAmanState;
272  data >> SpeedRunTimer;
273  data >> ZulAmanBossCount;
274 
275  if (ZulAmanState == IN_PROGRESS && SpeedRunTimer && SpeedRunTimer <= 15)
276  {
280  }
281  }
uint32 ZulAmanState
Definition: instance_zulaman.cpp:296
Definition: zulaman.h:67
uint32 ZulAmanBossCount
Definition: instance_zulaman.cpp:297
uint32 SpeedRunTimer
Definition: instance_zulaman.cpp:295
Definition: InstanceScript.h:59
void ScheduleEvent(uint32 eventId, Milliseconds const &time, uint32 group=0, uint8 phase=0)
Definition: EventMap.h:123
Definition: zulaman.h:77
void DoUpdateWorldState(uint32 worldstateId, uint32 worldstateValue)
Definition: InstanceScript.cpp:473
EventMap events
Definition: instance_zulaman.cpp:284
Definition: zulaman.h:78

+ Here is the call graph for this function:

bool instance_zulaman::instance_zulaman_InstanceScript::SetBossState ( uint32  type,
EncounterState  state 
)
inlineoverridevirtual

Reimplemented from InstanceScript.

174  {
175  if (!InstanceScript::SetBossState(type, state))
176  return false;
177 
178  if (state == DONE)
179  {
181  {
183 
184  if (ZulAmanBossCount < 2)
185  {
188  }
189  else if (ZulAmanBossCount == 4)
190  {
193  ZulAmanState = DONE;
194  }
195  }
196  }
197 
198  switch (type)
199  {
200  case DATA_AKILZON:
201  break;
202  case DATA_NALORAKK:
203  break;
204  case DATA_JANALAI:
205  break;
206  case DATA_HALAZZI:
207  case DATA_HEXLORD:
208  case DATA_DAAKARA:
209  break;
210  default:
211  break;
212  }
213 
214  return true;
215  }
uint32 ZulAmanState
Definition: instance_zulaman.cpp:296
Definition: inflate.h:49
void CancelEvent(uint32 eventId)
Definition: EventMap.cpp:89
Definition: zulaman.h:67
uint32 ZulAmanBossCount
Definition: instance_zulaman.cpp:297
uint32 SpeedRunTimer
Definition: instance_zulaman.cpp:295
Definition: zulaman.h:28
Definition: InstanceScript.h:59
Definition: zulaman.h:31
Definition: zulaman.h:30
virtual bool SetBossState(uint32 id, EncounterState state)
Definition: InstanceScript.cpp:273
Definition: zulaman.h:77
void DoUpdateWorldState(uint32 worldstateId, uint32 worldstateValue)
Definition: InstanceScript.cpp:473
Definition: zulaman.h:32
Definition: zulaman.h:33
EventMap events
Definition: instance_zulaman.cpp:284
Definition: zulaman.h:29
Definition: zulaman.h:78

+ Here is the call graph for this function:

void instance_zulaman::instance_zulaman_InstanceScript::SetData ( uint32  type,
uint32  data 
)
inlineoverridevirtual

Reimplemented from ZoneScript.

139  {
140  switch (type)
141  {
142  case DATA_ZULAMAN_STATE:
143  {
144  if (data == IN_PROGRESS)
145  {
149  SpeedRunTimer = 15;
150  ZulAmanState = data;
151  SaveToDB();
152  }
153  break;
154  }
155  default:
156  break;
157  }
158  }
Definition: zulaman.h:42
uint32 ZulAmanState
Definition: instance_zulaman.cpp:296
Definition: zulaman.h:67
uint32 SpeedRunTimer
Definition: instance_zulaman.cpp:295
Definition: InstanceScript.h:59
void SaveToDB()
Definition: InstanceScript.cpp:39
void ScheduleEvent(uint32 eventId, Milliseconds const &time, uint32 group=0, uint8 phase=0)
Definition: EventMap.h:123
Definition: zulaman.h:77
void DoUpdateWorldState(uint32 worldstateId, uint32 worldstateValue)
Definition: InstanceScript.cpp:473
EventMap events
Definition: instance_zulaman.cpp:284
Definition: zulaman.h:78

+ Here is the call graph for this function:

void instance_zulaman::instance_zulaman_InstanceScript::Update ( uint32  diff)
inlineoverridevirtual

Reimplemented from InstanceScript.

234  {
235  if (events.Empty())
236  return;
237 
238  events.Update(diff);
239 
240  while (uint32 eventId = events.ExecuteEvent())
241  {
242  switch (eventId)
243  {
245  SaveToDB();
247  if (SpeedRunTimer)
249  else
250  {
253  ZulAmanState = FAIL;
254  }
255  break;
256  default:
257  break;
258  }
259  }
260  }
uint32 ZulAmanState
Definition: instance_zulaman.cpp:296
void CancelEvent(uint32 eventId)
Definition: EventMap.cpp:89
Definition: InstanceScript.h:60
bool Empty() const
Definition: EventMap.h:81
Definition: zulaman.h:67
uint32 SpeedRunTimer
Definition: instance_zulaman.cpp:295
void SaveToDB()
Definition: InstanceScript.cpp:39
uint32_t uint32
Definition: Define.h:150
void ScheduleEvent(uint32 eventId, Milliseconds const &time, uint32 group=0, uint8 phase=0)
Definition: EventMap.h:123
Definition: zulaman.h:77
void Update(uint32 time)
Definition: EventMap.h:54
void DoUpdateWorldState(uint32 worldstateId, uint32 worldstateValue)
Definition: InstanceScript.cpp:473
uint32 ExecuteEvent()
Definition: EventMap.cpp:46
EventMap events
Definition: instance_zulaman.cpp:284
Definition: zulaman.h:78

+ Here is the call graph for this function:

void instance_zulaman::instance_zulaman_InstanceScript::WriteSaveDataMore ( std::ostringstream &  data)
inlineoverridevirtual

Reimplemented from InstanceScript.

263  {
264  data << ZulAmanState << ' '
265  << SpeedRunTimer << ' '
266  << ZulAmanBossCount;
267  }
uint32 ZulAmanState
Definition: instance_zulaman.cpp:296
uint32 ZulAmanBossCount
Definition: instance_zulaman.cpp:297
uint32 SpeedRunTimer
Definition: instance_zulaman.cpp:295

Member Data Documentation

ObjectGuid instance_zulaman::instance_zulaman_InstanceScript::AkilzonGUID
protected
ObjectGuid instance_zulaman::instance_zulaman_InstanceScript::DaakaraGUID
protected
EventMap instance_zulaman::instance_zulaman_InstanceScript::events
protected
ObjectGuid instance_zulaman::instance_zulaman_InstanceScript::HalazziGUID
protected
ObjectGuid instance_zulaman::instance_zulaman_InstanceScript::HexLordMalacrassGUID
protected
ObjectGuid instance_zulaman::instance_zulaman_InstanceScript::HexLordTriggerGUID
protected
ObjectGuid instance_zulaman::instance_zulaman_InstanceScript::JanalaiGUID
protected
ObjectGuid instance_zulaman::instance_zulaman_InstanceScript::MasiveGateGUID
protected
ObjectGuid instance_zulaman::instance_zulaman_InstanceScript::NalorakkGUID
protected
uint32 instance_zulaman::instance_zulaman_InstanceScript::SpeedRunTimer
protected
ObjectGuid instance_zulaman::instance_zulaman_InstanceScript::StrangeGongGUID
protected
ObjectGuid instance_zulaman::instance_zulaman_InstanceScript::VoljinGUID
protected
uint32 instance_zulaman::instance_zulaman_InstanceScript::ZulAmanBossCount
protected
uint32 instance_zulaman::instance_zulaman_InstanceScript::ZulAmanState
protected

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