|
| | instance_stratholme_InstanceMapScript (Map *map) |
| |
| void | Initialize () override |
| |
| void | OnPlayerEnter (Player *player) override |
| |
| void | OnCreatureCreate (Creature *creature) override |
| |
| void | ProcessSlaughterEvent () |
| |
| void | OnUnitDeath (Unit *unit) override |
| |
| void | OnGameObjectCreate (GameObject *go) override |
| |
| void | CheckZiggurats () |
| |
| void | DoSpawnPlaguedCritters (uint8, Player *player) |
| |
| void | SetData (uint32 type, uint32 data) override |
| |
| void | SetGuidData (uint32 type, ObjectGuid data) override |
| |
| void | ReadSaveDataMore (std::istringstream &data) override |
| |
| void | WriteSaveDataMore (std::ostringstream &data) override |
| |
| uint32 | GetData (uint32 type) const override |
| |
| void | Update (uint32 diff) override |
| |
| | InstanceScript (Map *map) |
| |
| | ~InstanceScript () override |
| |
| virtual void | Load (char const *data) |
| |
| virtual void | CreatureLooted (Creature *, LootType) |
| |
| virtual std::string | GetSaveData () |
| |
| void | SaveToDB () |
| |
| 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 |
| |
| Creature * | GetCreature (uint32 type) |
| |
| GameObject * | GetGameObject (uint32 type) |
| |
| virtual void | OnPlayerLeave (Player *) |
| |
| virtual void | OnPlayerAreaUpdate (Player *, uint32, uint32) |
| |
| virtual void | OnPlayerInWaterStateUpdate (Player *, bool) |
| |
| void | HandleGameObject (ObjectGuid guid, bool open, GameObject *go=nullptr) |
| | Open or close a GameObject by GUID.
|
| |
| void | HandleGameObject (uint32 type, bool open) |
| | Open or close a GameObject registered via LoadObjectData.
|
| |
| void | DoUseDoorOrButton (ObjectGuid guid, uint32 withRestoreTime=0, bool useAlternativeState=false) |
| |
| void | DoRespawnGameObject (ObjectGuid guid, uint32 timeToDespawn=MINUTE) |
| |
| void | DoRespawnGameObject (uint32 type) |
| |
| 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 |
| |
| bool | _SkipCheckRequiredBosses (Player const *player=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 (WorldPackets::WorldState::InitWorldStates &) |
| |
| 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 |
| |
| TeamId | GetTeamIdInInstance () const |
| |
| void | SetTeamIdInInstance (TeamId teamId) |
| |
| bool | IsTwoFactionInstance () const |
| |
| | ZoneScript () |
| |
| virtual | ~ZoneScript () |
| |
| virtual uint32 | GetCreatureEntry (ObjectGuid::LowType, CreatureData const *data) |
| |
| virtual uint32 | GetGameObjectEntry (ObjectGuid::LowType, uint32 entry) |
| |
| virtual void | OnCreatureEvade (Creature *) |
| |
| virtual uint64 | GetData64 (uint32) const |
| |
| virtual void | SetData64 (uint32, uint64) |
| |
| virtual void | ProcessEvent (WorldObject *, uint32) |
| |
| void instance_stratholme::instance_stratholme_InstanceMapScript::OnGameObjectCreate |
( |
GameObject * |
go | ) |
|
|
inlineoverridevirtual |
Reimplemented from ZoneScript.
193 {
195 {
202 break;
208 break;
214 break;
220 break;
226 break;
232 break;
238 break;
244 break;
249 break;
253 break;
257 break;
261 break;
265 break;
266 default:
267 break;
268 }
269 }
void SetGoState(GOState state)
Definition GameObject.cpp:2503
void AllowSaveToDB(bool enable)
Definition GameObject.h:362
@ GO_PORT_TRAP_GATE_4
Definition stratholme.h:79
@ GO_PORT_TRAP_GATE_1
Definition stratholme.h:76
@ GO_SLAUGTHER_GATE
Definition stratholme.h:73
@ GO_GAUNTLET_DOOR_1
Definition stratholme.h:65
@ GO_ZIGGURAT_DOORS4
Definition stratholme.h:70
@ GO_HALL_OF_HIGH_COMMAND
Definition stratholme.h:64
@ GO_ZIGGURAT_DOORS1
Definition stratholme.h:67
@ GO_PORT_TRAP_GATE_3
Definition stratholme.h:78
@ GO_ZIGGURAT_DOORS5
Definition stratholme.h:71
@ GO_GAUNTLET_GATE
Definition stratholme.h:72
@ GO_ZIGGURAT_DOORS2
Definition stratholme.h:68
@ GO_PORT_TRAP_GATE_2
Definition stratholme.h:77
@ GO_ZIGGURAT_DOORS3
Definition stratholme.h:69
@ GO_GAUNTLET_DOOR_2
Definition stratholme.h:66
@ GO_CRUSADER_SQUARE_DOOR
Definition stratholme.h:62
@ GO_SLAUGHTER_GATE_SIDE
Definition stratholme.h:74
@ GO_HOARD_DOOR
Definition stratholme.h:63
ObjectGuid _zigguratDoorsGUID4
Definition instance_stratholme.cpp:634
ObjectGuid _zigguratDoorsGUID1
Definition instance_stratholme.cpp:631
ObjectGuid _zigguratDoorsGUID2
Definition instance_stratholme.cpp:632
ObjectGuid _zigguratDoorsGUID5
Definition instance_stratholme.cpp:635
ObjectGuid _zigguratDoorsGUID3
Definition instance_stratholme.cpp:633
uint32 GetData(uint32 type) const override
Definition instance_stratholme.cpp:433
References _gauntletGateGUID, _slaughterGateGUID, _slaughterProgress, _trapGatesGUIDs, _zigguratDoorsGUID1, _zigguratDoorsGUID2, _zigguratDoorsGUID3, _zigguratDoorsGUID4, _zigguratDoorsGUID5, _zigguratState1, _zigguratState2, _zigguratState3, GameObject::AllowSaveToDB(), GetData(), Object::GetEntry(), Object::GetGUID(), GO_CRUSADER_SQUARE_DOOR, GO_GAUNTLET_DOOR_1, GO_GAUNTLET_DOOR_2, GO_GAUNTLET_GATE, GO_HALL_OF_HIGH_COMMAND, GO_HOARD_DOOR, GO_PORT_TRAP_GATE_1, GO_PORT_TRAP_GATE_2, GO_PORT_TRAP_GATE_3, GO_PORT_TRAP_GATE_4, GO_SLAUGHTER_GATE_SIDE, GO_SLAUGTHER_GATE, GO_STATE_ACTIVE, GO_ZIGGURAT_DOORS1, GO_ZIGGURAT_DOORS2, GO_ZIGGURAT_DOORS3, GO_ZIGGURAT_DOORS4, GO_ZIGGURAT_DOORS5, GameObject::SetGoState(), TYPE_ZIGGURAT1, TYPE_ZIGGURAT2, and TYPE_ZIGGURAT3.
| void instance_stratholme::instance_stratholme_InstanceMapScript::SetData |
( |
uint32 |
type, |
|
|
uint32 |
data |
|
) |
| |
|
inlineoverridevirtual |
Reimplemented from ZoneScript.
302 {
303 switch (type)
304 {
306 {
308 {
313
316 }
317 break;
318 }
320 {
323
327
329 break;
330 }
332 {
335
339
341 break;
342 }
344 {
347
351
353 break;
354 }
356 {
359 return;
360 }
363 break;
366 {
368 {
369 if (barthilas->IsAlive())
370 {
373 }
374 }
375 }
377 break;
378 }
379
381 }
@ GO_STATE_READY
Definition GameObjectData.h:709
@ IN_PROGRESS
Definition InstanceScript.h:59
@ DONE
Definition InstanceScript.h:61
void DoCastSpellOnPlayers(uint32 spell)
Definition InstanceScript.cpp:712
Position const BarthilasPos
Definition instance_stratholme.cpp:57
@ SAY_BARON_INIT_YELL
Definition stratholme.h:88
@ TYPE_BARON_FIGHT
Definition stratholme.h:30
@ DATA_BARON_RUN_NONE
Definition stratholme.h:35
@ DATA_BARON_RUN_GATE
Definition stratholme.h:36
@ TYPE_BARON_RUN
Definition stratholme.h:26
void CheckZiggurats()
Definition instance_stratholme.cpp:271
References _baronRivendareGUID, _baronRunProgress, _baronRunTime, _barthilasGUID, _barthilasrunProgress, _postboxesOpened, _zigguratDoorsGUID1, _zigguratDoorsGUID2, _zigguratDoorsGUID3, _zigguratDoorsGUID5, _zigguratState1, _zigguratState2, _zigguratState3, BarthilasPos, CheckZiggurats(), DATA_BARON_RUN_GATE, DATA_BARON_RUN_NONE, InstanceScript::DoCastSpellOnPlayers(), DONE, EVENT_BARON_TIME, Map::GetCreature(), Map::GetGameObject(), Position::GetOrientation(), Position::GetPositionX(), Position::GetPositionY(), Position::GetPositionZ(), GO_STATE_ACTIVE, GO_STATE_READY, IN_PROGRESS, InstanceScript::instance, InstanceScript::SaveToDB(), SAY_BARON_INIT_YELL, SPELL_BARON_ULTIMATUM, TYPE_BARON_FIGHT, TYPE_BARON_RUN, TYPE_BARTHILAS_RUN, TYPE_MALLOW, TYPE_ZIGGURAT1, TYPE_ZIGGURAT2, and TYPE_ZIGGURAT3.
| void instance_stratholme::instance_stratholme_InstanceMapScript::Update |
( |
uint32 |
diff | ) |
|
|
inlineoverridevirtual |
Reimplemented from InstanceScript.
452 {
454
456
457 for (
uint8 i = 0; i < 2; i++)
458 {
459
461 break;
462
463
465 {
466 if (
Player* player = itr->GetSource())
467 {
468
469 if (!player->IsGameMaster() && player->IsWithinDist2d(
aGateTrap[i].m_positionX,
aGateTrap[i].m_positionY, 5.5f))
470 {
471
473 return;
474
476
477
482
484
485 if (i == 0)
486 {
487
489
491
493 }
494 else if (i == 1)
495 {
496
498
500
502 }
503 }
504 }
505 }
506 }
507
508 const int GATE1 = 0;
509 const int GATE2 = 1;
510
511 switch (
events.ExecuteEvent())
512 {
515 break;
518 break;
521 break;
524 break;
527 break;
530 break;
532 {
536 {
538 {
539 case 10:
541 break;
542 case 5:
545 ysida->AI()->SetData(1, 1);
546 break;
547 case 0:
550 break;
551 }
552 }
553
556 else
558
560 break;
561 }
563 {
566 {
568 {
572 }
573 else
575 }
576 break;
577 }
579 {
581 break;
582 }
584 {
588 if (
Player* player = i->GetSource())
589 if (player->GetDistance2d(4034.97f, -3402.13f) < 50.0f)
590 {
592 return;
593 }
594
596 break;
597 }
599 {
600 for (
uint8 i = 0; i < 5; ++i)
602 {
603 guard->SetWalk(true);
604 guard->GetMotionMaster()->MovePoint(0,
BlackGuardPos[i + 5]);
606 if (i == 0 && guard->AI())
608 }
609
612 break;
613 }
614 default:
615 break;
616 }
617 }
@ EMOTE_ONESHOT_ATTACK1H
Definition SharedDefines.h:1930
Definition LinkedList.h:139
bool IsEmpty() const
Definition LinkedList.h:97
Definition MapRefMgr.h:26
iterator begin()
Definition MapRefMgr.h:36
iterator end()
Definition MapRefMgr.h:37
PlayerList const & GetPlayers() const
Definition Map.h:335
static void Kill(Unit *killer, Unit *victim, bool durabilityLoss=true, WeaponAttackType attackType=BASE_ATTACK, SpellInfo const *spellProto=nullptr, Spell const *spell=nullptr)
Definition Unit.cpp:13983
bool IsAlive() const
Definition Unit.h:1798
void HandleEmoteCommand(uint32 emoteId)
Definition Unit.cpp:2185
bool IsInCombat() const
Definition Unit.h:941
Creature * FindNearestCreature(uint32 entry, float range, bool alive=true) const
Definition Object.cpp:2553
Position const MindlessUndeadPos
Definition instance_stratholme.cpp:56
const Position BlackGuardPos[10]
Definition instance_stratholme.cpp:28
static const Position aGateTrap[]
Definition instance_stratholme.cpp:50
@ EVENT_GATE1_TRAP
Definition stratholme.h:101
@ SAY_BLACK_GUARD_INIT
Definition stratholme.h:87
@ SAY_BARON_10M
Definition stratholme.h:90
@ SAY_BARON_0M
Definition stratholme.h:92
@ EVENT_GATE1_DELAY
Definition stratholme.h:102
@ EVENT_GATE1_CRITTER_DELAY
Definition stratholme.h:103
@ SAY_BARON_5M
Definition stratholme.h:91
@ EVENT_GATE2_CRITTER_DELAY
Definition stratholme.h:106
@ EVENT_GATE2_DELAY
Definition stratholme.h:105
@ EVENT_EXECUTE_PRISONER
Definition stratholme.h:100
@ EVENT_GATE2_TRAP
Definition stratholme.h:104
@ NPC_YSIDA
Definition stratholme.h:50
void gate_delay(int gate)
Definition instance_stratholme.cpp:674
void gate_critter_delay(int gate)
Definition instance_stratholme.cpp:686
References _baronRivendareGUID, _baronRunTime, _gateTrapsCooldown, _trapGatesGUIDs, _trappedPlayerGUID, _zigguratDoorsGUID4, aGateTrap, Creature::AI(), MapRefMgr::begin(), BlackGuardPos, InstanceScript::DoRemoveAurasDueToSpellOnPlayers(), InstanceScript::DoUseDoorOrButton(), EMOTE_ONESHOT_ATTACK1H, MapRefMgr::end(), EVENT_BARON_TIME, EVENT_EXECUTE_PRISONER, EVENT_FORCE_SLAUGHTER_EVENT, EVENT_GATE1_CRITTER_DELAY, EVENT_GATE1_DELAY, EVENT_GATE1_TRAP, EVENT_GATE2_CRITTER_DELAY, EVENT_GATE2_DELAY, EVENT_GATE2_TRAP, EVENT_SPAWN_BLACK_GUARD, EVENT_SPAWN_MINDLESS, WorldObject::FindNearestCreature(), gate_critter_delay(), gate_delay(), Map::GetCreature(), Map::GetGameObject(), Map::GetPlayers(), GO_STATE_ACTIVE, Unit::HandleEmoteCommand(), InstanceScript::instance, Unit::IsAlive(), LinkedListHead::IsEmpty(), Unit::IsInCombat(), Unit::Kill(), MindlessUndeadPos, NPC_BLACK_GUARD, NPC_MINDLESS_UNDEAD, NPC_YSIDA, ProcessSlaughterEvent(), InstanceScript::SaveToDB(), SAY_BARON_0M, SAY_BARON_10M, SAY_BARON_5M, SAY_BLACK_GUARD_INIT, SPELL_BARON_ULTIMATUM, Map::SummonCreature(), and CreatureAI::Talk().