AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
npc_arthas::npc_arthasAI Struct Reference
Inheritance diagram for npc_arthas::npc_arthasAI:
npc_escortAI ScriptedAI CreatureAI UnitAI

Public Member Functions

 npc_arthasAI (Creature *creature)
 
CreatureGetEventNpc (uint32 entry)
 
void ScheduleNextEvent (uint32 currentEvent, uint32 time)
 
void SummonNextWave ()
 
void ReorderInstance (uint32 data)
 
void JustEngagedWith (Unit *) override
 Called for reaction when initially engaged.
 
void SendNextWave (uint32 entry)
 
void SpawnTimeRift ()
 
void JustDied (Unit *) override
 
void JustSummoned (Creature *cr) override
 
void SummonedCreatureDespawn (Creature *cr) override
 
void SummonedCreatureDies (Creature *cr, Unit *) override
 
void DoAction (int32 param) override
 
void Reset () override
 
void WaypointReached (uint32 uiPointId) override
 
void UpdateAI (uint32 diff) override
 
- Public Member Functions inherited from npc_escortAI
 npc_escortAI (Creature *creature)
 
 ~npc_escortAI () override
 
void AttackStart (Unit *who) override
 
void MoveInLineOfSight (Unit *who) override
 
void JustDied (Unit *) override
 
void JustRespawned () override
 
void ReturnToLastPoint ()
 
void EnterEvadeMode (EvadeReason=EVADE_REASON_OTHER) override
 
void UpdateAI (uint32 diff) override
 
virtual void UpdateEscortAI (uint32 diff)
 
void MovementInform (uint32, uint32) override
 
void AddWaypoint (uint32 id, float x, float y, float z, uint32 waitTime=0)
 
bool SetNextWaypoint (uint32 pointId, float x, float y, float z, float orientation)
 
bool SetNextWaypoint (uint32 pointId, bool setPosition=true)
 
bool GetWaypointPosition (uint32 pointId, float &x, float &y, float &z)
 
void GenerateWaypointArray (Movement::PointsArray *points)
 
virtual void WaypointReached (uint32 pointId)=0
 
virtual void WaypointStart (uint32)
 
void Start (bool isActiveAttacker=true, bool run=false, ObjectGuid playerGUID=ObjectGuid::Empty, Quest const *quest=nullptr, bool instantRespawn=false, bool canLoopPath=false, bool resetWaypoints=true)
 
void SetRun (bool on=true)
 
void SetEscortPaused (bool on)
 
bool HasEscortState (uint32 escortState)
 
bool IsEscorted () override
 
void SetMaxPlayerDistance (float newMax)
 
float GetMaxPlayerDistance ()
 
void SetDespawnAtEnd (bool despawn)
 
void SetDespawnAtFar (bool despawn)
 
bool GetAttack ()
 
void SetCanAttack (bool attack)
 
ObjectGuid GetEventStarterGUID ()
 
void AddEscortState (uint32 escortState)
 
void RemoveEscortState (uint32 escortState)
 
- Public Member Functions inherited from ScriptedAI
 ScriptedAI (Creature *creature)
 
 ~ScriptedAI () override
 
void AttackStartNoMove (Unit *target)
 
void DamageTaken (Unit *, uint32 &, DamageEffectType, SpellSchoolMask) override
 
void UpdateAI (uint32 diff) override
 
void JustDied (Unit *) override
 
void KilledUnit (Unit *) override
 
void JustSummoned (Creature *) override
 
void SummonedCreatureDespawn (Creature *) override
 
void SpellHit (Unit *, SpellInfo const *) override
 
void SpellHitTarget (Unit *, SpellInfo const *) override
 
void MovementInform (uint32, uint32) override
 
void OnPossess (bool)
 
bool IsInRoom (const Position *pos, Axis axis, bool above)
 
void Reset () override
 
void JustEngagedWith (Unit *) override
 Called for reaction when initially engaged.
 
void AttackStart (Unit *) override
 
void DoStartMovement (Unit *target, float distance=0.0f, float angle=0.0f)
 
void DoStartNoMovement (Unit *target)
 
void DoStopAttack ()
 
void DoCastSpell (Unit *target, SpellInfo const *spellInfo, bool triggered=false)
 
void DoPlaySoundToSet (WorldObject *source, uint32 soundId)
 
void DoPlayMusic (uint32 soundId, bool zone)
 
void DoAddThreat (Unit *unit, float amount)
 
void DoModifyThreatByPercent (Unit *unit, int32 pct)
 
void DoResetThreat (Unit *unit)
 
void DoResetThreatList ()
 
float DoGetThreat (Unit *unit)
 
void DoTeleportPlayer (Unit *unit, float x, float y, float z, float o)
 
void DoTeleportAll (float x, float y, float z, float o)
 
UnitDoSelectLowestHpFriendly (float range, uint32 minHPDiff=1)
 
std::list< Creature * > DoFindFriendlyCC (float range)
 
std::list< Creature * > DoFindFriendlyMissingBuff (float range, uint32 spellId)
 
PlayerGetPlayerAtMinimumRange (float minRange)
 
CreatureDoSpawnCreature (uint32 entry, float offsetX, float offsetY, float offsetZ, float angle, uint32 type, uint32 despawntime)
 
bool IsUniqueTimedEventDone (uint32 id) const
 
void SetUniqueTimedEventDone (uint32 id)
 
void ResetUniqueTimedEvent (uint32 id)
 
void ClearUniqueTimedEventsDone ()
 
void ScheduleTimedEvent (Milliseconds timerMin, Milliseconds timerMax, std::function< void()> exec, Milliseconds repeatMin, Milliseconds repeatMax=0s, uint32 uniqueId=0)
 
void ScheduleTimedEvent (Milliseconds timerMax, std::function< void()> exec, Milliseconds repeatMin, Milliseconds repeatMax=0s, uint32 uniqueId=0)
 
void ScheduleUniqueTimedEvent (Milliseconds timer, std::function< void()> exec, uint32 uniqueId)
 
bool HealthBelowPct (uint32 pct) const
 
bool HealthAbovePct (uint32 pct) const
 
SpellInfo const * SelectSpell (Unit *target, uint32 school, uint32 mechanic, SelectTargetType targets, uint32 powerCostMin, uint32 powerCostMax, float rangeMin, float rangeMax, SelectEffect effect)
 
void SetEquipmentSlots (bool loadDefault, int32 mainHand=EQUIP_NO_CHANGE, int32 offHand=EQUIP_NO_CHANGE, int32 ranged=EQUIP_NO_CHANGE)
 
void SetCombatMovement (bool allowMovement)
 
bool IsCombatMovementAllowed () const
 
virtual bool CheckEvadeIfOutOfCombatArea () const
 
bool IsHeroic () const
 
Difficulty GetDifficulty () const
 
bool Is25ManRaid () const
 
template<class T >
const T & DUNGEON_MODE (const T &normal5, const T &heroic10) const
 
template<class T >
const T & RAID_MODE (const T &normal10, const T &normal25) const
 
template<class T >
const T & RAID_MODE (const T &normal10, const T &normal25, const T &heroic10, const T &heroic25) const
 
PlayerSelectTargetFromPlayerList (float maxdist, uint32 excludeAura=0, bool mustBeInLOS=false) const
 
- Public Member Functions inherited from CreatureAI
void Talk (uint8 id, WorldObject const *whisperTarget=nullptr, Milliseconds delay=0s)
 Causes the creature to talk/say the text assigned to their entry in the creature_text database table.
 
void Talk (uint8 id, Milliseconds delay)
 
 CreatureAI (Creature *creature)
 
 ~CreatureAI () override
 
void MoveCircleChecks ()
 
void MoveBackwardsChecks ()
 
void MoveInLineOfSight_Safe (Unit *who)
 == Reactions At =================================
 
void TriggerAlert (Unit const *who) const
 
virtual bool CanRespawn ()
 
virtual void EnterEvadeMode (EvadeReason why=EVADE_REASON_OTHER)
 
virtual void JustEngagedWith (Unit *)
 Called for reaction when initially engaged.
 
virtual void JustDied (Unit *)
 
virtual void KilledUnit (Unit *)
 
virtual void JustSummoned (Creature *)
 
virtual void IsSummonedBy (WorldObject *)
 
virtual void SummonedCreatureDespawn (Creature *)
 
virtual void SummonedCreatureDies (Creature *, Unit *)
 
virtual void SummonedCreatureDespawnAll ()
 
virtual void SpellHit (Unit *, SpellInfo const *)
 
virtual void SpellHitTarget (Unit *, SpellInfo const *)
 
virtual void AttackedBy (Unit *)
 
virtual bool IsEscorted ()
 
virtual void JustRespawned ()
 
virtual void MovementInform (uint32, uint32)
 
virtual void PathEndReached (uint32)
 
void OnCharmed (bool apply) override
 
virtual void JustReachedHome ()
 
void DoZoneInCombat (Creature *creature=nullptr, float maxRangeToNearestTarget=250.0f)
 
virtual void ReceiveEmote (Player *, uint32)
 
virtual void OwnerAttackedBy (Unit *)
 
virtual void OwnerAttacked (Unit *)
 
virtual void CorpseRemoved (uint32 &)
 == Triggered Actions Requested ==================
 
virtual void PassengerBoarded (Unit *, int8, bool)
 == Fields =======================================
 
virtual bool BeforeSpellClick (Unit *)
 
virtual void OnSpellClick (Unit *, bool &)
 
virtual bool CanSeeAlways (WorldObject const *)
 
virtual bool CanBeSeen (Player const *)
 
virtual bool CanAlwaysBeDetectable (WorldObject const *)
 
virtual void PetStopAttack ()
 
virtual bool CheckInRoom ()
 
CreatureBoundary const * GetBoundary () const
 
void SetBoundary (CreatureBoundary const *boundary, bool negativeBoundaries=false)
 
