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

Public Member Functions

 instance_stratholme_InstanceMapScript (Map *map)
 
bool StartSlaugtherSquare ()
 
void UpdateGoState (ObjectGuid goGuid, uint32 newState, bool withRestoreTime)
 
void OnCreatureCreate (Creature *creature) override
 
void OnCreatureRemove (Creature *creature) override
 
void OnGameObjectCreate (GameObject *go) override
 
void SetData (uint32 type, uint32 data) override
 
std::string GetSaveData () override
 
void Load (const char *in) override
 
uint32 GetData (uint32 type) const override
 
ObjectGuid GetGuidData (uint32 data) const override
 
void Update (uint32 diff) override
 
- Public Member Functions inherited from InstanceScript
 InstanceScript (Map *map)
 
virtual ~InstanceScript ()
 
virtual void Initialize ()
 
void SaveToDB ()
 
virtual bool IsEncounterInProgress () const
 
virtual void OnGameObjectRemove (GameObject *go) 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 ()
 
virtual bool SetBossState (uint32 id, EncounterState state)
 
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 OnUnitDeath (Unit *)
 
virtual void SetGuidData (uint32, ObjectGuid)
 
virtual uint64 GetData64 (uint32) const
 
virtual void SetData64 (uint32, uint64)
 
virtual void ProcessEvent (WorldObject *, uint32)
 

Public Attributes

uint32 EncounterState [MAX_ENCOUNTER]
 
bool IsSilverHandDead [5]
 
ObjectGuid serviceEntranceGUID
 
ObjectGuid gauntletGate1GUID
 
ObjectGuid ziggurat1GUID
 
ObjectGuid ziggurat2GUID
 
ObjectGuid ziggurat3GUID
 
ObjectGuid ziggurat4GUID
 
ObjectGuid ziggurat5GUID
 
ObjectGuid portGauntletGUID
 
ObjectGuid portSlaugtherGUID
 
ObjectGuid portElderGUID
 
ObjectGuid baronGUID
 
ObjectGuid ysidaTriggerGUID
 
GuidSet crystalsGUID
 
GuidSet abomnationGUID
 
EventMap events
 
- Public Attributes inherited from InstanceScript
Mapinstance
 

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 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_stratholme::instance_stratholme_InstanceMapScript::instance_stratholme_InstanceMapScript ( Map map)
inline
50  : InstanceScript(map)
51  {
53  for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
55 
56  for (uint8 i = 0; i < 5; ++i)
57  IsSilverHandDead[i] = false;
58  }
EncounterState
Definition: InstanceScript.h:56
void SetHeaders(std::string const &dataHeaders)
Definition: InstanceScript.cpp:98
#define DataHeader
Definition: baradin_hold.h:25
InstanceScript(Map *map)
Definition: InstanceScript.h:144
Definition: InstanceScript.h:58
Definition: instance_stratholme.cpp:34
uint8_t uint8
Definition: Define.h:152
bool IsSilverHandDead[5]
Definition: instance_stratholme.cpp:62

+ Here is the call graph for this function:

Member Function Documentation

uint32 instance_stratholme::instance_stratholme_InstanceMapScript::GetData ( uint32  type) const
inlineoverridevirtual

Reimplemented from ZoneScript.

378  {
379  switch (type)
380  {
381  case TYPE_SH_QUEST:
383  return 1;
384  return 0;
385  case TYPE_BARON_RUN:
386  return EncounterState[0];
387  case TYPE_BARONESS:
388  return EncounterState[1];
389  case TYPE_NERUB:
390  return EncounterState[2];
391  case TYPE_PALLID:
392  return EncounterState[3];
393  case TYPE_RAMSTEIN:
394  return EncounterState[4];
395  case TYPE_BARON:
396  return EncounterState[5];
397  }
398  return 0;
399  }
EncounterState
Definition: InstanceScript.h:56
Definition: stratholme.h:26
Definition: stratholme.h:27
Definition: stratholme.h:28
Definition: stratholme.h:31
Definition: stratholme.h:38
bool IsSilverHandDead[5]
Definition: instance_stratholme.cpp:62
Definition: stratholme.h:30
Definition: stratholme.h:29

+ Here is the caller graph for this function:

ObjectGuid instance_stratholme::instance_stratholme_InstanceMapScript::GetGuidData ( uint32  data) const
inlineoverridevirtual

Reimplemented from InstanceScript.

402  {
403  switch (data)
404  {
405  case DATA_BARON:
406  return baronGUID;
407  case DATA_YSIDA_TRIGGER:
408  return ysidaTriggerGUID;
409  }
410  return ObjectGuid::Empty;
411  }
static ObjectGuid const Empty
Definition: ObjectGuid.h:196
Definition: stratholme.h:35
Definition: stratholme.h:36
ObjectGuid baronGUID
Definition: instance_stratholme.cpp:75
ObjectGuid ysidaTriggerGUID
Definition: instance_stratholme.cpp:76
std::string instance_stratholme::instance_stratholme_InstanceMapScript::GetSaveData ( )
inlineoverridevirtual

Reimplemented from InstanceScript.

341  {
343 
344  std::ostringstream saveStream;
345  saveStream << EncounterState[0] << ' ' << EncounterState[1] << ' ' << EncounterState[2] << ' '
346  << EncounterState[3] << ' ' << EncounterState[4] << ' ' << EncounterState[5];
347 
349  return saveStream.str();
350  }
#define OUT_SAVE_INST_DATA
Definition: InstanceScript.h:29
EncounterState
Definition: InstanceScript.h:56
#define OUT_SAVE_INST_DATA_COMPLETE
Definition: InstanceScript.h:30
void instance_stratholme::instance_stratholme_InstanceMapScript::Load ( const char *  in)
inlineoverridevirtual

Reimplemented from InstanceScript.

353  {
354  if (!in)
355  {
357  return;
358  }
359 
360  OUT_LOAD_INST_DATA(in);
361 
362  std::istringstream loadStream(in);
363  loadStream >> EncounterState[0] >> EncounterState[1] >> EncounterState[2] >> EncounterState[3]
364  >> EncounterState[4] >> EncounterState[5];
365 
366  // Do not reset 1, 2 and 3. they are not set to done, yet .
367  if (EncounterState[0] == IN_PROGRESS)
368  EncounterState[0] = NOT_STARTED;
369  if (EncounterState[4] == IN_PROGRESS)
370  EncounterState[4] = NOT_STARTED;
371  if (EncounterState[5] == IN_PROGRESS)
372  EncounterState[5] = NOT_STARTED;
373 
375  }
#define OUT_LOAD_INST_DATA_FAIL
Definition: InstanceScript.h:33
EncounterState
Definition: InstanceScript.h:56
#define OUT_LOAD_INST_DATA_COMPLETE
Definition: InstanceScript.h:32
Definition: InstanceScript.h:59
Definition: InstanceScript.h:58
#define OUT_LOAD_INST_DATA(a)
Definition: InstanceScript.h:31
void instance_stratholme::instance_stratholme_InstanceMapScript::OnCreatureCreate ( Creature creature)
inlineoverridevirtual

Reimplemented from InstanceScript.

111  {
112  switch (creature->GetEntry())
113  {
114  case NPC_BARON:
115  baronGUID = creature->GetGUID();
116  break;
117  case NPC_YSIDA_TRIGGER:
118  ysidaTriggerGUID = creature->GetGUID();
119  break;
120  case NPC_CRYSTAL:
121  crystalsGUID.insert(creature->GetGUID());
122  break;
123  case NPC_ABOM_BILE:
124  case NPC_ABOM_VENOM:
125  abomnationGUID.insert(creature->GetGUID());
126  break;
127  }
128  }
Definition: stratholme.h:49
GuidSet crystalsGUID
Definition: instance_stratholme.cpp:77
ObjectGuid baronGUID
Definition: instance_stratholme.cpp:75
GuidSet abomnationGUID
Definition: instance_stratholme.cpp:78
Definition: stratholme.h:48
Definition: stratholme.h:54
ObjectGuid const & GetGUID() const
Definition: Object.h:105
Definition: stratholme.h:50
uint32 GetEntry() const
Definition: Object.h:107
Definition: stratholme.h:53
ObjectGuid ysidaTriggerGUID
Definition: instance_stratholme.cpp:76

+ Here is the call graph for this function:

void instance_stratholme::instance_stratholme_InstanceMapScript::OnCreatureRemove ( Creature creature)
inlineoverridevirtual

Reimplemented from InstanceScript.