bool IsInBoundary (Position const *who=nullptr) const
 
virtual void CalculateThreat (Unit *, float &, SpellInfo const *)
 
virtual bool OnTeleportUnreacheablePlayer (Player *)
 
- Public Member Functions inherited from UnitAI
 UnitAI (Unit *unit)
 
virtual ~UnitAI ()
 
virtual bool CanAIAttack (Unit const *) const
 
virtual void AttackStart (Unit *)
 
virtual void UpdateAI (uint32)=0
 
virtual void InitializeAI ()
 
virtual void Reset ()
 
virtual void OnCharmed (bool apply)=0
 
virtual void DoAction (int32)
 
virtual uint32 GetData (uint32) const
 
virtual void SetData (uint32, uint32)
 
virtual void SetGUID (ObjectGuid, int32=0)
 
virtual ObjectGuid GetGUID (int32=0) const
 
UnitSelectTarget (SelectTargetMethod targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
 
template<class PREDICATE >
UnitSelectTarget (SelectTargetMethod targetType, uint32 position, PREDICATE const &predicate)
 
void SelectTargetList (std::list< Unit * > &targetList, uint32 num, SelectTargetMethod targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
 
template<class PREDICATE >
void SelectTargetList (std::list< Unit * > &targetList, uint32 num, SelectTargetMethod targetType, uint32 position, PREDICATE const &predicate)
 
virtual void JustEnteredCombat (Unit *)
 Called when the unit enters combat (NOTE: Creature engage logic should NOT be here, but in JustEngagedWith, which happens once threat is established!)
 
virtual void JustExitedCombat ()
 Called when the unit leaves combat.
 
virtual void DamageDealt (Unit *, uint32 &, DamageEffectType)
 
virtual void DamageTaken (Unit *, uint32 &, DamageEffectType, SpellSchoolMask)
 
virtual void HealReceived (Unit *, uint32 &)
 
virtual void OnPowerUpdate (Powers, int32, int32, uint32)
 
virtual void HealDone (Unit *, uint32 &)
 
virtual void OnCalculateMeleeDamageReceived (uint32 &, Unit *)
 
virtual void OnCalculateSpellDamageReceived (int32 &, Unit *)
 
virtual void OnCalculatePeriodicTickReceived (uint32 &, Unit *)
 
void AttackStartCaster (Unit *victim, float dist)
 
SpellCastResult DoAddAuraToAllHostilePlayers (uint32 spellid)
 
SpellCastResult DoCast (uint32 spellId)
 
SpellCastResult DoCast (Unit *victim, uint32 spellId, bool triggered=false)
 
SpellCastResult DoCastSelf (uint32 spellId, bool triggered=false)
 
SpellCastResult DoCastToAllHostilePlayers (uint32 spellid, bool triggered=false)
 
SpellCastResult DoCastVictim (uint32 spellId, bool triggered=false)
 
SpellCastResult DoCastAOE (uint32 spellId, bool triggered=false)
 
SpellCastResult DoCastRandomTarget (uint32 spellId, uint32 threatTablePosition=0, float dist=0.0f, bool playerOnly=true, bool triggered=false)
 
SpellCastResult DoCastMaxThreat (uint32 spellId, uint32 threatTablePosition=0, float dist=0.0f, bool playerOnly=true, bool triggered=false)
 Cast spell on the max threat target, which may not always be the current victim.
 
float DoGetSpellMaxRange (uint32 spellId, bool positive=false)
 
void DoMeleeAttackIfReady ()
 
bool DoSpellAttackIfReady (uint32 spell)
 
void DoSpellAttackToRandomTargetIfReady (uint32 spell, uint32 threatTablePosition=0, float dist=0.f, bool playerOnly=true)
 
virtual void SummonMovementInform (Creature *, uint32, uint32)
 
virtual void sGossipHello (Player *)
 
virtual void sGossipSelect (Player *, uint32, uint32)
 
virtual void sGossipSelectCode (Player *, uint32, uint32, char const *)
 
virtual void sQuestAccept (Player *, Quest const *)
 
virtual void sQuestSelect (Player *, Quest const *)
 
virtual void sQuestComplete (Player *, Quest const *)
 
virtual void sQuestReward (Player *, Quest const *, uint32)
 
virtual void sOnGameEvent (bool, uint16)
 
virtual std::string GetDebugInfo () const
 

Public Attributes

InstanceScriptpInstance
 
SummonList summons
 
bool eventInRun
 
EventMap actionEvents
 
EventMap combatEvents
 
uint8 waveGroupId
 
uint8 waveKillCount
 
uint8 timeRiftId
 
- Public Attributes inherited from ScriptedAI
Creatureme
 
bool IsFleeing
 

Additional Inherited Members

- Public Types inherited from ScriptedAI
enum class  Axis {
  AXIS_X ,
  AXIS_Y
}
 
- Public Types inherited from CreatureAI
enum  EvadeReason {
  EVADE_REASON_NO_HOSTILES ,
  EVADE_REASON_BOUNDARY ,
  EVADE_REASON_SEQUENCE_BREAK ,
  EVADE_REASON_NO_PATH ,
  EVADE_REASON_OTHER
}
 
- Static Public Member Functions inherited from CreatureAI
static bool IsInBounds (CreatureBoundary const &boundary, Position const *who)
 
- Static Public Member Functions inherited from UnitAI
static void FillAISpellInfo ()
 
- Static Public Attributes inherited from UnitAI
static AISpellInfoTypeAISpellInfo
 
- Protected Member Functions inherited from npc_escortAI
PlayerGetPlayerForEscort ()
 
- Protected Member Functions inherited from CreatureAI
bool UpdateVictim ()
 
bool UpdateVictimWithGaze ()
 
void SetGazeOn (Unit *target)
 
CreatureDoSummon (uint32 entry, Position const &pos, uint32 despawnTime=30000, TempSummonType summonType=TEMPSUMMON_CORPSE_TIMED_DESPAWN)
 
CreatureDoSummon (uint32 entry, WorldObject *obj, float radius=5.0f, uint32 despawnTime=30000, TempSummonType summonType=TEMPSUMMON_CORPSE_TIMED_DESPAWN)
 
CreatureDoSummonFlyer (uint32 entry, WorldObject *obj, float flightZ, float radius=5.0f, uint32 despawnTime=30000, TempSummonType summonType=TEMPSUMMON_CORPSE_TIMED_DESPAWN)
 
virtual void MoveInLineOfSight (Unit *)
 
bool _EnterEvadeMode (EvadeReason why=EVADE_REASON_OTHER)
 
- Protected Attributes inherited from CreatureAI
Creature *const me
 
EventMap events
 
TaskScheduler scheduler
 
CreatureBoundary const * _boundary
 
bool _negateBoundary
 
- Protected Attributes inherited from UnitAI
Unit *const me
 

Detailed Description

Constructor & Destructor Documentation

◆ npc_arthasAI()

npc_arthas::npc_arthasAI::npc_arthasAI ( Creature creature)
inline
370 : npc_escortAI(creature), summons(me)
371 {
372 pInstance = creature->GetInstanceScript();
373 }
Creature * me
Definition: ScriptedCreature.h:282
Definition: ScriptedEscortAI.h:53
InstanceScript * GetInstanceScript() const
Definition: Object.cpp:1192
InstanceScript * pInstance
Definition: culling_of_stratholme.cpp:375
SummonList summons
Definition: culling_of_stratholme.cpp:376

References WorldObject::GetInstanceScript(), and pInstance.

Member Function Documentation

◆ DoAction()

void npc_arthas::npc_arthasAI::DoAction ( int32  param)
inlineoverridevirtual

Reimplemented from UnitAI.

413 {
414 if (param == ACTION_START_EVENT)
415 {
416 // Event
417 eventInRun = true;
419 }
420 else if (param == ACTION_START_CITY)
421 {
424 SetRun(false);
425 eventInRun = true;
426
429 }
430 else if (param == ACTION_KILLED_SALRAMM)
431 {
432 waveGroupId = 10;
433 eventInRun = true;
434 SetRun(true);
436 }
437 else if (param == ACTION_START_TOWN_HALL)
438 {
440 SetEscortPaused(false);
441 SetRun(false);
442
444 {
445 cr->AI()->DoAction(ACTION_FORCE_CHANGE_LOCK);
446 }
448 {
449 cr->AI()->DoAction(ACTION_FORCE_CHANGE_LOCK);
450 }
452 {
453 cr->AI()->DoAction(ACTION_FORCE_CHANGE_LOCK);
454 }
455 }
456 else if (param == ACTION_START_SECRET_PASSAGE)
457 {
459 SetEscortPaused(false);
460 SetRun(false);
461 }
462 else if (param == ACTION_START_LAST_CITY)
463 {
465 SetEscortPaused(false);
466 SetRun(true);
467 }
468 else if (param == ACTION_START_MALGANIS)
469 {
472 {
473 summons.Despawn(cr);
474 summons.Summon(cr);
475 cr->SetImmuneToAll(true);
476 cr->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
477 }
479 SetEscortPaused(false);
480 SetRun(true);
481 }
482 else if (param == ACTION_KILLED_MALGANIS)
483 {
485 eventInRun = true;
487 me->SetFacingTo(1.84f);
488
489 if (!me->GetMap()->GetPlayers().IsEmpty())
490 if (Player* player = me->GetMap()->GetPlayers().getFirst()->GetSource())
491 player->RewardPlayerAndGroupAtEvent(31006, player); // Malganis quest entry required
492 }
493 }
@ UNIT_FLAG_NON_ATTACKABLE
Definition: Unit.h:449
@ ACTION_START_EVENT
Definition: chapter5.cpp:193
@ SAY_PHASE201
Definition: culling_of_stratholme.cpp:43
@ SAY_PHASE501
Definition: culling_of_stratholme.cpp:74
@ SAY_PHASE401
Definition: culling_of_stratholme.cpp:65
@ SAY_PHASE404
Definition: culling_of_stratholme.cpp:68
@ SAY_PHASE301
Definition: culling_of_stratholme.cpp:51
@ ACTION_FORCE_CHANGE_LOCK
Definition: culling_of_stratholme.cpp:173
@ NPC_CITY_MAN
Definition: culling_of_stratholme.cpp:131
@ NPC_CITY_MAN2
Definition: culling_of_stratholme.cpp:132
@ NPC_CITY_MAN4
Definition: culling_of_stratholme.cpp:134
@ NPC_CITY_MAN3
Definition: culling_of_stratholme.cpp:133
@ EVENT_ACTION_PHASE2
Definition: culling_of_stratholme.cpp:183
@ EVENT_ACTION_PHASE5
Definition: culling_of_stratholme.cpp:185
@ EVENT_ACTION_PHASE1
Definition: culling_of_stratholme.cpp:182
@ ACTION_START_CITY
Definition: culling_of_stratholme.h:142
@ ACTION_START_LAST_CITY
Definition: culling_of_stratholme.h:146
@ ACTION_START_TOWN_HALL
Definition: culling_of_stratholme.h:144
@ ACTION_KILLED_SALRAMM
Definition: culling_of_stratholme.h:143
@ ACTION_KILLED_MALGANIS
Definition: culling_of_stratholme.h:149
@ ACTION_START_SECRET_PASSAGE
Definition: culling_of_stratholme.h:145
@ ACTION_START_MALGANIS
Definition: culling_of_stratholme.h:148
@ NPC_MAL_GANIS
Definition: culling_of_stratholme.h:52
@ EVENT_SRC_HALL_CITYMAN1
Definition: culling_of_stratholme.h:114
@ EVENT_SRC_HALL_CITYMAN2
Definition: culling_of_stratholme.h:115
@ EVENT_SRC_TOWN_CITYMAN1
Definition: culling_of_stratholme.h:108
@ EVENT_SRC_HALL_CITYMAN3
Definition: culling_of_stratholme.h:116
@ EVENT_SRC_MALGANIS_FINAL
Definition: culling_of_stratholme.h:120
@ EVENT_SRC_TOWN_CITYMAN2
Definition: culling_of_stratholme.h:109
const Position EventPos[]
Definition: culling_of_stratholme.h:160
Talk
Definition: boss_fathomlord_karathress.cpp:25
bool IsEmpty() const
Definition: LinkedList.h:97
FROM * GetSource() const
Definition: Reference.h:97
void ScheduleEvent(uint32 eventId, uint32 time, uint32 group=0, uint32 phase=0)
Definition: EventMap.cpp:56
void Despawn(Creature const *summon)
Definition: ScriptedCreature.h:91
void Summon(Creature const *summon)
Definition: ScriptedCreature.h:90
void DespawnAll(uint32 delay=0)
Definition: ScriptedCreature.cpp:71
void EnterEvadeMode(EvadeReason=EVADE_REASON_OTHER) override
Definition: ScriptedEscortAI.cpp:201
void SetRun(bool on=true)
Definition: ScriptedEscortAI.cpp:428
void SetEscortPaused(bool on)
Definition: ScriptedEscortAI.cpp:523
Definition: Creature.h:46
Map * GetMap() const
Definition: Object.h:517
TempSummon * SummonCreature(uint32 id, const Position &pos, TempSummonType spwtype=TEMPSUMMON_MANUAL_DESPAWN, uint32 despwtime=0, uint32 vehId=0, SummonPropertiesEntry const *properties=nullptr, bool visibleBySummonerOnly=false) const
Definition: Object.cpp:2343
Definition: Player.h:1056
void SetFacingTo(float ori)
Definition: Unit.cpp:20884
PlayerList const & GetPlayers() const
Definition: Map.h:485
MapReference * getFirst()
Definition: MapRefMgr.h:31
uint8 waveGroupId
Definition: culling_of_stratholme.cpp:380
EventMap actionEvents
Definition: culling_of_stratholme.cpp:378
bool eventInRun
Definition: culling_of_stratholme.cpp:377

References ACTION_FORCE_CHANGE_LOCK, ACTION_KILLED_MALGANIS, ACTION_KILLED_SALRAMM, ACTION_START_CITY, ACTION_START_EVENT, ACTION_START_LAST_CITY, ACTION_START_MALGANIS, ACTION_START_SECRET_PASSAGE, ACTION_START_TOWN_HALL, actionEvents, SummonList::Despawn(), SummonList::DespawnAll(), npc_escortAI::EnterEvadeMode(), EVENT_ACTION_PHASE1, EVENT_ACTION_PHASE2, EVENT_ACTION_PHASE5, EVENT_SRC_HALL_CITYMAN1, EVENT_SRC_HALL_CITYMAN2, EVENT_SRC_HALL_CITYMAN3, EVENT_SRC_MALGANIS_FINAL, EVENT_SRC_TOWN_CITYMAN1, EVENT_SRC_TOWN_CITYMAN2, eventInRun, EventPos, MapRefMgr::getFirst(), WorldObject::GetMap(), Map::GetPlayers(), Reference< TO, FROM >::GetSource(), LinkedListHead::IsEmpty(), ScriptedAI::me, NPC_CITY_MAN, NPC_CITY_MAN2, NPC_CITY_MAN3, NPC_CITY_MAN4, NPC_MAL_GANIS, SAY_PHASE201, SAY_PHASE301, SAY_PHASE401, SAY_PHASE404, SAY_PHASE501, EventMap::ScheduleEvent(), npc_escortAI::SetEscortPaused(), Unit::SetFacingTo(), npc_escortAI::SetRun(), SummonList::Summon(), WorldObject::SummonCreature(), summons, UNIT_FLAG_NON_ATTACKABLE, and waveGroupId.

◆ GetEventNpc()

Creature * npc_arthas::npc_arthasAI::GetEventNpc ( uint32  entry)
1199{
1200 for (SummonList::iterator i = summons.begin(); i != summons.end();)
1201 {
1202 Creature* summon = ObjectAccessor::GetCreature(*me, *i);
1203 if (!summon)
1204 summons.erase(i++);
1205 else if (summon->GetEntry() == entry)
1206 return summon;
1207 else
1208 ++i;
1209 }
1210
1211 return nullptr;
1212}
Creature * GetCreature(WorldObject const &u, ObjectGuid const guid)
Definition: ObjectAccessor.cpp:213
iterator erase(iterator i)
Definition: ScriptedCreature.h:70
iterator begin()
Definition: ScriptedCreature.h:50
iterator end()
Definition: ScriptedCreature.h:60
StorageType::iterator iterator
Definition: ScriptedCreature.h:38
uint32 GetEntry() const
Definition: Object.h:109

References SummonList::begin(), SummonList::end(), SummonList::erase(), ObjectAccessor::GetCreature(), Object::GetEntry(), ScriptedAI::me, and summons.

Referenced by UpdateAI(), and WaypointReached().

◆ JustDied()

void npc_arthas::npc_arthasAI::JustDied ( Unit )
inlineoverridevirtual

Reimplemented from npc_escortAI.

393 {
395 if (pInstance)
397 }
@ STATE_ESCORT_ESCORTING
Definition: ScriptedEscortAI.h:47
@ DATA_ARTHAS_REPOSITION
Definition: culling_of_stratholme.h:36
void RemoveEscortState(uint32 escortState)
Definition: ScriptedEscortAI.h:111
virtual void SetData(uint32, uint32)
Definition: ZoneScript.h:53

References DATA_ARTHAS_REPOSITION, pInstance, npc_escortAI::RemoveEscortState(), ZoneScript::SetData(), and STATE_ESCORT_ESCORTING.

◆ JustEngagedWith()

void npc_arthas::npc_arthasAI::JustEngagedWith ( Unit )
overridevirtual

Called for reaction when initially engaged.

Reimplemented from ScriptedAI.

1236{
1238
1239 // Fight
1242}
@ SPELL_ARTHAS_AURA
Definition: culling_of_stratholme.cpp:140
@ EVENT_COMBAT_HEALTH_CHECK
Definition: culling_of_stratholme.cpp:181
@ EVENT_COMBAT_EXORCISM
Definition: culling_of_stratholme.cpp:180
SpellCastResult DoCast(uint32 spellId)
Definition: UnitAI.cpp:177
EventMap combatEvents
Definition: culling_of_stratholme.cpp:379

References EVENT_COMBAT_EXORCISM, EVENT_COMBAT_HEALTH_CHECK, and SPELL_ARTHAS_AURA.

◆ JustSummoned()

void npc_arthas::npc_arthasAI::JustSummoned ( Creature cr)
inlineoverridevirtual

Reimplemented from ScriptedAI.

400 {
401 summons.Summon(cr);
402 }

References SummonList::Summon(), and summons.

◆ ReorderInstance()

void npc_arthas::npc_arthasAI::ReorderInstance ( uint32  data)
1245{
1246 Start(true, true);
1247 SetEscortPaused(true);
1248 SetDespawnAtEnd(false);
1249
1250 switch (data)
1251 {
1253 SetNextWaypoint(9, false);
1255 break;
1259 SetNextWaypoint(12, false);
1261
1263 {
1264 eventInRun = true;
1266 }
1267 else if (data == COS_PROGRESS_KILLED_MEATHOOK)
1268 {
1269 waveGroupId = 4;
1271 }
1272 else // if (data == COS_PROGRESS_KILLED_SALRAMM)
1273 {
1274 if (pInstance)
1277 }
1278 break;
1280 SetNextWaypoint(21, false);
1282 break;
1284 SetNextWaypoint(32, false);
1286 break;
1288 SetNextWaypoint(46, false);
1290 break;
1292 SetNextWaypoint(55, false);
1294 break;
1295 }
1296
1297 if (data >= COS_PROGRESS_KILLED_EPOCH)
1298 if (pInstance)
1300 pGate->SetGoState(GO_STATE_READY);
1301
1303}
@ GO_STATE_READY
Definition: GameObjectData.h:691
@ REACT_DEFENSIVE
Definition: Unit.h:1036
@ UNIT_NPC_FLAG_GOSSIP
Definition: Unit.h:516
@ NPC_MEATHOOK
Definition: culling_of_stratholme.h:49
@ DATA_SHKAF_GATE
Definition: culling_of_stratholme.h:43
@ COS_PROGRESS_REACHED_TOWN_HALL
Definition: culling_of_stratholme.h:132
@ COS_PROGRESS_KILLED_EPOCH
Definition: culling_of_stratholme.h:133
@ COS_PROGRESS_LAST_CITY
Definition: culling_of_stratholme.h:134
@ COS_PROGRESS_KILLED_MEATHOOK
Definition: culling_of_stratholme.h:130
@ COS_PROGRESS_FINISHED_CITY_INTRO
Definition: culling_of_stratholme.h:129
@ COS_PROGRESS_FINISHED_INTRO
Definition: culling_of_stratholme.h:128
@ COS_PROGRESS_KILLED_SALRAMM
Definition: culling_of_stratholme.h:131
@ COS_PROGRESS_BEFORE_MALGANIS
Definition: culling_of_stratholme.h:135
@ WORLDSTATE_WAVE_COUNT
Definition: culling_of_stratholme.h:80
@ DATA_SHOW_INFINITE_TIMER
Definition: culling_of_stratholme.h:35
void RescheduleEvent(uint32 eventId, uint32 time, uint32 groupId=0, uint32 phase=0)
Definition: EventMap.cpp:81
void Start(bool isActiveAttacker=true, bool run=false, ObjectGuid playerGUID=ObjectGuid::Empty, Quest const *quest=nullptr, bool instantRespawn=false, bool canLoopPath=false, bool resetWaypoints=true)
Definition: ScriptedEscortAI.cpp:449
void SetDespawnAtEnd(bool despawn)
Definition: ScriptedEscortAI.h:104
bool SetNextWaypoint(uint32 pointId, float x, float y, float z, float orientation)
Definition: ScriptedEscortAI.cpp:534
void SetReactState(ReactStates st)
Definition: Creature.h:90
Definition: GameObject.h:122
void SetNpcFlag(NPCFlags flags)
Definition: Unit.h:1661
ObjectGuid GetGuidData(uint32 type) const override
Definition: InstanceScript.cpp:94
Map * instance
Definition: InstanceScript.h:147
void DoUpdateWorldState(uint32 worldstateId, uint32 worldstateValue)
Definition: InstanceScript.cpp:576
GameObject * GetGameObject(ObjectGuid const guid)
Definition: Map.cpp:3312
void DoAction(int32 param) override
Definition: culling_of_stratholme.cpp:412
void SendNextWave(uint32 entry)
Definition: culling_of_stratholme.cpp:1305

References ACTION_KILLED_SALRAMM, COS_PROGRESS_BEFORE_MALGANIS, COS_PROGRESS_FINISHED_CITY_INTRO, COS_PROGRESS_FINISHED_INTRO, COS_PROGRESS_KILLED_EPOCH, COS_PROGRESS_KILLED_MEATHOOK, COS_PROGRESS_KILLED_SALRAMM, COS_PROGRESS_LAST_CITY, COS_PROGRESS_REACHED_TOWN_HALL, DATA_SHKAF_GATE, DATA_SHOW_INFINITE_TIMER, EVENT_ACTION_PHASE2, GO_STATE_READY, NPC_MEATHOOK, REACT_DEFENSIVE, UNIT_NPC_FLAG_GOSSIP, and WORLDSTATE_WAVE_COUNT.

Referenced by Reset().

◆ Reset()

void npc_arthas::npc_arthasAI::Reset ( )
inlineoverridevirtual

Reimplemented from ScriptedAI.

496 {
500 eventInRun = false;
501 waveGroupId = 0;
502 waveKillCount = 0;
503 timeRiftId = 0;
504
506
507 if (pInstance)
508 {
511 if (data >= COS_PROGRESS_FINISHED_INTRO)
512 ReorderInstance(data);
513 }
514 }
std::uint32_t uint32
Definition: Define.h:108
@ DATA_ARTHAS_EVENT
Definition: culling_of_stratholme.h:28
void Reset()
Definition: EventMap.cpp:21
void RemoveNpcFlag(NPCFlags flags)
Definition: Unit.h:1662
virtual uint32 GetData(uint32) const
Definition: ZoneScript.h:52
uint8 waveKillCount
Definition: culling_of_stratholme.cpp:381
uint8 timeRiftId
Definition: culling_of_stratholme.cpp:382
void ReorderInstance(uint32 data)
Definition: culling_of_stratholme.cpp:1244

References actionEvents, combatEvents, COS_PROGRESS_FINISHED_INTRO, DATA_ARTHAS_EVENT, DATA_ARTHAS_REPOSITION, SummonList::DespawnAll(), eventInRun, ZoneScript::GetData(), ScriptedAI::me, pInstance, Unit::RemoveNpcFlag(), ReorderInstance(), EventMap::Reset(), ZoneScript::SetData(), summons, timeRiftId, UNIT_NPC_FLAG_GOSSIP, waveGroupId, and waveKillCount.

◆ ScheduleNextEvent()

void npc_arthas::npc_arthasAI::ScheduleNextEvent ( uint32  currentEvent,
uint32  time 
)
1215{
1216 actionEvents.ScheduleEvent(currentEvent + 1, time);
1217}

Referenced by UpdateAI().

◆ SendNextWave()

void npc_arthas::npc_arthasAI::SendNextWave ( uint32  entry)
1306{
1307 if (!pInstance)
1308 return;
1309
1310 if (entry == NPC_MEATHOOK)
1311 {
1312 waveKillCount = 4;
1314 }
1315 else if (entry == NPC_SALRAMM)
1316 {
1318 return;
1319 }
1320
1321 // Group is killed
1322 if (++waveKillCount >= 4)
1323 {
1324 waveGroupId++;
1325 if (waveGroupId == 4) // Meathook
1327 else if (waveGroupId == 9) // Salramm
1329 else
1331
1333 }
1334}
@ NPC_SALRAMM
Definition: culling_of_stratholme.h:50
@ EVENT_SRC_SALRAMM
Definition: culling_of_stratholme.h:113
@ EVENT_SRC_MEATHOOK
Definition: culling_of_stratholme.h:112
void SummonNextWave()
Definition: culling_of_stratholme.cpp:1219

References COS_PROGRESS_KILLED_MEATHOOK, COS_PROGRESS_KILLED_SALRAMM, DATA_ARTHAS_EVENT, EVENT_SRC_MEATHOOK, EVENT_SRC_SALRAMM, EventPos, NPC_MEATHOOK, NPC_SALRAMM, and WORLDSTATE_WAVE_COUNT.

Referenced by SummonedCreatureDies().

◆ SpawnTimeRift()

void npc_arthas::npc_arthasAI::SpawnTimeRift ( )
1337{
1338 if (timeRiftId >= 5)
1339 return;
1340
1342 {
1343 // Spawn everyone at time rift pos
1345 {
1346 if (cr->GetEntry() == NPC_TIME_RIFT)
1347 cr->DespawnOrUnsummon(10000);
1348 else // x, y, z (0 is entry)
1349 {
1350 // first infinite
1351 if (i == 1)
1352 AttackStart(cr);
1353
1354 cr->SetInCombatWithZone();
1355 cr->AddThreat(me, 0.0f);
1356 cr->SetReactState(REACT_AGGRESSIVE);
1358 }
1359 }
1360 }
1361
1362 timeRiftId++;
1363}
std::uint8_t uint8
Definition: Define.h:110
@ REACT_AGGRESSIVE
Definition: Unit.h:1037
@ POINT_CHRONOS
Definition: culling_of_stratholme.cpp:175
@ ENCOUNTER_CHRONO_MAX_SPAWNS_FIRST
Definition: culling_of_stratholme.cpp:169
@ ENCOUNTER_CHRONO_MAX_SPAWNS_SECOND
Definition: culling_of_stratholme.cpp:170
float RiftAndSpawnsLocations[ENCOUNTER_CHRONO_NUMBER][ENCOUNTER_CHRONO_MAX_SPAWNS_FIRST][5]
Definition: culling_of_stratholme.cpp:242
@ NPC_TIME_RIFT
Definition: culling_of_stratholme.h:59
void AttackStart(Unit *who) override
Definition: ScriptedEscortAI.cpp:52

References ENCOUNTER_CHRONO_MAX_SPAWNS_FIRST, ENCOUNTER_CHRONO_MAX_SPAWNS_SECOND, NPC_TIME_RIFT, POINT_CHRONOS, REACT_AGGRESSIVE, RiftAndSpawnsLocations, and WorldObject::SummonCreature().

Referenced by WaypointReached().

◆ SummonedCreatureDespawn()

void npc_arthas::npc_arthasAI::SummonedCreatureDespawn ( Creature cr)
inlineoverridevirtual

Reimplemented from ScriptedAI.

404{ summons.Despawn(cr); }

References SummonList::Despawn(), and summons.

◆ SummonedCreatureDies()

◆ SummonNextWave()

void npc_arthas::npc_arthasAI::SummonNextWave ( )
1220{
1221 Map::PlayerList const& PlayerList = me->GetMap()->GetPlayers();
1222 if (!PlayerList.IsEmpty())
1223 for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
1224 i->GetSource()->PlayerTalkClass->SendPointOfInterest(1000 + waveGroupId);
1225
1226 waveKillCount = 0; // this is forced condition!
1227 uint32 tableId = waveGroupId;
1228 if (tableId > 4)
1229 tableId--;
1230
1231 for (uint32 i = 0; i < ENCOUNTER_WAVES_MAX_SPAWNS; ++i)
1232 me->SummonCreature(/*entry*/(uint32)WavesLocations[tableId][i][0], WavesLocations[tableId][i][1], WavesLocations[tableId][i][2], WavesLocations[tableId][i][3], WavesLocations[tableId][i][4]);
1233}
@ ENCOUNTER_WAVES_MAX_SPAWNS
Definition: culling_of_stratholme.cpp:165
float WavesLocations[ENCOUNTER_WAVES_NUMBER][ENCOUNTER_WAVES_MAX_SPAWNS][5]
Definition: culling_of_stratholme.cpp:189
Definition: LinkedList.h:139
Definition: MapRefMgr.h:26
iterator begin()
Definition: MapRefMgr.h:36
iterator end()
Definition: MapRefMgr.h:37

References MapRefMgr::begin(), ENCOUNTER_WAVES_MAX_SPAWNS, MapRefMgr::end(), LinkedListHead::IsEmpty(), and WavesLocations.

Referenced by UpdateAI().

◆ UpdateAI()

void npc_arthas::npc_arthasAI::UpdateAI ( uint32  diff)
inlineoverridevirtual

Reimplemented from npc_escortAI.

665 {
667
668 if (eventInRun)
669 {
670 actionEvents.Update(diff);
671 switch (uint32 currentEvent = actionEvents.ExecuteEvent())
672 {
674 SetRun(false);
677 {
679 uther->SetTarget(me->GetGUID());
680 me->SetTarget(uther->GetGUID());
681 }
682 for (int i = 0; i < 3; ++i)
684 horse->GetMotionMaster()->MovePoint(0, EventPos[EVENT_DST_HORSE1 + i], false);
685
686 ScheduleNextEvent(currentEvent, 4000);
687 break;
688 case EVENT_ACTION_PHASE1+1:
689 // Start Event
690 Start(true, false);
691 SetDespawnAtEnd(false);
692
693 ScheduleNextEvent(currentEvent, 9000);
694 break;
695 // After waypoint 0
696 case EVENT_ACTION_PHASE1+2:
698 ScheduleNextEvent(currentEvent, 2000);
699 break;
700 case EVENT_ACTION_PHASE1+3:
701 if (Creature* uther = GetEventNpc(NPC_UTHER))
702 uther->AI()->Talk(SAY_PHASE102);
703
704 ScheduleNextEvent(currentEvent, 8000);
705 break;
706 case EVENT_ACTION_PHASE1+4:
707 SetEscortPaused(false);
708 eventInRun = false;
710 ScheduleNextEvent(currentEvent, 2000);
711 break;
712 // After waypoint 1
713 case EVENT_ACTION_PHASE1+5:
714 if (Creature* jaina = GetEventNpc(NPC_JAINA))
715 jaina->SetTarget(me->GetGUID());
716
718 ScheduleNextEvent(currentEvent, 10000);
719 break;
720 case EVENT_ACTION_PHASE1+6:
721 if (Creature* uther = GetEventNpc(NPC_UTHER))
722 uther->AI()->Talk(SAY_PHASE105);
723
724 ScheduleNextEvent(currentEvent, 1000);
725 break;
726 case EVENT_ACTION_PHASE1+7:
728 ScheduleNextEvent(currentEvent, 4000);
729 break;
730 case EVENT_ACTION_PHASE1+8:
731 if (Creature* uther = GetEventNpc(NPC_UTHER))
732 uther->AI()->Talk(SAY_PHASE107);
733
734 ScheduleNextEvent(currentEvent, 6000);
735 break;
736 case EVENT_ACTION_PHASE1+9:
738 ScheduleNextEvent(currentEvent, 4000);
739 break;
740 case EVENT_ACTION_PHASE1+10:
741 if (Creature* uther = GetEventNpc(NPC_UTHER))
742 uther->AI()->Talk(SAY_PHASE109);
743
744 ScheduleNextEvent(currentEvent, 8000);
745 break;
746 case EVENT_ACTION_PHASE1+11:
748 ScheduleNextEvent(currentEvent, 4000);
749 break;
750 case EVENT_ACTION_PHASE1+12:
751 if (Creature* uther = GetEventNpc(NPC_UTHER))
752 uther->AI()->Talk(SAY_PHASE111);
753
754 ScheduleNextEvent(currentEvent, 4000);
755 break;
756 case EVENT_ACTION_PHASE1+13:
758 ScheduleNextEvent(currentEvent, 11000);
759 break;
760 case EVENT_ACTION_PHASE1+14:
761 if (Creature* jaina = GetEventNpc(NPC_JAINA))
762 jaina->AI()->Talk(SAY_PHASE113);
763
764 ScheduleNextEvent(currentEvent, 2500);
765 break;
766 case EVENT_ACTION_PHASE1+15:
768 ScheduleNextEvent(currentEvent, 9000);
769 break;
770 case EVENT_ACTION_PHASE1+16:
771 if (Creature* uther = GetEventNpc(NPC_UTHER))
772 uther->AI()->Talk(SAY_PHASE115);
773
774 ScheduleNextEvent(currentEvent, 4000);
775 break;
776 case EVENT_ACTION_PHASE1+17:
777 for (SummonList::const_iterator i = summons.begin(); i != summons.end(); ++i)
778 {
780 if (summon && summon->GetEntry() == NPC_HORSE_ESCORT)
782 }
783
784 ScheduleNextEvent(currentEvent, 1000);
785 break;
786 case EVENT_ACTION_PHASE1+18:
787 if (Creature* uther = GetEventNpc(NPC_UTHER))
788 {
789 uther->SetTarget();
790 uther->AddUnitMovementFlag(MOVEMENTFLAG_WALKING);
791 uther->GetMotionMaster()->MovePoint(0, EventPos[EVENT_POS_RETREAT], false);
792 }
793 ScheduleNextEvent(currentEvent, 1000);
794 break;
795 case EVENT_ACTION_PHASE1+19:
796 if (Creature* jaina = GetEventNpc(NPC_JAINA))
797 {
798 jaina->SetTarget();
799 jaina->AddUnitMovementFlag(MOVEMENTFLAG_WALKING);
800 jaina->GetMotionMaster()->MovePoint(0, EventPos[EVENT_POS_RETREAT], false);
801 }
803 ScheduleNextEvent(currentEvent, 2000);
804 break;
805 case EVENT_ACTION_PHASE1+20:
806 if (Creature* jaina = GetEventNpc(NPC_JAINA))
807 {
808 jaina->GetMotionMaster()->MoveIdle();
809 jaina->AI()->Talk(SAY_PHASE117);
810 }
811
812 ScheduleNextEvent(currentEvent, 2000);
813 break;
814 case EVENT_ACTION_PHASE1+21:
815 if (Creature* jaina = GetEventNpc(NPC_JAINA))
816 {
817 jaina->AddUnitMovementFlag(MOVEMENTFLAG_WALKING);
818 jaina->GetMotionMaster()->MovePoint(0, EventPos[EVENT_POS_RETREAT], false);
819 }
821 ScheduleNextEvent(currentEvent, 4000);
822 break;
823 case EVENT_ACTION_PHASE1+22:
824 SetEscortPaused(false);
825 eventInRun = false;
826 me->SetTarget();
827 // dont schedule next, do it in gossip select!
828 break;
829 //After Gossip 1 (waypoint 8)
831 summons.DespawnEntry(NPC_INVIS_TARGET); // remove trigger
832 me->SetTarget();
833 SetEscortPaused(false);
834 eventInRun = false;
835 ScheduleNextEvent(currentEvent, 1000);
836 break;
837 // After waypoint 9
838 case EVENT_ACTION_PHASE2+1:
839 if (Creature* cityman = GetEventNpc(NPC_CITY_MAN))
840 {
841 cityman->AI()->Talk(SAY_PHASE202);
842 cityman->SetTarget(me->GetGUID());
843 cityman->AddUnitMovementFlag(MOVEMENTFLAG_WALKING);
844 cityman->GetMotionMaster()->MovePoint(0, EventPos[EVENT_DST_CITYMAN]);
845 }
846
847 ScheduleNextEvent(currentEvent, 9000);
848 break;
849 case EVENT_ACTION_PHASE2+2:
851 SetEscortPaused(false);
852 eventInRun = false;
853 ScheduleNextEvent(currentEvent, 1500);
854 break;
855 // After waypoint 11
856 case EVENT_ACTION_PHASE2+3:
857 if (Creature* stalker = me->SummonCreature(NPC_INVIS_TARGET, 2081.447f, 1287.770f, 141.3241f, 1.37f, TEMPSUMMON_TIMED_DESPAWN, 10000))
858 {
859 me->SetFacingToObject(stalker);
860 stalker->DespawnOrUnsummon(500);
861 }
863 ScheduleNextEvent(currentEvent, 4000);
864 break;
865 case EVENT_ACTION_PHASE2+4:
867 {
868 malganis->CastSpell(malganis, SPELL_MALGANIS_APPEAR, true);
869 malganis->AI()->Talk(SAY_PHASE206);
870 malganis->SetTarget(me->GetGUID());
871 me->SetTarget(malganis->GetGUID());
872 malganis->SetReactState(REACT_PASSIVE);
873
874 std::list<Creature*> unitList;
875 malganis->GetCreaturesWithEntryInRange(unitList, 20.0f, NPC_CITY_MAN);
876 malganis->GetCreaturesWithEntryInRange(unitList, 20.0f, NPC_CITY_MAN2);
877
878 for (std::list<Creature*>::const_iterator itr = unitList.begin(); itr != unitList.end(); ++itr)
879 if ((*itr)->ToCreature())
880 {
881 (*itr)->ToCreature()->AI()->DoAction(ACTION_INFECT_CITIZIEN);
882 (*itr)->GetMotionMaster()->MoveFleeing(malganis, 2000);
883 }
884
885 unitList.clear();
886 }
887
888 ScheduleNextEvent(currentEvent, 12000);
889 break;
890 case EVENT_ACTION_PHASE2+5:
891 if (Creature* malganis = GetEventNpc(NPC_MAL_GANIS))
892 malganis->AI()->Talk(SAY_PHASE207);
893
894 ScheduleNextEvent(currentEvent, 15000);
895 break;
896 case EVENT_ACTION_PHASE2+6:
897 if (Creature* malganis = GetEventNpc(NPC_MAL_GANIS))
898 {
899 me->SetTarget();
900 me->SetFacingToObject(malganis);
901 malganis->SetVisible(false);
902 }
903
905 ScheduleNextEvent(currentEvent, 11000);
906 break;
907 case EVENT_ACTION_PHASE2+7:
913 ScheduleNextEvent(currentEvent, 20000);
914 if (pInstance)
916 break;
917 case EVENT_ACTION_PHASE2+8:
918 if (pInstance)
920
922 break;
923 case EVENT_ACTION_PHASE2+9:
924 if (pInstance)
926
928 eventInRun = false;
929 SetEscortPaused(false);
930 break;
931 // After waypoint 22
935 cr->SetTarget(me->GetGUID());
937 cr->SetTarget(me->GetGUID());
939 cr->SetTarget(me->GetGUID());
940 ScheduleNextEvent(currentEvent, 1000);
941 break;
942 case EVENT_ACTION_PHASE3+1:
945 cr->AI()->Talk(SAY_PHASE302);
946
947 ScheduleNextEvent(currentEvent, 7000);
948 break;
949 case EVENT_ACTION_PHASE3+2:
951 SetEscortPaused(false);
952 eventInRun = false;
953 ScheduleNextEvent(currentEvent, 0);
954 break;
955 //After waypoint 23
956 case EVENT_ACTION_PHASE3+3:
957 SetRun(true);
960 ScheduleNextEvent(currentEvent, 2000);
961 break;
962 case EVENT_ACTION_PHASE3+4:
964 ScheduleNextEvent(currentEvent, 2000);
965 break;
966 case EVENT_ACTION_PHASE3+5:
968 cr->AI()->Talk(SAY_PHASE305);
969 ScheduleNextEvent(currentEvent, 1000);
970 break;
971 case EVENT_ACTION_PHASE3+6:
973 {
974 cr->UpdateEntry(NPC_INFINITE_HUNTER, nullptr, false);
975 cr->SetImmuneToAll(true);
976 cr->SetReactState(REACT_PASSIVE);
977 }
978 ScheduleNextEvent(currentEvent, 2000);
979 break;
980 case EVENT_ACTION_PHASE3+7:
982 {
983 cr->UpdateEntry(NPC_INFINITE_AGENT, nullptr, false);
984 cr->SetImmuneToAll(true);
985 cr->SetReactState(REACT_PASSIVE);
986 }
987 ScheduleNextEvent(currentEvent, 2000);
988 break;
989 case EVENT_ACTION_PHASE3+8:
991 {
992 cr->UpdateEntry(NPC_INFINITE_ADVERSARY, nullptr, false);
993 cr->SetReactState(REACT_AGGRESSIVE);
994 cr->SetInCombatWithZone();
995 cr->AddThreat(me, 0.0f);
996 }
997 if (Creature* cr = GetEventNpc(NPC_INFINITE_AGENT)) // it is infinite agent now :)
998 {
999 cr->SetImmuneToAll(false);
1000 cr->SetReactState(REACT_AGGRESSIVE);
1001 cr->SetInCombatWithZone();
1002 cr->AddThreat(me, 0.0f);
1003 }
1004 if (Creature* cr = GetEventNpc(NPC_INFINITE_HUNTER)) // it is infinite hunter now :)
1005 {
1006 cr->SetImmuneToAll(false);
1007 cr->SetReactState(REACT_AGGRESSIVE);
1008 cr->SetInCombatWithZone();
1009 cr->AddThreat(me, 0.0f);
1010 }
1011 ScheduleNextEvent(currentEvent, 2000);
1012 break;
1013 case EVENT_ACTION_PHASE3+9:
1014 // Arthas is fighting infinites in town hall
1015 if (me->IsInCombat())
1016 {
1018 return;
1019 }
1020
1022 me->Say("I can't afford to spare you.", LANG_UNIVERSAL);
1023 me->SetFacingTo(0.0f);
1024 ScheduleNextEvent(currentEvent, 5000);
1025 break;
1026 case EVENT_ACTION_PHASE3+10:
1028 ScheduleNextEvent(currentEvent, 5000);
1029 break;
1030 case EVENT_ACTION_PHASE3+11:
1031 SetEscortPaused(false);
1032 eventInRun = false;
1033 ScheduleNextEvent(currentEvent, 1000);
1034 break;
1035 case EVENT_ACTION_PHASE3+12:
1036 // Arthas is fighting first chronos
1037 if (me->IsInCombat())
1038 {
1040 return;
1041 }
1042
1043 eventInRun = false;
1044 SetEscortPaused(false);
1046 me->SetFacingTo(M_PI);
1047 ScheduleNextEvent(currentEvent, 0);
1048 break;
1049 case EVENT_ACTION_PHASE3+13:
1050 // Arthas is fighting second chronos
1051 if (me->IsInCombat())
1052 {
1054 return;
1055 }
1056
1057 eventInRun = false;
1058 SetEscortPaused(false);
1060 me->SetFacingTo(M_PI * 3 / 2);
1061 ScheduleNextEvent(currentEvent, 0);
1062 break;
1063 case EVENT_ACTION_PHASE3+14:
1064 // Arthas is fighting third chronos
1065 if (me->IsInCombat())
1066 {
1068 return;
1069 }
1070
1071 me->SetFacingTo(M_PI / 2);
1072 ScheduleNextEvent(currentEvent, 8000);
1073 break;
1074 case EVENT_ACTION_PHASE3+15:
1078 {
1079 cr->SetImmuneToAll(true);
1080 cr->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
1081 me->SetTarget(cr->GetGUID());
1082 cr->GetMotionMaster()->MovePoint(0, EventPos[EVENT_DST_EPOCH]);
1083 }
1084
1085 ScheduleNextEvent(currentEvent, 3000);
1086 break;
1087 case EVENT_ACTION_PHASE3+16:
1088 if (Creature* cr = GetEventNpc(NPC_EPOCH))
1089 cr->AI()->Talk(SAY_PHASE314);
1090
1091 ScheduleNextEvent(currentEvent, 14000);
1092 break;
1093 case EVENT_ACTION_PHASE3+17:
1095 ScheduleNextEvent(currentEvent, 7000);
1096 break;
1097 case EVENT_ACTION_PHASE3+18:
1098 if (Creature* cr = GetEventNpc(NPC_EPOCH))
1099 {
1100 cr->SetImmuneToAll(false);
1101 cr->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
1102 cr->SetReactState(REACT_AGGRESSIVE);
1103 cr->AddThreat(me, 0.0f);
1104 cr->SetInCombatWithZone();
1105 }
1106 ScheduleNextEvent(currentEvent, 1000);
1107 break;
1108 case EVENT_ACTION_PHASE3+19:
1109 // Arthas is fighting epoch chronos
1110 if (me->IsInCombat())
1111 {
1113 return;
1114 }
1115
1116 if (pInstance)
1118
1120 eventInRun = false;
1121 break;
1124 {
1125 cr->SetImmuneToAll(false);
1126 cr->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
1127 cr->SetInCombatWithZone();
1128 cr->AddThreat(me, 0.0f);
1129 AttackStart(cr);
1130 }
1131 eventInRun = false;
1132 SetEscortPaused(true);
1133 break;
1134 case EVENT_ACTION_PHASE5+1:
1136 SetEscortPaused(false);
1137 eventInRun = false;
1138 ScheduleNextEvent(currentEvent, 5000);
1139 break;
1140 case EVENT_ACTION_PHASE5+2:
1141 me->SetFacingTo(5.28f);
1143 if (pInstance)
1144 {
1147 go->SetGoState(GO_STATE_ACTIVE);
1148
1149 if (!me->GetMap()->GetPlayers().IsEmpty())
1150 {
1151 if (Player* player = me->GetMap()->GetPlayers().getFirst()->GetSource())
1152 {
1153 if (GameObject* chest = player->SummonGameObject(DUNGEON_MODE(GO_MALGANIS_CHEST_N, GO_MALGANIS_CHEST_H), 2288.35f, 1498.73f, 128.414f, -0.994837f, 0, 0, 0, 0, 0))
1154 {
1155 chest->SetLootRecipient(me->GetMap());
1156 }
1157 }
1158 }
1159 }
1160 ScheduleNextEvent(currentEvent, 10000);
1161 break;
1162 case EVENT_ACTION_PHASE5+3:
1163 eventInRun = false;
1164 me->SetVisible(false);
1165 break;
1166 }
1167 }
1168
1169 //Battling skills
1170 if (!me->GetVictim())
1171 return;
1172
1173 combatEvents.Update(diff);
1175 return;
1176
1177 switch (combatEvents.ExecuteEvent())
1178 {
1180 if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0))
1182
1184 break;
1186 if (HealthBelowPct(40))
1188
1190 break;
1191 }
1192
1194 }
@ GO_STATE_ACTIVE
Definition: GameObjectData.h:690
@ TEMPSUMMON_DEAD_DESPAWN
Definition: Object.h:48
@ TEMPSUMMON_TIMED_DESPAWN
Definition: Object.h:44
@ MOVEMENTFLAG_WALKING
Definition: Unit.h:560
@ REACT_PASSIVE
Definition: Unit.h:1035
@ UNIT_STATE_CASTING
Definition: Unit.h:340
@ NPC_JAINA
Definition: zone_undercity.cpp:419
@ SAY_PHASE210
Definition: culling_of_stratholme.cpp:48
@ SAY_PHASE203
Definition: culling_of_stratholme.cpp:44
@ SAY_PHASE302
Definition: culling_of_stratholme.cpp:105
@ SAY_PHASE105
Definition: culling_of_stratholme.cpp:88
@ SAY_PHASE116
Definition: culling_of_stratholme.cpp:39
@ SAY_PHASE202
Definition: culling_of_stratholme.cpp:99
@ SAY_PHASE109
Definition: culling_of_stratholme.cpp:90
@ SAY_PHASE103
Definition: culling_of_stratholme.cpp:32
@ SAY_PHASE205
Definition: culling_of_stratholme.cpp:45
@ SAY_PHASE111
Definition: culling_of_stratholme.cpp:91
@ SAY_PHASE308
Definition: culling_of_stratholme.cpp:56
@ SAY_PHASE306
Definition: culling_of_stratholme.cpp:54
@ SAY_PHASE315
Definition: culling_of_stratholme.cpp:62
@ SAY_PHASE114
Definition: culling_of_stratholme.cpp:38
@ SAY_PHASE303
Definition: culling_of_stratholme.cpp:52
@ SAY_PHASE311
Definition: culling_of_stratholme.cpp:59
@ SAY_PHASE207
Definition: culling_of_stratholme.cpp:81
@ SAY_PHASE113
Definition: culling_of_stratholme.cpp:95
@ SAY_PHASE209
Definition: culling_of_stratholme.cpp:47
@ SAY_PHASE503
Definition: culling_of_stratholme.cpp:76
@ SAY_PHASE206
Definition: culling_of_stratholme.cpp:80
@ SAY_PHASE112
Definition: culling_of_stratholme.cpp:37
@ SAY_PHASE108
Definition: culling_of_stratholme.cpp:35
@ SAY_PHASE104
Definition: culling_of_stratholme.cpp:33
@ SAY_PHASE117
Definition: culling_of_stratholme.cpp:96
@ SAY_PHASE107
Definition: culling_of_stratholme.cpp:89
@ SAY_PHASE504
Definition: culling_of_stratholme.cpp:77
@ SAY_PHASE101
Definition: culling_of_stratholme.cpp:31
@ SAY_PHASE314
Definition: culling_of_stratholme.cpp:84
@ SAY_PHASE208
Definition: culling_of_stratholme.cpp:46
@ SAY_PHASE102
Definition: culling_of_stratholme.cpp:87
@ SAY_PHASE304
Definition: culling_of_stratholme.cpp:53
@ SAY_PHASE313
Definition: culling_of_stratholme.cpp:61
@ SAY_PHASE110
Definition: culling_of_stratholme.cpp:36
@ SAY_PHASE305
Definition: culling_of_stratholme.cpp:106
@ SAY_PHASE115
Definition: culling_of_stratholme.cpp:92
@ SAY_PHASE106
Definition: culling_of_stratholme.cpp:34
@ ACTION_INFECT_CITIZIEN
Definition: culling_of_stratholme.cpp:172
@ SPELL_MALGANIS_APPEAR
Definition: culling_of_stratholme.cpp:146
@ SPELL_ARTHAS_EXORCISM_N
Definition: culling_of_stratholme.cpp:141
@ SPELL_ARTHAS_CRUSADER_STRIKE
Definition: culling_of_stratholme.cpp:148
@ SPELL_ARTHAS_HOLY_LIGHT
Definition: culling_of_stratholme.cpp:143
@ SPELL_ARTHAS_EXORCISM_H
Definition: culling_of_stratholme.cpp:142
@ NPC_INVIS_TARGET
Definition: culling_of_stratholme.cpp:127
@ NPC_INFINITE_ADVERSARY
Definition: culling_of_stratholme.cpp:122
@ NPC_HORSE_ESCORT
Definition: culling_of_stratholme.cpp:129
@ NPC_INFINITE_AGENT
Definition: culling_of_stratholme.cpp:124
@ NPC_INFINITE_HUNTER
Definition: culling_of_stratholme.cpp:123
@ EVENT_ACTION_PHASE3
Definition: culling_of_stratholme.cpp:184
@ GO_MALGANIS_CHEST_N
Definition: culling_of_stratholme.h:70
@ GO_MALGANIS_CHEST_H
Definition: culling_of_stratholme.h:71
@ NPC_EPOCH
Definition: culling_of_stratholme.h:51
@ NPC_UTHER
Definition: culling_of_stratholme.h:56
@ DATA_EXIT_GATE
Definition: culling_of_stratholme.h:44
@ COS_PROGRESS_FINISHED
Definition: culling_of_stratholme.h:136
@ EVENT_POS_RETREAT
Definition: culling_of_stratholme.h:107
@ EVENT_SRC_UTHER
Definition: culling_of_stratholme.h:98
@ EVENT_DST_HORSE1
Definition: culling_of_stratholme.h:104
@ EVENT_DST_CITYMAN
Definition: culling_of_stratholme.h:110
@ EVENT_SRC_EPOCH
Definition: culling_of_stratholme.h:117
@ EVENT_DST_UTHER
Definition: culling_of_stratholme.h:103
@ EVENT_SRC_MALGANIS
Definition: culling_of_stratholme.h:111
@ EVENT_DST_EPOCH
Definition: culling_of_stratholme.h:118
@ EVENT_SRC_HORSE1
Definition: culling_of_stratholme.h:100
@ EVENT_SRC_JAINA
Definition: culling_of_stratholme.h:99
@ DATA_START_WAVES
Definition: culling_of_stratholme.h:34
@ LANG_UNIVERSAL
Definition: SharedDefines.h:735
uint32 ExecuteEvent()
Definition: EventMap.cpp:114
void Update(uint32 time)
Definition: EventMap.h:54
void RepeatEvent(uint32 time)
Definition: EventMap.cpp:99
void DoMeleeAttackIfReady()
Definition: UnitAI.cpp:39
Unit * SelectTarget(SelectTargetMethod targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
Definition: UnitAI.cpp:110
StorageType::const_iterator const_iterator
Definition: ScriptedCreature.h:39
void DespawnEntry(uint32 entry)
Definition: ScriptedCreature.cpp:54
const T & DUNGEON_MODE(const T &normal5, const T &heroic10) const
Definition: ScriptedCreature.h:400
bool HealthBelowPct(uint32 pct) const
Definition: ScriptedCreature.h:368
void UpdateAI(uint32 diff) override
Definition: ScriptedEscortAI.cpp:240
void SetTarget(ObjectGuid guid=ObjectGuid::Empty) override
Definition: Creature.cpp:3441
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:106
GameObject * SummonGameObject(uint32 entry, float x, float y, float z, float ang, float rotation0, float rotation1, float rotation2, float rotation3, uint32 respawnTime, bool checkTransport=true, GOSummonType summonType=GO_SUMMON_TIMED_OR_CORPSE_DESPAWN)
Definition: Object.cpp:2357
Definition: Unit.h:1302
void SetVisible(bool x)
Definition: Unit.cpp:14220
virtual void Say(std::string_view text, Language language, WorldObject const *target=nullptr)
Definition: Unit.cpp:21420
MotionMaster * GetMotionMaster()
Definition: Unit.h:2276
void SetFacingToObject(WorldObject *object)
Definition: Unit.cpp:20894
SpellCastResult CastSpell(SpellCastTargets const &targets, SpellInfo const *spellInfo, CustomSpellValues const *value, TriggerCastFlags triggerFlags=TRIGGERED_NONE, Item *castItem=nullptr, AuraEffect const *triggeredByAura=nullptr, ObjectGuid originalCaster=ObjectGuid::Empty)
Definition: Unit.cpp:1169
Unit * GetVictim() const
Definition: Unit.h:1398
bool HasUnitState(const uint32 f) const
Definition: Unit.h:1410
void SetImmuneToAll(bool apply, bool keepCombat=false)
Definition: Unit.h:1692
bool IsInCombat() const
Definition: Unit.h:1702
void MovePoint(uint32 id, const Position &pos, bool generatePath=true, bool forceDestination=true)
Definition: MotionMaster.h:211
void ScheduleNextEvent(uint32 currentEvent, uint32 time)
Definition: culling_of_stratholme.cpp:1214
Creature * GetEventNpc(uint32 entry)
Definition: culling_of_stratholme.cpp:1198

References ACTION_INFECT_CITIZIEN, actionEvents, npc_escortAI::AttackStart(), SummonList::begin(), Unit::CastSpell(), combatEvents, COS_PROGRESS_FINISHED, COS_PROGRESS_FINISHED_CITY_INTRO, COS_PROGRESS_KILLED_EPOCH, DATA_ARTHAS_EVENT, DATA_EXIT_GATE, DATA_START_WAVES, SummonList::DespawnAll(), SummonList::DespawnEntry(), UnitAI::DoMeleeAttackIfReady(), InstanceScript::DoUpdateWorldState(), ScriptedAI::DUNGEON_MODE(), SummonList::end(), EVENT_ACTION_PHASE1, EVENT_ACTION_PHASE2, EVENT_ACTION_PHASE3, EVENT_ACTION_PHASE5, EVENT_COMBAT_EXORCISM, EVENT_COMBAT_HEALTH_CHECK, EVENT_DST_CITYMAN, EVENT_DST_EPOCH, EVENT_DST_HORSE1, EVENT_DST_UTHER, EVENT_POS_RETREAT, EVENT_SRC_EPOCH, EVENT_SRC_HORSE1, EVENT_SRC_JAINA, EVENT_SRC_MALGANIS, EVENT_SRC_UTHER, eventInRun, EventPos, EventMap::ExecuteEvent(), ObjectAccessor::GetCreature(), Object::GetEntry(), GetEventNpc(), MapRefMgr::getFirst(), Map::GetGameObject(), Object::GetGUID(), InstanceScript::GetGuidData(), WorldObject::GetMap(), Unit::GetMotionMaster(), Map::GetPlayers(), Reference< TO, FROM >::GetSource(), Unit::GetVictim(), GO_MALGANIS_CHEST_H, GO_MALGANIS_CHEST_N, GO_STATE_ACTIVE, Unit::HasUnitState(), ScriptedAI::HealthBelowPct(), InstanceScript::instance, LinkedListHead::IsEmpty(), Unit::IsInCombat(), LANG_UNIVERSAL, ScriptedAI::me, MOVEMENTFLAG_WALKING, MotionMaster::MovePoint(), NPC_CITY_MAN, NPC_CITY_MAN2, NPC_CITY_MAN3, NPC_CITY_MAN4, NPC_EPOCH, NPC_HORSE_ESCORT, NPC_INFINITE_ADVERSARY, NPC_INFINITE_AGENT, NPC_INFINITE_HUNTER, NPC_INVIS_TARGET, NPC_JAINA, NPC_MAL_GANIS, NPC_TIME_RIFT, NPC_UTHER, pInstance, REACT_AGGRESSIVE, REACT_DEFENSIVE, REACT_PASSIVE, EventMap::RepeatEvent(), Unit::Say(), SAY_PHASE101, SAY_PHASE102, SAY_PHASE103, SAY_PHASE104, SAY_PHASE105, SAY_PHASE106, SAY_PHASE107, SAY_PHASE108, SAY_PHASE109, SAY_PHASE110, SAY_PHASE111, SAY_PHASE112, SAY_PHASE113, SAY_PHASE114, SAY_PHASE115, SAY_PHASE116, SAY_PHASE117, SAY_PHASE202, SAY_PHASE203, SAY_PHASE205, SAY_PHASE206, SAY_PHASE207, SAY_PHASE208, SAY_PHASE209, SAY_PHASE210, SAY_PHASE302, SAY_PHASE303, SAY_PHASE304, SAY_PHASE305, SAY_PHASE306, SAY_PHASE308, SAY_PHASE311, SAY_PHASE313, SAY_PHASE314, SAY_PHASE315, SAY_PHASE503, SAY_PHASE504, ScheduleNextEvent(), UnitAI::SelectTarget(), ZoneScript::SetData(), npc_escortAI::SetDespawnAtEnd(), npc_escortAI::SetEscortPaused(), Unit::SetFacingTo(), Unit::SetFacingToObject(), Unit::SetImmuneToAll(), Unit::SetNpcFlag(), Creature::SetReactState(), npc_escortAI::SetRun(), Creature::SetTarget(), Unit::SetVisible(), SPELL_ARTHAS_CRUSADER_STRIKE, SPELL_ARTHAS_EXORCISM_H, SPELL_ARTHAS_EXORCISM_N, SPELL_ARTHAS_HOLY_LIGHT, SPELL_MALGANIS_APPEAR, npc_escortAI::Start(), WorldObject::SummonCreature(), WorldObject::SummonGameObject(), SummonNextWave(), summons, TEMPSUMMON_DEAD_DESPAWN, TEMPSUMMON_TIMED_DESPAWN, UNIT_FLAG_NON_ATTACKABLE, UNIT_NPC_FLAG_GOSSIP, UNIT_STATE_CASTING, EventMap::Update(), npc_escortAI::UpdateAI(), and WORLDSTATE_WAVE_COUNT.

◆ WaypointReached()

void npc_arthas::npc_arthasAI::WaypointReached ( uint32  uiPointId)
inlineoverridevirtual

Implements npc_escortAI.

517 {
518 switch(uiPointId)
519 {
520 // Starting waypoint, After reaching uther and jaina
521 case 0:
522 // On the mountain with uther and jaina
523 case 1:
524 // Reaching city man in city
525 case 9:
526 // Reaching city man in town hall
527 case 23:
528 SetEscortPaused(true);
529 eventInRun = true;
530 break;
531 // After intro, in front of bridge
532 case 3:
533 SetRun(true);
535 summons.DespawnAll(); // uther, jaina and horses
536 break;
537 // Reached City
538 case 8:
540 SetEscortPaused(true);
541 if (pInstance)
543
544 if (Creature* stalker = me->SummonCreature(NPC_INVIS_TARGET, 2026.469f, 1287.088f, 143.596f, 1.37f, TEMPSUMMON_TIMED_DESPAWN, 14000))
545 {
546 me->SetFacingToObject(stalker);
547 stalker->DespawnOrUnsummon(500);
548 }
549 break;
550 // Reached first cityman
551 case 10:
552 if (Creature* cityman = GetEventNpc(NPC_CITY_MAN))
553 {
554 cityman->AI()->Talk(SAY_PHASE204);
556 }
557 break;
558 // Reached second cityman
559 case 11:
560 if (Creature* cityman = GetEventNpc(NPC_CITY_MAN2))
561 {
562 cityman->Say("Oh no...", LANG_UNIVERSAL); // missing script_text
564 }
566 SetEscortPaused(true);
567 eventInRun = true;
568 break;
569 // Reached Town Hall
570 case 20:
571 if (pInstance)
574 SetRun(false);
575 SetEscortPaused(true);
576 break;
577 // Inside Town Hall first scene pos
578 case 22:
580 eventInRun = true;
581 SetEscortPaused(true);
582 break;
583 // Town Hall, upper floor first fight
584 case 26:
585 SetEscortPaused(true);
586 eventInRun = true;
589 break;
590 // Town Hall, upper floor second fight
591 case 29:
595 SetEscortPaused(true);
596 eventInRun = true;
597 break;
598 // Town Hall, upper floor third fight
599 case 31:
600 SetRun(false);
604 SetEscortPaused(true);
605 eventInRun = true;
606 break;
607 // Book Shelf
608 case 34:
610 break;
611 case 35:
613 break;
614 // Reached book shelf
615 case 36:
616 SetRun(true);
617 if (pInstance)
619 pGate->SetGoState(GO_STATE_ACTIVE);
620 break;
621 // Behind secred passage
622 case 45:
623 SetRun(true);
625 SetEscortPaused(true);
626 if (pInstance)
628 break;
629 // Some walk talk
630 case 47:
631 SetRun(false);
633 break;
634 case 48:
635 SetRun(true);
637 break;
638 case 53:
640 break;
641 // Before Malganis event
642 case 54:
643 if (pInstance)
645
647 SetEscortPaused(true);
648 break;
649 // Infront of malganis
650 case 55:
653 SetEscortPaused(true);
654 eventInRun = true;
655 break;
656 // After malganis defeat
657 case 56:
658 SetEscortPaused(true);
659 eventInRun = true;
660 break;
661 }
662 }
@ SAY_PHASE307
Definition: culling_of_stratholme.cpp:55
@ SAY_PHASE405
Definition: culling_of_stratholme.cpp:69
@ SAY_PHASE312
Definition: culling_of_stratholme.cpp:60
@ SAY_PHASE406
Definition: culling_of_stratholme.cpp:70
@ SAY_PHASE407
Definition: culling_of_stratholme.cpp:71
@ SAY_PHASE502
Definition: culling_of_stratholme.cpp:75
@ SAY_PHASE309
Definition: culling_of_stratholme.cpp:57
@ SAY_PHASE402
Definition: culling_of_stratholme.cpp:66
@ SAY_PHASE118
Definition: culling_of_stratholme.cpp:40
@ SAY_PHASE204
Definition: culling_of_stratholme.cpp:102
@ SAY_PHASE403
Definition: culling_of_stratholme.cpp:67
void SpawnTimeRift()
Definition: culling_of_stratholme.cpp:1336

References actionEvents, Unit::CastSpell(), COS_PROGRESS_BEFORE_MALGANIS, COS_PROGRESS_FINISHED_INTRO, COS_PROGRESS_LAST_CITY, COS_PROGRESS_REACHED_TOWN_HALL, DATA_ARTHAS_EVENT, DATA_SHKAF_GATE, SummonList::DespawnAll(), EVENT_ACTION_PHASE3, EVENT_ACTION_PHASE5, eventInRun, GetEventNpc(), Map::GetGameObject(), InstanceScript::GetGuidData(), GO_STATE_ACTIVE, InstanceScript::instance, LANG_UNIVERSAL, ScriptedAI::me, NPC_CITY_MAN, NPC_CITY_MAN2, NPC_INVIS_TARGET, pInstance, REACT_DEFENSIVE, SAY_PHASE118, SAY_PHASE204, SAY_PHASE307, SAY_PHASE309, SAY_PHASE312, SAY_PHASE402, SAY_PHASE403, SAY_PHASE405, SAY_PHASE406, SAY_PHASE407, SAY_PHASE502, EventMap::ScheduleEvent(), ZoneScript::SetData(), npc_escortAI::SetEscortPaused(), Unit::SetFacingToObject(), Unit::SetNpcFlag(), Creature::SetReactState(), npc_escortAI::SetRun(), SpawnTimeRift(), SPELL_ARTHAS_CRUSADER_STRIKE, WorldObject::SummonCreature(), summons, TEMPSUMMON_TIMED_DESPAWN, and UNIT_NPC_FLAG_GOSSIP.

Member Data Documentation

◆ actionEvents

EventMap npc_arthas::npc_arthasAI::actionEvents

◆ combatEvents

EventMap npc_arthas::npc_arthasAI::combatEvents

Referenced by Reset(), and UpdateAI().

◆ eventInRun

bool npc_arthas::npc_arthasAI::eventInRun

◆ pInstance

InstanceScript* npc_arthas::npc_arthasAI::pInstance

◆ summons

◆ timeRiftId

uint8 npc_arthas::npc_arthasAI::timeRiftId

Referenced by Reset().

◆ waveGroupId

uint8 npc_arthas::npc_arthasAI::waveGroupId

Referenced by DoAction(), and Reset().

◆ waveKillCount

uint8 npc_arthas::npc_arthasAI::waveKillCount

Referenced by Reset().