131  {
132  switch (creature->GetEntry())
133  {
134  case NPC_CRYSTAL:
135  crystalsGUID.erase(creature->GetGUID());
136  break;
137  case NPC_ABOM_BILE:
138  case NPC_ABOM_VENOM:
139  abomnationGUID.erase(creature->GetGUID());
140  break;
141  }
142  }
GuidSet crystalsGUID
Definition: instance_stratholme.cpp:77
GuidSet abomnationGUID
Definition: instance_stratholme.cpp:78
Definition: stratholme.h:48
Definition: stratholme.h:54
ObjectGuid const & GetGUID() const
Definition: Object.h:105
uint32 GetEntry() const
Definition: Object.h:107
Definition: stratholme.h:53

+ Here is the call graph for this function:

void instance_stratholme::instance_stratholme_InstanceMapScript::OnGameObjectCreate ( GameObject go)
inlineoverridevirtual

Reimplemented from InstanceScript.

145  {
146  switch (go->GetEntry())
147  {
148  case GO_SERVICE_ENTRANCE:
150  break;
151  case GO_GAUNTLET_GATE1:
152  //weird, but unless flag is set, client will not respond as expected. DB bug?
154  gauntletGate1GUID = go->GetGUID();
155  break;
156  case GO_ZIGGURAT1:
157  ziggurat1GUID = go->GetGUID();
160  break;
161  case GO_ZIGGURAT2:
162  ziggurat2GUID = go->GetGUID();
165  break;
166  case GO_ZIGGURAT3:
167  ziggurat3GUID = go->GetGUID();
170  break;
171  case GO_ZIGGURAT4:
172  ziggurat4GUID = go->GetGUID();
175  break;
176  case GO_ZIGGURAT5:
177  ziggurat5GUID = go->GetGUID();
180  break;
181  case GO_PORT_GAUNTLET:
182  portGauntletGUID = go->GetGUID();
185  break;
186  case GO_PORT_SLAUGTHER:
187  portSlaugtherGUID = go->GetGUID();
190  break;
191  case GO_PORT_ELDERS:
192  portElderGUID = go->GetGUID();
193  break;
194  }
195  }
static ObjectGuid const Empty
Definition: ObjectGuid.h:196
Definition: stratholme.h:64
ObjectGuid portGauntletGUID
Definition: instance_stratholme.cpp:71
Definition: stratholme.h:70
ObjectGuid ziggurat1GUID
Definition: instance_stratholme.cpp:66
Definition: inflate.h:49
Definition: stratholme.h:66
Definition: stratholme.h:62
void SetFlag(uint16 index, uint32 newFlag)
Definition: Object.cpp:1199
ObjectGuid gauntletGate1GUID
Definition: instance_stratholme.cpp:65
ObjectGuid ziggurat2GUID
Definition: instance_stratholme.cpp:67
Definition: stratholme.h:63
Definition: stratholme.h:27
uint32 GetData(uint32 type) const override
Definition: instance_stratholme.cpp:377
ObjectGuid portSlaugtherGUID
Definition: instance_stratholme.cpp:72
ObjectGuid ziggurat5GUID
Definition: instance_stratholme.cpp:70
Definition: stratholme.h:28
Definition: stratholme.h:68
Definition: InstanceScript.h:59
Definition: stratholme.h:71
Definition: SharedDefines.h:2122
Definition: stratholme.h:69
Definition: stratholme.h:31
void HandleGameObject(ObjectGuid guid, bool open, GameObject *go=nullptr)
Definition: InstanceScript.cpp:397
ObjectGuid portElderGUID
Definition: instance_stratholme.cpp:73
Definition: stratholme.h:67
ObjectGuid ziggurat3GUID
Definition: instance_stratholme.cpp:68
Definition: UpdateFields.h:319
ObjectGuid const & GetGUID() const
Definition: Object.h:105
Definition: stratholme.h:65
uint32 GetEntry() const
Definition: Object.h:107
ObjectGuid ziggurat4GUID
Definition: instance_stratholme.cpp:69
ObjectGuid serviceEntranceGUID
Definition: instance_stratholme.cpp:64
Definition: stratholme.h:30
Definition: stratholme.h:29

+ Here is the call graph for this function:

void instance_stratholme::instance_stratholme_InstanceMapScript::SetData ( uint32  type,
uint32  data 
)
inlineoverridevirtual

Reimplemented from ZoneScript.

198  {
199  switch (type)
200  {
201  case TYPE_BARON_RUN:
202  switch (data)
203  {
204  case IN_PROGRESS:
205  if (EncounterState[0] == IN_PROGRESS || EncounterState[0] == FAIL)
206  break;
207  EncounterState[0] = data;
209  TC_LOG_DEBUG("scripts", "Instance Stratholme: Baron run in progress.");
210  break;
211  case FAIL:
213  EncounterState[0] = data;
214  break;
215  case DONE:
216  EncounterState[0] = data;
217  if (Creature* ysidaTrigger = instance->GetCreature(ysidaTriggerGUID))
218  {
219  Position ysidaPos = ysidaTrigger->GetPosition();
220  ysidaTrigger->SummonCreature(NPC_YSIDA, ysidaPos, TEMPSUMMON_TIMED_DESPAWN, 1800000);
221  }
223  break;
224  }
225  break;
226  case TYPE_BARONESS:
227  EncounterState[1] = data;
228  if (data == IN_PROGRESS)
229  {
231  //change to DONE when crystals implemented
233  }
234  break;
235  case TYPE_NERUB:
236  EncounterState[2] = data;
237  if (data == IN_PROGRESS)
238  {
240  //change to DONE when crystals implemented
242  }
243  break;
244  case TYPE_PALLID:
245  EncounterState[3] = data;
246  if (data == IN_PROGRESS)
247  {
249  //change to DONE when crystals implemented
251  }
252  break;
253  case TYPE_RAMSTEIN:
254  if (data == IN_PROGRESS)
255  {
257 
258  uint32 count = abomnationGUID.size();
259  for (GuidSet::const_iterator i = abomnationGUID.begin(); i != abomnationGUID.end(); ++i)
260  {
261  if (Creature* pAbom = instance->GetCreature(*i))
262  if (!pAbom->IsAlive())
263  --count;
264  }
265 
266  if (!count)
267  {
268  //a bit itchy, it should close the door after 10 secs, but it doesn't. skipping it for now.
269  //UpdateGoState(ziggurat4GUID, 0, true);
270  if (Creature* pBaron = instance->GetCreature(baronGUID))
271  pBaron->SummonCreature(NPC_RAMSTEIN, 4032.84f, -3390.24f, 119.73f, 4.71f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 1800000);
272  TC_LOG_DEBUG("scripts", "Instance Stratholme: Ramstein spawned.");
273  }
274  else
275  TC_LOG_DEBUG("scripts", "Instance Stratholme: %u Abomnation left to kill.", count);
276  }
277 
278  if (data == NOT_STARTED)
280 
281  if (data == DONE)
282  {
284  TC_LOG_DEBUG("scripts", "Instance Stratholme: Slaugther event will continue in 1 minute.");
285  }
286  EncounterState[4] = data;
287  break;
288  case TYPE_BARON:
289  if (data == IN_PROGRESS)
290  {
293  }
294  if (data == DONE || data == NOT_STARTED)
295  {
298  }
299  if (data == DONE)
300  {
303  {
305  Map::PlayerList const& players = instance->GetPlayers();
306  if (!players.isEmpty())
307  for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
308  if (Player* player = itr->GetSource())
309  if (player->GetQuestStatus(QUEST_DEAD_MAN_PLEA) == QUEST_STATUS_INCOMPLETE)
310  {
311  player->AreaExploredOrEventHappens(QUEST_DEAD_MAN_PLEA);
312  player->KilledMonsterCredit(NPC_YSIDA);
313  }
315  }
316  }
317  EncounterState[5] = data;
318  break;
319  case TYPE_SH_AELMAR:
320  IsSilverHandDead[0] = (data) ? true : false;
321  break;
322  case TYPE_SH_CATHELA:
323  IsSilverHandDead[1] = (data) ? true : false;
324  break;
325  case TYPE_SH_GREGOR:
326  IsSilverHandDead[2] = (data) ? true : false;
327  break;
328  case TYPE_SH_NEMAS:
329  IsSilverHandDead[3] = (data) ? true : false;
330  break;
331  case TYPE_SH_VICAR:
332  IsSilverHandDead[4] = (data) ? true : false;
333  break;
334  }
335 
336  if (data == DONE)
337  SaveToDB();
338  }
ObjectGuid portGauntletGUID
Definition: instance_stratholme.cpp:71
ObjectGuid ziggurat1GUID
Definition: instance_stratholme.cpp:66
Definition: inflate.h:49
void CancelEvent(uint32 eventId)
Definition: EventMap.cpp:89
#define TC_LOG_DEBUG(filterType__,...)
Definition: Log.h:198
Definition: Creature.h:467
EncounterState
Definition: InstanceScript.h:56
Definition: InstanceScript.h:60
iterator begin()
Definition: MapRefManager.h:37
Definition: stratholme.h:76
Definition: instance_stratholme.cpp:40
ObjectGuid ziggurat2GUID
Definition: instance_stratholme.cpp:67
Definition: stratholme.h:43
Definition: stratholme.h:26
Definition: stratholme.h:52
Definition: stratholme.h:27
uint32 GetData(uint32 type) const override
Definition: instance_stratholme.cpp:377
Definition: stratholme.h:40
ObjectGuid baronGUID
Definition: instance_stratholme.cpp:75
ObjectGuid ziggurat5GUID
Definition: instance_stratholme.cpp:70
Definition: stratholme.h:28
EventMap events
Definition: instance_stratholme.cpp:79
Definition: InstanceScript.h:59
Definition: Object.h:56
GuidSet abomnationGUID
Definition: instance_stratholme.cpp:78
void SaveToDB()
Definition: InstanceScript.cpp:39
Definition: stratholme.h:42
Definition: InstanceScript.h:58
void GetPosition(float &x, float &y) const
Definition: Position.h:109
uint32_t uint32
Definition: Define.h:150
Map * instance
Definition: InstanceScript.h:148
Definition: LinkedList.h:141
bool isEmpty() const
Definition: LinkedList.h:102
Definition: stratholme.h:31
void HandleGameObject(ObjectGuid guid, bool open, GameObject *go=nullptr)
Definition: InstanceScript.cpp:397
void ScheduleEvent(uint32 eventId, Milliseconds const &time, uint32 group=0, uint8 phase=0)
Definition: EventMap.h:123
ObjectGuid ziggurat3GUID
Definition: instance_stratholme.cpp:68
Definition: stratholme.h:81
Definition: stratholme.h:39
Definition: stratholme.h:56
PlayerList const & GetPlayers() const
Definition: Map.h:433
Definition: MapRefManager.h:26
Creature * GetCreature(ObjectGuid const &guid)
Definition: Map.cpp:3535
Definition: instance_stratholme.cpp:39
Definition: QuestDef.h:113
Definition: Position.h:27
ObjectGuid ziggurat4GUID
Definition: instance_stratholme.cpp:69
bool IsSilverHandDead[5]
Definition: instance_stratholme.cpp:62
void SetData(uint32 type, uint32 data) override
Definition: instance_stratholme.cpp:197
ObjectGuid ysidaTriggerGUID
Definition: instance_stratholme.cpp:76
Definition: stratholme.h:30
Definition: stratholme.h:29
bool StartSlaugtherSquare()
Definition: instance_stratholme.cpp:81
iterator end()
Definition: MapRefManager.h:38
Definition: stratholme.h:41
void DoRemoveAurasDueToSpellOnPlayers(uint32 spell)
Definition: InstanceScript.cpp:540
Definition: Object.h:54

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool instance_stratholme::instance_stratholme_InstanceMapScript::StartSlaugtherSquare ( )
inline
82  {
83  //change to DONE when crystals implemented
85  {
88  return true;
89  }
90 
91  TC_LOG_DEBUG("scripts", "Instance Stratholme: Cannot open slaugther square yet.");
92  return false;
93  }
ObjectGuid portGauntletGUID
Definition: instance_stratholme.cpp:71
#define TC_LOG_DEBUG(filterType__,...)
Definition: Log.h:198
EncounterState
Definition: InstanceScript.h:56
ObjectGuid portSlaugtherGUID
Definition: instance_stratholme.cpp:72
Definition: InstanceScript.h:59
void HandleGameObject(ObjectGuid guid, bool open, GameObject *go=nullptr)
Definition: InstanceScript.cpp:397

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void instance_stratholme::instance_stratholme_InstanceMapScript::Update ( uint32  diff)
inlineoverridevirtual

Reimplemented from InstanceScript.

414  {
415  events.Update(diff);
416 
417  while (uint32 eventId = events.ExecuteEvent())
418  {
419  switch (eventId)
420  {
421  case EVENT_BARON_RUN:
422  if (GetData(TYPE_BARON_RUN) != DONE)
424  TC_LOG_DEBUG("scripts", "Instance Stratholme: Baron run event reached end. Event has state %u.", GetData(TYPE_BARON_RUN));
425  break;
427  if (Creature* baron = instance->GetCreature(baronGUID))
428  {
429  for (uint8 i = 0; i < 4; ++i)
430  baron->SummonCreature(NPC_BLACK_GUARD, 4032.84f, -3390.24f, 119.73f, 4.71f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 1800000);
431 
434  TC_LOG_DEBUG("scripts", "Instance Stratholme: Black guard sentries spawned. Opening gates to baron.");
435  }
436  break;
437  default:
438  break;
439  }
440  }
441  }
Definition: stratholme.h:55
Definition: inflate.h:49
#define TC_LOG_DEBUG(filterType__,...)
Definition: Log.h:198
Definition: Creature.h:467
Definition: InstanceScript.h:60
Definition: instance_stratholme.cpp:40
Definition: stratholme.h:26
uint32 GetData(uint32 type) const override
Definition: instance_stratholme.cpp:377
ObjectGuid baronGUID
Definition: instance_stratholme.cpp:75
ObjectGuid ziggurat5GUID
Definition: instance_stratholme.cpp:70
EventMap events
Definition: instance_stratholme.cpp:79
uint32_t uint32
Definition: Define.h:150
Map * instance
Definition: InstanceScript.h:148
void HandleGameObject(ObjectGuid guid, bool open, GameObject *go=nullptr)
Definition: InstanceScript.cpp:397
void Update(uint32 time)
Definition: EventMap.h:54
Creature * GetCreature(ObjectGuid const &guid)
Definition: Map.cpp:3535
Definition: instance_stratholme.cpp:39
uint32 ExecuteEvent()
Definition: EventMap.cpp:46
uint8_t uint8
Definition: Define.h:152
ObjectGuid ziggurat4GUID
Definition: instance_stratholme.cpp:69
void SetData(uint32 type, uint32 data) override
Definition: instance_stratholme.cpp:197
Definition: Object.h:54

+ Here is the call graph for this function:

void instance_stratholme::instance_stratholme_InstanceMapScript::UpdateGoState ( ObjectGuid  goGuid,
uint32  newState,
bool  withRestoreTime 
)
inline
97  {
98  if (!goGuid)
99  return;
100 
101  if (GameObject* go = instance->GetGameObject(goGuid))
102  {
103  if (withRestoreTime)
104  go->UseDoorOrButton(10);
105  else
106  go->SetGoState((GOState)newState);
107  }
108  }
Map * instance
Definition: InstanceScript.h:148
Definition: GameObject.h:880
GOState
Definition: GameObject.h:820
GameObject * GetGameObject(ObjectGuid const &guid)
Definition: Map.cpp:3545

+ Here is the call graph for this function:

Member Data Documentation

GuidSet instance_stratholme::instance_stratholme_InstanceMapScript::abomnationGUID
ObjectGuid instance_stratholme::instance_stratholme_InstanceMapScript::baronGUID
GuidSet instance_stratholme::instance_stratholme_InstanceMapScript::crystalsGUID
uint32 instance_stratholme::instance_stratholme_InstanceMapScript::EncounterState[MAX_ENCOUNTER]
EventMap instance_stratholme::instance_stratholme_InstanceMapScript::events
ObjectGuid instance_stratholme::instance_stratholme_InstanceMapScript::gauntletGate1GUID
bool instance_stratholme::instance_stratholme_InstanceMapScript::IsSilverHandDead[5]
ObjectGuid instance_stratholme::instance_stratholme_InstanceMapScript::portElderGUID
ObjectGuid instance_stratholme::instance_stratholme_InstanceMapScript::portGauntletGUID
ObjectGuid instance_stratholme::instance_stratholme_InstanceMapScript::portSlaugtherGUID
ObjectGuid instance_stratholme::instance_stratholme_InstanceMapScript::serviceEntranceGUID
ObjectGuid instance_stratholme::instance_stratholme_InstanceMapScript::ysidaTriggerGUID
ObjectGuid instance_stratholme::instance_stratholme_InstanceMapScript::ziggurat1GUID
ObjectGuid instance_stratholme::instance_stratholme_InstanceMapScript::ziggurat2GUID
ObjectGuid instance_stratholme::instance_stratholme_InstanceMapScript::ziggurat3GUID
ObjectGuid instance_stratholme::instance_stratholme_InstanceMapScript::ziggurat4GUID
ObjectGuid instance_stratholme::instance_stratholme_InstanceMapScript::ziggurat5GUID

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