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, Milliseconds time)
 
void SummonNextWave ()
 
void ReorderInstance (uint32 data)
 
void JustEngagedWith (Unit *) override
 Called for reaction when initially engaged - this happens after JustEnteredCombat.
 
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
 Use to start attacking a target. Called just before JustEngagedWith()
 
virtual void WaypointReached (uint32, uint32)
 
- 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
 
bool IsEscortNPC (bool=true) const override
 
void ReturnToLastPoint ()
 
void EnterEvadeMode (EvadeReason=EVADE_REASON_OTHER) override
 
void JustExitedCombat () override
 Called when the unit leaves combat.
 
void UpdateAI (uint32 diff) override
 Use to start attacking a target. Called just before JustEngagedWith()
 
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 WaypointStart (uint32)
 
void Start (bool isActiveAttacker=true, ObjectGuid playerGUID=ObjectGuid::Empty, Quest const *quest=nullptr, bool instantRespawn=false, bool canLoopPath=false, bool resetWaypoints=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)
 
virtual void WaypointReached (uint32, uint32)
 
- Public Member Functions inherited from ScriptedAI
 ScriptedAI (Creature *creature)
 
 ~ScriptedAI () override
 
void AttackStartNoMove (Unit *target)
 
void DamageTaken (Unit *, uint32 &, DamageEffectType, SpellSchoolMask) override
 Called at any Damage from any attacker (before damage apply)
 
void UpdateAI (uint32 diff) override
 Use to start attacking a target. Called just before JustEngagedWith()
 
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 (Position const *pos, Axis axis, bool above)
 
void Reset () override
 
void JustEngagedWith (Unit *) override
 Called for reaction when initially engaged - this happens after JustEnteredCombat.
 
void AttackStart (Unit *) override
 
void DoStartMovement (Unit *target, float distance=0.0f, float angle=0.0f)
 
void DoStartNoMovement (Unit *target)
 
void DoStopAttack ()
 
void DoRewardPlayersInArea ()
 
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 DoTeleportPlayer (Unit *unit, Position pos)
 
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=0ms, uint32 uniqueId=0)
 
void ScheduleTimedEvent (Milliseconds timerMax, std::function< void()> exec, Milliseconds repeatMin, Milliseconds repeatMax=0ms, 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)
 
virtual bool CheckEvadeIfOutOfCombatArea () const
 
bool IsHeroic () const
 
Difficulty GetDifficulty () const
 
bool Is25ManRaid () const
 
template<class T >
T const & DUNGEON_MODE (T const &normal5, T const &heroic10) const
 
template<class T >
T const & RAID_MODE (T const &normal10, T const &normal25) const
 
template<class T >
T const & RAID_MODE (T const &normal10, T const &normal25, T const &heroic10, T const &heroic25) const
 
PlayerSelectTargetFromPlayerList (float maxdist, uint32 excludeAura=0, bool mustBeInLOS=false) const
 
void SetInvincibility (bool apply)
 
bool IsInvincible () const
 
void SetAutoAttackAllowed (bool allow)
 
bool IsAutoAttackAllowed () const
 
- Public Member Functions inherited from CreatureAI
void Talk (uint8 id, WorldObject const *whisperTarget=nullptr, Milliseconds delay=0ms)
 Causes the creature to talk/say the text assigned to their entry in the creature_text database table.
 
void Talk (uint8 id, Milliseconds delay)
 
WorldObjectGetSummoner () const
 Returns the summoner creature/object, if the creature is a temporary summon.
 
 CreatureAI (Creature *creature)
 
 ~CreatureAI () override
 
bool IsEngaged () const
 Check if creature is currently engaged in combat.
 
void MoveCircleChecks ()
 
void MoveBackwardsChecks ()
 
void MoveInLineOfSight_Safe (Unit *who)
 == Reactions At =================================
 
void TriggerAlert (Unit const *who) const
 
virtual bool CanRespawn ()
 
void JustEnteredCombat (Unit *who) override
 Called when the unit enters combat.
 
virtual void JustStartedThreateningMe (Unit *who)
 
void EngagementStart (Unit *who)
 
void EngagementOver ()
 
virtual void IsSummonedBy (WorldObject *)
 
virtual void SummonedCreatureDespawnAll ()
 
virtual void SummonedCreatureEvade (Creature *)
 
virtual void OnSpellStart (SpellInfo const *)
 
virtual void OnSpellCast (SpellInfo const *)
 
virtual void OnSpellFailed (SpellInfo const *)
 
virtual void OnChannelFinished (SpellInfo const *)
 
virtual void AttackedBy (Unit *)
 
virtual void PathEndReached (uint32)
 
virtual void WaypointPathStarted (uint32)
 == Waypoints system =============================
 
virtual void WaypointStarted (uint32, uint32)
 
virtual void WaypointPathEnded (uint32, uint32)
 
void OnCharmed (bool apply) override
 Called when unit is charmed.
 
virtual void JustReachedHome ()
 
void DoZoneInCombat (Creature *creature=nullptr, float maxRangeToNearestTarget=250.0f)
 
virtual void ReceiveEmote (Player *, uint32)
 
virtual void OwnerAttackedBy (Unit *attacker)
 
virtual void OwnerAttacked (Unit *target)
 
void OnOwnerCombatInteraction (Unit *target)
 
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 ()
 
int32 VisualizeBoundary (uint32 duration, Unit *owner=nullptr, bool fill=false, bool checkZ=false) const
 
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 *)
 
virtual void OnAuraRemove (AuraApplication *, AuraRemoveMode)
 
virtual void DistancingStarted ()
 
virtual void DistancingEnded ()
 
- Public Member Functions inherited from UnitAI
 UnitAI (Unit *unit)
 
virtual ~UnitAI ()
 
virtual bool CanAIAttack (Unit const *) const
 
virtual void InitializeAI ()
 
virtual uint32 GetData (uint32) const
 
virtual void SetData (uint32, uint32)
 
virtual void SetGUID (ObjectGuid const &, 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)
 Select the best (up to) <num> targets (in <targetType> order) from the threat list that fulfill the following:
 
template<class PREDICATE >
void SelectTargetList (std::list< Unit * > &targetList, uint32 num, SelectTargetMethod targetType, uint32 position, PREDICATE const &predicate)
 
virtual void EvadeTimerExpired ()
 Called when evade timer expires (target unreachable for too long)
 
virtual void DamageDealt (Unit *, uint32 &, DamageEffectType, SpellSchoolMask)
 Called at any Damage to any victim (before damage apply)
 
virtual void HealReceived (Unit *, uint32 &)
 Called when the creature receives heal.
 
virtual void OnPowerUpdate (Powers, int32, int32, uint32)
 Called when the creature power updates.
 
virtual void HealDone (Unit *, uint32 &)
 Called when the unit heals.
 
virtual void OnCalculateMeleeDamageReceived (uint32 &, Unit *)
 Called during damage calculations.
 
virtual void OnCalculateSpellDamageReceived (int32 &, Unit *)
 
virtual void OnCalculatePeriodicTickReceived (uint32 &, Unit *)
 Called during calculation when receiving periodic healing or damage (DoT or HoT)
 
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)
 To specify the caster as target if the spell is self-cast.
 
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, bool withTank=true, int32 aura=0)
 Cast the spell on a random unit from the threat list.
 
SpellCastResult DoCastMaxThreat (uint32 spellId, uint32 threatTablePosition=0, float dist=0.0f, bool playerOnly=true, bool triggered=false)
 Cast spell on the top threat target, which may not 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)
 Called when a summon reaches a waypoint or point movement finished.
 
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
 

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)
 
bool _EnterEvadeMode (EvadeReason why=EVADE_REASON_OTHER)
 
- Protected Attributes inherited from CreatureAI
Creature *const me
 
EventMap events
 
TaskScheduler scheduler
 
CreatureBoundary const * _boundary
 
bool _negateBoundary
 
bool _isEngaged
 
- Protected Attributes inherited from UnitAI
Unit *const me
 

Detailed Description

Constructor & Destructor Documentation

◆ npc_arthasAI()

npc_arthas::npc_arthasAI::npc_arthasAI ( Creature creature)
inline
388 : npc_escortAI(creature), summons(me)
389 {
390 pInstance = creature->GetInstanceScript();
391 }
InstanceScript * GetInstanceScript() const
Definition Object.cpp:1238
Creature * me
Definition ScriptedCreature.h:281
InstanceScript * pInstance
Definition culling_of_stratholme.cpp:393
SummonList summons
Definition culling_of_stratholme.cpp:394
Definition ScriptedEscortAI.h:53

References WorldObject::GetInstanceScript(), and pInstance.

Member Function Documentation

◆ DoAction()

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

Reimplemented from UnitAI.

432 {
433 if (param == ACTION_START_EVENT)
434 {
435 // Event
436 eventInRun = true;
438 }
439 else if (param == ACTION_START_CITY)
440 {
443 me->SetWalk(true);
444 eventInRun = true;
445
448 }
449 else if (param == ACTION_KILLED_SALRAMM)
450 {
451 waveGroupId = 10;
452 eventInRun = true;
453 me->SetWalk(false);
455 }
456 else if (param == ACTION_START_TOWN_HALL)
457 {
459 SetEscortPaused(false);
460 me->SetWalk(true);
461
463 {
464 cr->AI()->DoAction(ACTION_FORCE_CHANGE_LOCK);
465 }
467 {
468 cr->AI()->DoAction(ACTION_FORCE_CHANGE_LOCK);
469 }
471 {
472 cr->AI()->DoAction(ACTION_FORCE_CHANGE_LOCK);
473 }
474 }
475 else if (param == ACTION_START_SECRET_PASSAGE)
476 {
478 SetEscortPaused(false);
479 me->SetWalk(true);
480 }
481 else if (param == ACTION_START_LAST_CITY)
482 {
484 SetEscortPaused(false);
485 me->SetWalk(false);
486 }
487 else if (param == ACTION_START_MALGANIS)
488 {
491 {
492 summons.Despawn(cr);
493 summons.Summon(cr);
494 cr->SetImmuneToAll(true);
495 cr->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
496 }
498 SetEscortPaused(false);
499 me->SetWalk(false);
500 }
501 else if (param == ACTION_KILLED_MALGANIS)
502 {
504 eventInRun = true;
506 me->SetFacingTo(1.84f);
507
508 if (!me->GetMap()->GetPlayers().IsEmpty())
509 if (Player* player = me->GetMap()->GetPlayers().getFirst()->GetSource())
510 player->RewardPlayerAndGroupAtEvent(31006, player); // Malganis quest entry required
511 }
512 }
@ UNIT_FLAG_NON_ATTACKABLE
Definition UnitDefines.h:258
@ ACTION_START_EVENT
Definition chapter5.cpp:194
Definition Creature.h:47
bool SetWalk(bool enable) override
Enable or disable the creature's walk mode by removing: MOVEMENTFLAG_WALKING. Infom also the client.
Definition Creature.cpp:3337
void ScheduleEvent(EventId eventId, Milliseconds time, GroupIndex group=0u, PhaseIndex phase=0u)
Definition EventMap.cpp:48
bool IsEmpty() const
Definition LinkedList.h:97
MapReference * getFirst()
Definition MapRefMgr.h:31
PlayerList const & GetPlayers() const
Definition Map.h:329
Definition Player.h:1085
FROM * GetSource() const
Definition Reference.h:97
void Despawn(Creature const *summon)
Definition ScriptedCreature.h:89
void Summon(Creature const *summon)
Definition ScriptedCreature.h:88
void DespawnAll(Milliseconds delay=0ms)
Definition ScriptedCreature.cpp:72
void SetFacingTo(float ori)
Definition Unit.cpp:16407
Map * GetMap() const
Definition Object.h:630
TempSummon * SummonCreature(uint32 id, Position const &pos, TempSummonType spwtype=TEMPSUMMON_MANUAL_DESPAWN, uint32 despwtime=0, uint32 vehId=0, SummonPropertiesEntry const *properties=nullptr, bool visibleBySummonerOnly=false) const
Definition Object.cpp:2444
@ SAY_PHASE201
Definition culling_of_stratholme.cpp:44
@ SAY_PHASE501
Definition culling_of_stratholme.cpp:75
@ SAY_PHASE401
Definition culling_of_stratholme.cpp:66
@ SAY_PHASE404
Definition culling_of_stratholme.cpp:69
@ SAY_PHASE301
Definition culling_of_stratholme.cpp:52
@ ACTION_FORCE_CHANGE_LOCK
Definition culling_of_stratholme.cpp:175
@ NPC_CITY_MAN
Definition culling_of_stratholme.cpp:134
@ NPC_CITY_MAN2
Definition culling_of_stratholme.cpp:135
@ NPC_CITY_MAN4
Definition culling_of_stratholme.cpp:137
@ NPC_CITY_MAN3
Definition culling_of_stratholme.cpp:136
@ EVENT_ACTION_PHASE2
Definition culling_of_stratholme.cpp:201
@ EVENT_ACTION_PHASE5
Definition culling_of_stratholme.cpp:203
@ EVENT_ACTION_PHASE1
Definition culling_of_stratholme.cpp:200
@ ACTION_START_CITY
Definition culling_of_stratholme.h:135
@ ACTION_START_LAST_CITY
Definition culling_of_stratholme.h:139
@ ACTION_START_TOWN_HALL
Definition culling_of_stratholme.h:137
@ ACTION_KILLED_SALRAMM
Definition culling_of_stratholme.h:136
@ ACTION_KILLED_MALGANIS
Definition culling_of_stratholme.h:142
@ ACTION_START_SECRET_PASSAGE
Definition culling_of_stratholme.h:138
@ ACTION_START_MALGANIS
Definition culling_of_stratholme.h:141
@ NPC_MAL_GANIS
Definition culling_of_stratholme.h:54
@ EVENT_SRC_HALL_CITYMAN1
Definition culling_of_stratholme.h:107
@ EVENT_SRC_HALL_CITYMAN2
Definition culling_of_stratholme.h:108
@ EVENT_SRC_TOWN_CITYMAN1
Definition culling_of_stratholme.h:101
@ EVENT_SRC_HALL_CITYMAN3
Definition culling_of_stratholme.h:109
@ EVENT_SRC_MALGANIS_FINAL
Definition culling_of_stratholme.h:113
@ EVENT_SRC_TOWN_CITYMAN2
Definition culling_of_stratholme.h:102
const Position EventPos[]
Definition culling_of_stratholme.h:153
Talk
Definition hyjal.cpp:82
uint8 waveGroupId
Definition culling_of_stratholme.cpp:398
EventMap actionEvents
Definition culling_of_stratholme.cpp:396
bool eventInRun
Definition culling_of_stratholme.cpp:395
void EnterEvadeMode(EvadeReason=EVADE_REASON_OTHER) override
Definition ScriptedEscortAI.cpp:201
void SetEscortPaused(bool on)
Definition ScriptedEscortAI.cpp:495

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(), Creature::SetWalk(), SummonList::Summon(), WorldObject::SummonCreature(), summons, UNIT_FLAG_NON_ATTACKABLE, and waveGroupId.

◆ GetEventNpc()

Creature * npc_arthas::npc_arthasAI::GetEventNpc ( uint32  entry)
1214{
1215 for (SummonList::iterator i = summons.begin(); i != summons.end();)
1216 {
1217 Creature* summon = ObjectAccessor::GetCreature(*me, *i);
1218 if (!summon)
1219 summons.erase(i++);
1220 else if (summon->GetEntry() == entry)
1221 return summon;
1222 else
1223 ++i;
1224 }
1225
1226 return nullptr;
1227}
uint32 GetEntry() const
Definition Object.h:117
iterator erase(iterator i)
Definition ScriptedCreature.h:68
iterator begin()
Definition ScriptedCreature.h:48
iterator end()
Definition ScriptedCreature.h:58
StorageType::iterator iterator
Definition ScriptedCreature.h:36
Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
Definition ObjectAccessor.cpp:210

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 CreatureAI.

411 {
414 if (pInstance)
416 }
@ STATE_ESCORT_ESCORTING
Definition ScriptedEscortAI.h:47
virtual void SetData(uint32, uint32)
Definition ZoneScript.h:52
@ DATA_ARTHAS_REPOSITION
Definition culling_of_stratholme.h:36
void RemoveEscortState(uint32 escortState)
Definition ScriptedEscortAI.h:115

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

◆ JustEngagedWith()

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

Called for reaction when initially engaged - this happens after JustEnteredCombat.

Reimplemented from CreatureAI.

1251{
1253
1254 // Fight
1257}
void RescheduleEvent(EventId eventId, Milliseconds time, GroupIndex group=0u, PhaseIndex phase=0u)
Definition EventMap.cpp:70
SpellCastResult DoCast(uint32 spellId)
Definition UnitAI.cpp:179
@ SPELL_ARTHAS_AURA
Definition culling_of_stratholme.cpp:143
@ EVENT_COMBAT_HEALTH_CHECK
Definition culling_of_stratholme.cpp:199
@ EVENT_COMBAT_EXORCISM
Definition culling_of_stratholme.cpp:198
EventMap combatEvents
Definition culling_of_stratholme.cpp:397

References EVENT_COMBAT_EXORCISM, EVENT_COMBAT_HEALTH_CHECK, and SPELL_ARTHAS_AURA.

◆ JustSummoned()

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

Reimplemented from CreatureAI.

419 {
420 summons.Summon(cr);
421 }

References SummonList::Summon(), and summons.

◆ ReorderInstance()

void npc_arthas::npc_arthasAI::ReorderInstance ( uint32  data)
1260{
1261 me->SetWalk(false);
1262 Start(true);
1263 SetEscortPaused(true);
1264 SetDespawnAtEnd(false);
1265
1266 switch (data)
1267 {
1269 SetNextWaypoint(9, false);
1271 break;
1275 SetNextWaypoint(12, false);
1277
1279 {
1280 eventInRun = true;
1282 }
1283 else if (data == COS_PROGRESS_KILLED_MEATHOOK)
1284 {
1285 waveGroupId = 4;
1287 }
1288 else // if (data == COS_PROGRESS_KILLED_SALRAMM)
1289 {
1290 if (pInstance)
1293 }
1294 break;
1296 SetNextWaypoint(21, false);
1298 break;
1300 SetNextWaypoint(32, false);
1302 break;
1304 SetNextWaypoint(46, false);
1306 break;
1308 SetNextWaypoint(55, false);
1310 break;
1311 }
1312
1313 if (data >= COS_PROGRESS_KILLED_EPOCH)
1314 if (pInstance)
1316 pGate->SetGoState(GO_STATE_ACTIVE);
1317
1319}
@ GO_STATE_ACTIVE
Definition GameObjectData.h:708
@ UNIT_NPC_FLAG_GOSSIP
Definition UnitDefines.h:322
@ REACT_DEFENSIVE
Definition Unit.h:568
@ WORLD_STATE_CULLING_OF_STRATHOLME_WAVE_COUNT
Definition WorldStateDefines.h:557
void SetReactState(ReactStates state)
A creature can have 3 ReactStates : Agressive, Passive, Neutral.
Definition Creature.h:100
Definition GameObject.h:120
ObjectGuid GetGuidData(uint32 type) const override
Definition InstanceScript.cpp:111
Map * instance
Definition InstanceScript.h:149
void DoUpdateWorldState(uint32 worldstateId, uint32 worldstateValue)
Definition InstanceScript.cpp:635
GameObject * GetGameObject(ObjectGuid const &guid)
Definition Map.cpp:2372
void SetNpcFlag(NPCFlags flags)
Definition Unit.h:765
@ NPC_MEATHOOK
Definition culling_of_stratholme.h:51
@ DATA_SHKAF_GATE
Definition culling_of_stratholme.h:45
@ COS_PROGRESS_REACHED_TOWN_HALL
Definition culling_of_stratholme.h:125
@ COS_PROGRESS_KILLED_EPOCH
Definition culling_of_stratholme.h:126
@ COS_PROGRESS_LAST_CITY
Definition culling_of_stratholme.h:127
@ COS_PROGRESS_KILLED_MEATHOOK
Definition culling_of_stratholme.h:123
@ COS_PROGRESS_FINISHED_CITY_INTRO
Definition culling_of_stratholme.h:122
@ COS_PROGRESS_FINISHED_INTRO
Definition culling_of_stratholme.h:121
@ COS_PROGRESS_KILLED_SALRAMM
Definition culling_of_stratholme.h:124
@ COS_PROGRESS_BEFORE_MALGANIS
Definition culling_of_stratholme.h:128
@ DATA_SHOW_INFINITE_TIMER
Definition culling_of_stratholme.h:35
void DoAction(int32 param) override
Definition culling_of_stratholme.cpp:431
void SendNextWave(uint32 entry)
Definition culling_of_stratholme.cpp:1321
void Start(bool isActiveAttacker=true, ObjectGuid playerGUID=ObjectGuid::Empty, Quest const *quest=nullptr, bool instantRespawn=false, bool canLoopPath=false, bool resetWaypoints=true)
Definition ScriptedEscortAI.cpp:428
void SetDespawnAtEnd(bool despawn)
Definition ScriptedEscortAI.h:108
bool SetNextWaypoint(uint32 pointId, float x, float y, float z, float orientation)
Definition ScriptedEscortAI.cpp:506

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_ACTIVE, NPC_MEATHOOK, REACT_DEFENSIVE, UNIT_NPC_FLAG_GOSSIP, and WORLD_STATE_CULLING_OF_STRATHOLME_WAVE_COUNT.

Referenced by Reset().

◆ Reset()

void npc_arthas::npc_arthasAI::Reset ( )
inlineoverridevirtual

Reimplemented from UnitAI.

515 {
519 eventInRun = false;
520 waveGroupId = 0;
521 waveKillCount = 0;
522 timeRiftId = 0;
523
525
526 if (pInstance)
527 {
530 if (data >= COS_PROGRESS_FINISHED_INTRO)
531 ReorderInstance(data);
532 }
533 }
std::uint32_t uint32
Definition Define.h:107
void Reset()
Definition EventMap.cpp:21
void RemoveNpcFlag(NPCFlags flags)
Definition Unit.h:766
virtual uint32 GetData(uint32) const
Definition ZoneScript.h:51
@ DATA_ARTHAS_EVENT
Definition culling_of_stratholme.h:28
uint8 waveKillCount
Definition culling_of_stratholme.cpp:399
uint8 timeRiftId
Definition culling_of_stratholme.cpp:400
void ReorderInstance(uint32 data)
Definition culling_of_stratholme.cpp:1259

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,
Milliseconds  time 
)
1230{
1231 actionEvents.ScheduleEvent(currentEvent + 1, time);
1232}

Referenced by UpdateAI().

◆ SendNextWave()

void npc_arthas::npc_arthasAI::SendNextWave ( uint32  entry)
1322{
1323 if (!pInstance)
1324 return;
1325
1326 if (entry == NPC_MEATHOOK)
1327 {
1328 waveKillCount = 4;
1330 }
1331 else if (entry == NPC_SALRAMM)
1332 {
1334 return;
1335 }
1336
1337 // Group is killed
1338 if (++waveKillCount >= 4)
1339 {
1340 waveGroupId++;
1341 if (waveGroupId == 4) // Meathook
1343 else if (waveGroupId == 9) // Salramm
1345 else
1347
1349 }
1350}
@ NPC_SALRAMM
Definition culling_of_stratholme.h:52
@ EVENT_SRC_SALRAMM
Definition culling_of_stratholme.h:106
@ EVENT_SRC_MEATHOOK
Definition culling_of_stratholme.h:105
void SummonNextWave()
Definition culling_of_stratholme.cpp:1234

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

Referenced by SummonedCreatureDies().

◆ SpawnTimeRift()

void npc_arthas::npc_arthasAI::SpawnTimeRift ( )
1353{
1354 if (timeRiftId >= 5)
1355 return;
1356
1358 {
1359 // Spawn everyone at time rift pos
1361 {
1362 if (cr->GetEntry() == NPC_TIME_RIFT)
1363 cr->DespawnOrUnsummon(10s);
1364 else // x, y, z (0 is entry)
1365 {
1366 // first infinite
1367 if (i == 1)
1368 AttackStart(cr);
1369
1370 cr->SetInCombatWithZone();
1371 cr->AddThreat(me, 0.0f);
1372 cr->SetReactState(REACT_AGGRESSIVE);
1374 }
1375 }
1376 }
1377
1378 timeRiftId++;
1379}
std::uint8_t uint8
Definition Define.h:109
@ REACT_AGGRESSIVE
Definition Unit.h:569
@ POINT_CHRONOS
Definition culling_of_stratholme.cpp:177
@ ENCOUNTER_CHRONO_MAX_SPAWNS_FIRST
Definition culling_of_stratholme.cpp:171
@ ENCOUNTER_CHRONO_MAX_SPAWNS_SECOND
Definition culling_of_stratholme.cpp:172
float RiftAndSpawnsLocations[ENCOUNTER_CHRONO_NUMBER][ENCOUNTER_CHRONO_MAX_SPAWNS_FIRST][5]
Definition culling_of_stratholme.cpp:260
@ NPC_TIME_RIFT
Definition culling_of_stratholme.h:61
void AttackStart(Unit *who) override
Definition ScriptedEscortAI.cpp:44

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 CreatureAI.

423{ summons.Despawn(cr); }

References SummonList::Despawn(), and summons.

◆ SummonedCreatureDies()

◆ SummonNextWave()

void npc_arthas::npc_arthasAI::SummonNextWave ( )
1235{
1236 Map::PlayerList const& PlayerList = me->GetMap()->GetPlayers();
1237 if (!PlayerList.IsEmpty())
1238 for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
1239 i->GetSource()->PlayerTalkClass->SendPointOfInterest(1000 + waveGroupId);
1240
1241 waveKillCount = 0; // this is forced condition!
1242 uint32 tableId = waveGroupId;
1243 if (tableId > 4)
1244 tableId--;
1245
1246 for (uint32 i = 0; i < ENCOUNTER_WAVES_MAX_SPAWNS; ++i)
1247 me->SummonCreature(/*entry*/(uint32)WavesLocations[tableId][i][0], WavesLocations[tableId][i][1], WavesLocations[tableId][i][2], WavesLocations[tableId][i][3], WavesLocations[tableId][i][4]);
1248}
Definition LinkedList.h:139
Definition MapRefMgr.h:26
iterator begin()
Definition MapRefMgr.h:36
iterator end()
Definition MapRefMgr.h:37
@ ENCOUNTER_WAVES_MAX_SPAWNS
Definition culling_of_stratholme.cpp:167
float WavesLocations[ENCOUNTER_WAVES_NUMBER][ENCOUNTER_WAVES_MAX_SPAWNS][5]
Definition culling_of_stratholme.cpp:207

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

Referenced by UpdateAI().

◆ UpdateAI()

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

Use to start attacking a target. Called just before JustEngagedWith()

Implements UnitAI.

685 {
687
688 if (eventInRun)
689 {
690 actionEvents.Update(diff);
691 switch (uint32 currentEvent = actionEvents.ExecuteEvent())
692 {
694 me->SetWalk(true);
697 {
699 uther->SetTarget(me->GetGUID());
700 me->SetTarget(uther->GetGUID());
701 }
702 for (int i = 0; i < 3; ++i)
704 horse->GetMotionMaster()->MovePoint(0, EventPos[EVENT_DST_HORSE1 + i], FORCED_MOVEMENT_NONE, 0.f, false);
705
706 ScheduleNextEvent(currentEvent, 4s);
707 break;
708 case EVENT_ACTION_PHASE1+1:
709 // Start Event
710 me->SetWalk(true);
711 Start(true);
712 SetDespawnAtEnd(false);
713 SetDespawnAtFar(false);
714
715 ScheduleNextEvent(currentEvent, 9s);
716 break;
717 // After waypoint 0
718 case EVENT_ACTION_PHASE1+2:
720 ScheduleNextEvent(currentEvent, 2s);
721 break;
722 case EVENT_ACTION_PHASE1+3:
723 if (Creature* uther = GetEventNpc(NPC_UTHER))
724 uther->AI()->Talk(SAY_PHASE102);
725
726 ScheduleNextEvent(currentEvent, 8s);
727 break;
728 case EVENT_ACTION_PHASE1+4:
729 SetEscortPaused(false);
730 eventInRun = false;
732 ScheduleNextEvent(currentEvent, 2s);
733 break;
734 // After waypoint 1
735 case EVENT_ACTION_PHASE1+5:
736 if (Creature* jaina = GetEventNpc(NPC_JAINA))
737 jaina->SetTarget(me->GetGUID());
738
740 ScheduleNextEvent(currentEvent, 10s);
741 break;
742 case EVENT_ACTION_PHASE1+6:
743 if (Creature* uther = GetEventNpc(NPC_UTHER))
744 uther->AI()->Talk(SAY_PHASE105);
745
746 ScheduleNextEvent(currentEvent, 1s);
747 break;
748 case EVENT_ACTION_PHASE1+7:
750 ScheduleNextEvent(currentEvent, 4s);
751 break;
752 case EVENT_ACTION_PHASE1+8:
753 if (Creature* uther = GetEventNpc(NPC_UTHER))
754 uther->AI()->Talk(SAY_PHASE107);
755
756 ScheduleNextEvent(currentEvent, 6s);
757 break;
758 case EVENT_ACTION_PHASE1+9:
760 ScheduleNextEvent(currentEvent, 4s);
761 break;
762 case EVENT_ACTION_PHASE1+10:
763 if (Creature* uther = GetEventNpc(NPC_UTHER))
764 uther->AI()->Talk(SAY_PHASE109);
765
766 ScheduleNextEvent(currentEvent, 8s);
767 break;
768 case EVENT_ACTION_PHASE1+11:
770 ScheduleNextEvent(currentEvent, 4s);
771 break;
772 case EVENT_ACTION_PHASE1+12:
773 if (Creature* uther = GetEventNpc(NPC_UTHER))
774 uther->AI()->Talk(SAY_PHASE111);
775
776 ScheduleNextEvent(currentEvent, 4s);
777 break;
778 case EVENT_ACTION_PHASE1+13:
780 ScheduleNextEvent(currentEvent, 11s);
781 break;
782 case EVENT_ACTION_PHASE1+14:
783 if (Creature* jaina = GetEventNpc(NPC_JAINA))
784 jaina->AI()->Talk(SAY_PHASE113);
785
786 ScheduleNextEvent(currentEvent, 2500ms);
787 break;
788 case EVENT_ACTION_PHASE1+15:
790 ScheduleNextEvent(currentEvent, 9s);
791 break;
792 case EVENT_ACTION_PHASE1+16:
793 if (Creature* uther = GetEventNpc(NPC_UTHER))
794 uther->AI()->Talk(SAY_PHASE115);
795
796 ScheduleNextEvent(currentEvent, 4s);
797 break;
798 case EVENT_ACTION_PHASE1+17:
799 for (SummonList::const_iterator i = summons.begin(); i != summons.end(); ++i)
800 {
802 if (summon && summon->GetEntry() == NPC_HORSE_ESCORT)
804 }
805
806 ScheduleNextEvent(currentEvent, 1s);
807 break;
808 case EVENT_ACTION_PHASE1+18:
809 if (Creature* uther = GetEventNpc(NPC_UTHER))
810 {
811 uther->SetTarget();
812 uther->AddUnitMovementFlag(MOVEMENTFLAG_WALKING);
813 uther->GetMotionMaster()->MovePoint(0, EventPos[EVENT_POS_RETREAT], FORCED_MOVEMENT_NONE, 0.f, false);
814 }
815 ScheduleNextEvent(currentEvent, 1s);
816 break;
817 case EVENT_ACTION_PHASE1+19:
818 if (Creature* jaina = GetEventNpc(NPC_JAINA))
819 {
820 jaina->SetTarget();
821 jaina->AddUnitMovementFlag(MOVEMENTFLAG_WALKING);
822 jaina->GetMotionMaster()->MovePoint(0, EventPos[EVENT_POS_RETREAT], FORCED_MOVEMENT_NONE, 0.f, false);
823 }
825 ScheduleNextEvent(currentEvent, 2s);
826 break;
827 case EVENT_ACTION_PHASE1+20:
828 if (Creature* jaina = GetEventNpc(NPC_JAINA))
829 {
830 jaina->GetMotionMaster()->MoveIdle();
831 jaina->AI()->Talk(SAY_PHASE117);
832 }
833
834 ScheduleNextEvent(currentEvent, 2s);
835 break;
836 case EVENT_ACTION_PHASE1+21:
837 if (Creature* jaina = GetEventNpc(NPC_JAINA))
838 {
839 jaina->AddUnitMovementFlag(MOVEMENTFLAG_WALKING);
840 jaina->GetMotionMaster()->MovePoint(0, EventPos[EVENT_POS_RETREAT], FORCED_MOVEMENT_NONE, 0.f, false);
841 }
843 ScheduleNextEvent(currentEvent, 4s);
844 break;
845 case EVENT_ACTION_PHASE1+22:
846 SetEscortPaused(false);
847 eventInRun = false;
848 me->SetTarget();
849 // dont schedule next, do it in gossip select!
850 break;
851 //After Gossip 1 (waypoint 8)
853 summons.DespawnEntry(NPC_INVIS_TARGET); // remove trigger
854 me->SetTarget();
855 SetEscortPaused(false);
856 eventInRun = false;
857 ScheduleNextEvent(currentEvent, 1s);
858 break;
859 // After waypoint 9
860 case EVENT_ACTION_PHASE2+1:
861 if (Creature* cityman = GetEventNpc(NPC_CITY_MAN))
862 {
863 cityman->AI()->Talk(SAY_PHASE202);
864 cityman->SetTarget(me->GetGUID());
865 cityman->AddUnitMovementFlag(MOVEMENTFLAG_WALKING);
866 cityman->GetMotionMaster()->MovePoint(0, EventPos[EVENT_DST_CITYMAN]);
867 }
868
869 ScheduleNextEvent(currentEvent, 9s);
870 break;
871 case EVENT_ACTION_PHASE2+2:
873 SetEscortPaused(false);
874 eventInRun = false;
875 ScheduleNextEvent(currentEvent, 1500ms);
876 break;
877 // After waypoint 11
878 case EVENT_ACTION_PHASE2+3:
879 if (Creature* stalker = me->SummonCreature(NPC_INVIS_TARGET, 2081.447f, 1287.770f, 141.3241f, 1.37f, TEMPSUMMON_TIMED_DESPAWN, 10000))
880 {
881 me->SetFacingToObject(stalker);
882 stalker->DespawnOrUnsummon(500ms);
883 }
885 ScheduleNextEvent(currentEvent, 4s);
886 break;
887 case EVENT_ACTION_PHASE2+4:
889 {
890 malganis->CastSpell(malganis, SPELL_MALGANIS_APPEAR, true);
891 malganis->AI()->Talk(SAY_PHASE206);
892 malganis->SetTarget(me->GetGUID());
893 me->SetTarget(malganis->GetGUID());
894 malganis->SetReactState(REACT_PASSIVE);
895
896 std::list<Creature*> unitList;
897 malganis->GetCreaturesWithEntryInRange(unitList, 20.0f, NPC_CITY_MAN);
898 malganis->GetCreaturesWithEntryInRange(unitList, 20.0f, NPC_CITY_MAN2);
899
900 for (std::list<Creature*>::const_iterator itr = unitList.begin(); itr != unitList.end(); ++itr)
901 if ((*itr)->ToCreature())
902 {
903 (*itr)->ToCreature()->AI()->DoAction(ACTION_INFECT_CITIZIEN);
904 (*itr)->GetMotionMaster()->MoveFleeing(malganis, 2000);
905 }
906
907 unitList.clear();
908 }
909
910 ScheduleNextEvent(currentEvent, 12s);
911 break;
912 case EVENT_ACTION_PHASE2+5:
913 if (Creature* malganis = GetEventNpc(NPC_MAL_GANIS))
914 malganis->AI()->Talk(SAY_PHASE207);
915
916 ScheduleNextEvent(currentEvent, 15s);
917 break;
918 case EVENT_ACTION_PHASE2+6:
919 if (Creature* malganis = GetEventNpc(NPC_MAL_GANIS))
920 {
921 me->SetTarget();
922 me->SetFacingToObject(malganis);
923 malganis->SetVisible(false);
924 }
925
927 ScheduleNextEvent(currentEvent, 11s);
928 break;
929 case EVENT_ACTION_PHASE2+7:
935 ScheduleNextEvent(currentEvent, 20s);
936 if (pInstance)
938 break;
939 case EVENT_ACTION_PHASE2+8:
940 if (pInstance)
942
944 break;
945 case EVENT_ACTION_PHASE2+9:
946 if (pInstance)
948
950 eventInRun = false;
951 SetEscortPaused(false);
952 break;
953 // After waypoint 22
957 cr->SetTarget(me->GetGUID());
959 cr->SetTarget(me->GetGUID());
961 cr->SetTarget(me->GetGUID());
962 ScheduleNextEvent(currentEvent, 1s);
963 break;
964 case EVENT_ACTION_PHASE3+1:
967 cr->AI()->Talk(SAY_PHASE302);
968
969 ScheduleNextEvent(currentEvent, 7s);
970 break;
971 case EVENT_ACTION_PHASE3+2:
973 SetEscortPaused(false);
974 eventInRun = false;
975 ScheduleNextEvent(currentEvent, 0ms);
976 break;
977 // After waypoint 23
978 case EVENT_ACTION_PHASE3+3:
979 me->SetWalk(false);
982 ScheduleNextEvent(currentEvent, 2s);
983 break;
984 case EVENT_ACTION_PHASE3+4:
986 ScheduleNextEvent(currentEvent, 2s);
987 break;
988 case EVENT_ACTION_PHASE3+5:
990 cr->AI()->Talk(SAY_PHASE305);
991 ScheduleNextEvent(currentEvent, 1s);
992 break;
993 // Trio citizen transformation right as we enter Town Hall
994 case EVENT_ACTION_PHASE3+6:
996 {
997 cr->UpdateEntry(NPC_INFINITE_HUNTER, nullptr, false);
998 cr->SetFullHealth();
999 cr->SetImmuneToAll(true);
1000 cr->SetReactState(REACT_PASSIVE);
1001 }
1002 ScheduleNextEvent(currentEvent, 2s);
1003 break;
1004 case EVENT_ACTION_PHASE3+7:
1006 {
1007 cr->UpdateEntry(NPC_INFINITE_AGENT, nullptr, false);
1008 cr->SetFullHealth();
1009 cr->SetImmuneToAll(true);
1010 cr->SetReactState(REACT_PASSIVE);
1011 }
1012 ScheduleNextEvent(currentEvent, 2s);
1013 break;
1014 case EVENT_ACTION_PHASE3+8:
1016 {
1017 cr->UpdateEntry(NPC_INFINITE_ADVERSARY, nullptr, false);
1018 cr->SetFullHealth();
1019 cr->SetReactState(REACT_AGGRESSIVE);
1020 cr->SetInCombatWithZone();
1021 cr->AddThreat(me, 0.0f);
1022 }
1024 {
1025 cr->SetImmuneToAll(false);
1026 cr->SetReactState(REACT_AGGRESSIVE);
1027 cr->SetInCombatWithZone();
1028 cr->AddThreat(me, 0.0f);
1029 }
1031 {
1032 cr->SetImmuneToAll(false);
1033 cr->SetReactState(REACT_AGGRESSIVE);
1034 cr->SetInCombatWithZone();
1035 cr->AddThreat(me, 0.0f);
1036 }
1037 ScheduleNextEvent(currentEvent, 2s);
1038 break;
1039 case EVENT_ACTION_PHASE3+9:
1040 // Arthas is fighting infinites in town hall
1041 if (me->IsInCombat())
1042 {
1043 actionEvents.Repeat(1s);
1044 return;
1045 }
1046
1049 me->SetFacingTo(0.0f);
1050 ScheduleNextEvent(currentEvent, 5s);
1051 break;
1052 case EVENT_ACTION_PHASE3+10:
1054 ScheduleNextEvent(currentEvent, 5s);
1055 break;
1056 case EVENT_ACTION_PHASE3+11:
1057 SetEscortPaused(false);
1058 eventInRun = false;
1059 ScheduleNextEvent(currentEvent, 1s);
1060 break;
1061 case EVENT_ACTION_PHASE3+12:
1062 // Arthas is fighting first chronos
1063 if (me->IsInCombat())
1064 {
1065 actionEvents.Repeat(1s);
1066 return;
1067 }
1068
1069 eventInRun = false;
1070 SetEscortPaused(false);
1072 me->SetFacingTo(M_PI);
1073 ScheduleNextEvent(currentEvent, 0ms);
1074 break;
1075 case EVENT_ACTION_PHASE3+13:
1076 // Arthas is fighting second chronos
1077 if (me->IsInCombat())
1078 {
1079 actionEvents.Repeat(1s);
1080 return;
1081 }
1082
1083 eventInRun = false;
1084 SetEscortPaused(false);
1086 me->SetFacingTo(M_PI * 3 / 2);
1087 ScheduleNextEvent(currentEvent, 0ms);
1088 break;
1089 case EVENT_ACTION_PHASE3+14:
1090 // Arthas is fighting third chronos
1091 if (me->IsInCombat())
1092 {
1093 actionEvents.Repeat(1s);
1094 return;
1095 }
1096
1097 me->SetFacingTo(M_PI / 2);
1098 ScheduleNextEvent(currentEvent, 8s);
1099 break;
1100 case EVENT_ACTION_PHASE3+15:
1104 {
1105 cr->SetImmuneToAll(true);
1106 cr->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
1107 me->SetTarget(cr->GetGUID());
1108 cr->GetMotionMaster()->MovePoint(0, EventPos[EVENT_DST_EPOCH]);
1109 }
1110
1111 ScheduleNextEvent(currentEvent, 3s);
1112 break;
1113 case EVENT_ACTION_PHASE3+16:
1114 if (Creature* cr = GetEventNpc(NPC_EPOCH))
1115 cr->AI()->Talk(SAY_PHASE314);
1116
1117 ScheduleNextEvent(currentEvent, 14s);
1118 break;
1119 case EVENT_ACTION_PHASE3+17:
1121 ScheduleNextEvent(currentEvent, 7s);
1122 break;
1123 case EVENT_ACTION_PHASE3+18:
1124 if (Creature* cr = GetEventNpc(NPC_EPOCH))
1125 {
1126 cr->SetImmuneToAll(false);
1127 cr->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
1128 cr->SetReactState(REACT_AGGRESSIVE);
1129 cr->AddThreat(me, 0.0f);
1130 cr->SetInCombatWithZone();
1131 }
1132 ScheduleNextEvent(currentEvent, 1s);
1133 break;
1134 case EVENT_ACTION_PHASE3+19:
1135 // Arthas is fighting epoch chronos
1136 if (me->IsInCombat())
1137 {
1138 actionEvents.Repeat(1s);
1139 return;
1140 }
1141
1142 if (pInstance)
1144
1146 eventInRun = false;
1147 break;
1150 {
1151 cr->SetImmuneToAll(false);
1152 cr->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
1153 cr->SetInCombatWithZone();
1154 cr->AddThreat(me, 0.0f);
1155 AttackStart(cr);
1156 }
1157 eventInRun = false;
1158 SetEscortPaused(true);
1159 break;
1160 case EVENT_ACTION_PHASE5+1:
1162 SetEscortPaused(false);
1163 eventInRun = false;
1164 ScheduleNextEvent(currentEvent, 5s);
1165 break;
1166 case EVENT_ACTION_PHASE5+2:
1167 me->SetFacingTo(5.28f);
1169 if (pInstance)
1170 {
1173 go->SetGoState(GO_STATE_ACTIVE);
1174 }
1175 ScheduleNextEvent(currentEvent, 10s);
1176 break;
1177 case EVENT_ACTION_PHASE5+3:
1178 eventInRun = false;
1179 me->SetVisible(false);
1180 break;
1181 }
1182 }
1183
1184 //Battling skills
1185 if (!me->GetVictim())
1186 return;
1187
1188 combatEvents.Update(diff);
1190 return;
1191
1192 switch (combatEvents.ExecuteEvent())
1193 {
1196 me->CastSpell(target, SPELL_ARTHAS_EXORCISM, false);
1197
1198 combatEvents.Repeat(7s, 14s);
1199 break;
1201 if (HealthBelowPct(40))
1203
1204 combatEvents.Repeat(1s);
1205 break;
1206 }
1207
1209 }
@ FORCED_MOVEMENT_NONE
Definition MotionMaster.h:86
@ TEMPSUMMON_DEAD_DESPAWN
Definition Object.h:55
@ TEMPSUMMON_TIMED_DESPAWN
Definition Object.h:51
@ MOVEMENTFLAG_WALKING
Definition UnitDefines.h:380
@ UNIT_STATE_CASTING
Definition UnitDefines.h:188
@ REACT_PASSIVE
Definition Unit.h:567
void SetTarget(ObjectGuid guid=ObjectGuid::Empty) override
Definition Creature.cpp:3554
void Update(uint32 time)
Definition EventMap.h:67
void Repeat(Milliseconds time)
Definition EventMap.cpp:76
EventId ExecuteEvent()
Definition EventMap.cpp:86
void MovePoint(uint32 id, Position const &pos, ForcedMovement forcedMovement=FORCED_MOVEMENT_NONE, float speed=0.f, bool generatePath=true, bool forceDestination=true, std::optional< AnimTier > animTier=std::nullopt)
Definition MotionMaster.h:240
static ObjectGuid GetGUID(Object const *o)
Definition Object.h:114
StorageType::const_iterator const_iterator
Definition ScriptedCreature.h:37
void DespawnEntry(uint32 entry)
Definition ScriptedCreature.cpp:55
void DoMeleeAttackIfReady()
Definition UnitAI.cpp:41
Unit * SelectTarget(SelectTargetMethod targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
Definition UnitAI.cpp:112
Definition Unit.h:665
void SetVisible(bool x)
Definition Unit.cpp:11058
void SetFacingToObject(WorldObject *object, Milliseconds timed=0ms)
Definition Unit.cpp:16417
MotionMaster * GetMotionMaster()
Definition Unit.h:1756
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:1360
Unit * GetVictim() const
Definition Unit.h:904
bool HasUnitState(const uint32 f) const
Definition Unit.h:737
void SetImmuneToAll(bool apply, bool keepCombat=false)
Definition Unit.h:925
bool IsInCombat() const
Definition Unit.h:936
@ SAY_PHASE210
Definition culling_of_stratholme.cpp:49
@ SAY_PHASE203
Definition culling_of_stratholme.cpp:45
@ SAY_PHASE302
Definition culling_of_stratholme.cpp:107
@ SAY_PHASE105
Definition culling_of_stratholme.cpp:89
@ SAY_PHASE116
Definition culling_of_stratholme.cpp:40
@ SAY_PHASE202
Definition culling_of_stratholme.cpp:100
@ SAY_PHASE109
Definition culling_of_stratholme.cpp:91
@ SAY_PHASE305_1
Definition culling_of_stratholme.cpp:109
@ SAY_PHASE103
Definition culling_of_stratholme.cpp:33
@ SAY_PHASE205
Definition culling_of_stratholme.cpp:46
@ SAY_PHASE111
Definition culling_of_stratholme.cpp:92
@ SAY_PHASE308
Definition culling_of_stratholme.cpp:57
@ SAY_PHASE306
Definition culling_of_stratholme.cpp:55
@ SAY_PHASE315
Definition culling_of_stratholme.cpp:63
@ SAY_PHASE114
Definition culling_of_stratholme.cpp:39
@ SAY_PHASE303
Definition culling_of_stratholme.cpp:53
@ SAY_PHASE311
Definition culling_of_stratholme.cpp:60
@ SAY_PHASE207
Definition culling_of_stratholme.cpp:82
@ SAY_PHASE113
Definition culling_of_stratholme.cpp:96
@ SAY_PHASE209
Definition culling_of_stratholme.cpp:48
@ SAY_PHASE503
Definition culling_of_stratholme.cpp:77
@ SAY_PHASE206
Definition culling_of_stratholme.cpp:81
@ SAY_PHASE112
Definition culling_of_stratholme.cpp:38
@ SAY_PHASE108
Definition culling_of_stratholme.cpp:36
@ SAY_PHASE104
Definition culling_of_stratholme.cpp:34
@ SAY_PHASE117
Definition culling_of_stratholme.cpp:97
@ SAY_PHASE107
Definition culling_of_stratholme.cpp:90
@ SAY_PHASE504
Definition culling_of_stratholme.cpp:78
@ SAY_PHASE101
Definition culling_of_stratholme.cpp:32
@ SAY_PHASE314
Definition culling_of_stratholme.cpp:85
@ SAY_PHASE208
Definition culling_of_stratholme.cpp:47
@ SAY_PHASE102
Definition culling_of_stratholme.cpp:88
@ SAY_PHASE304
Definition culling_of_stratholme.cpp:54
@ SAY_PHASE313
Definition culling_of_stratholme.cpp:62
@ SAY_PHASE110
Definition culling_of_stratholme.cpp:37
@ SAY_PHASE305
Definition culling_of_stratholme.cpp:108
@ SAY_PHASE115
Definition culling_of_stratholme.cpp:93
@ SAY_PHASE106
Definition culling_of_stratholme.cpp:35
@ ACTION_INFECT_CITIZIEN
Definition culling_of_stratholme.cpp:174
@ SPELL_MALGANIS_APPEAR
Definition culling_of_stratholme.cpp:148
@ SPELL_ARTHAS_CRUSADER_STRIKE
Definition culling_of_stratholme.cpp:150
@ SPELL_ARTHAS_EXORCISM
Definition culling_of_stratholme.cpp:144
@ SPELL_ARTHAS_HOLY_LIGHT
Definition culling_of_stratholme.cpp:145
@ NPC_INVIS_TARGET
Definition culling_of_stratholme.cpp:130
@ NPC_INFINITE_ADVERSARY
Definition culling_of_stratholme.cpp:125
@ NPC_HORSE_ESCORT
Definition culling_of_stratholme.cpp:132
@ NPC_INFINITE_AGENT
Definition culling_of_stratholme.cpp:127
@ NPC_INFINITE_HUNTER
Definition culling_of_stratholme.cpp:126
@ EVENT_ACTION_PHASE3
Definition culling_of_stratholme.cpp:202
@ NPC_EPOCH
Definition culling_of_stratholme.h:53
@ NPC_UTHER
Definition culling_of_stratholme.h:58
@ DATA_EXIT_GATE
Definition culling_of_stratholme.h:46
@ COS_PROGRESS_FINISHED
Definition culling_of_stratholme.h:129
@ EVENT_POS_RETREAT
Definition culling_of_stratholme.h:100
@ EVENT_SRC_UTHER
Definition culling_of_stratholme.h:91
@ EVENT_DST_HORSE1
Definition culling_of_stratholme.h:97
@ EVENT_DST_CITYMAN
Definition culling_of_stratholme.h:103
@ EVENT_SRC_EPOCH
Definition culling_of_stratholme.h:110
@ EVENT_DST_UTHER
Definition culling_of_stratholme.h:96
@ EVENT_SRC_MALGANIS
Definition culling_of_stratholme.h:104
@ EVENT_DST_EPOCH
Definition culling_of_stratholme.h:111
@ EVENT_SRC_HORSE1
Definition culling_of_stratholme.h:93
@ EVENT_SRC_JAINA
Definition culling_of_stratholme.h:92
@ DATA_START_WAVES
Definition culling_of_stratholme.h:34
bool HealthBelowPct(uint32 pct) const
Definition ScriptedCreature.h:368
Creature * GetEventNpc(uint32 entry)
Definition culling_of_stratholme.cpp:1213
void ScheduleNextEvent(uint32 currentEvent, Milliseconds time)
Definition culling_of_stratholme.cpp:1229
void SetDespawnAtFar(bool despawn)
Definition ScriptedEscortAI.h:109
void UpdateAI(uint32 diff) override
Use to start attacking a target. Called just before JustEngagedWith()
Definition ScriptedEscortAI.cpp:240
@ NPC_JAINA
Definition zone_undercity.cpp:353

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(), 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(), FORCED_MOVEMENT_NONE, ObjectAccessor::GetCreature(), Object::GetEntry(), GetEventNpc(), Map::GetGameObject(), Object::GetGUID(), InstanceScript::GetGuidData(), Unit::GetMotionMaster(), Unit::GetVictim(), GO_STATE_ACTIVE, Unit::HasUnitState(), ScriptedAI::HealthBelowPct(), InstanceScript::instance, Unit::IsInCombat(), 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, Random, REACT_AGGRESSIVE, REACT_DEFENSIVE, REACT_PASSIVE, EventMap::Repeat(), 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_PHASE305_1, 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::SetDespawnAtFar(), npc_escortAI::SetEscortPaused(), Unit::SetFacingTo(), Unit::SetFacingToObject(), Unit::SetImmuneToAll(), Unit::SetNpcFlag(), Creature::SetReactState(), Creature::SetTarget(), Unit::SetVisible(), Creature::SetWalk(), SPELL_ARTHAS_CRUSADER_STRIKE, SPELL_ARTHAS_EXORCISM, SPELL_ARTHAS_HOLY_LIGHT, SPELL_MALGANIS_APPEAR, npc_escortAI::Start(), WorldObject::SummonCreature(), 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 WORLD_STATE_CULLING_OF_STRATHOLME_WAVE_COUNT.

◆ WaypointReached() [1/2]

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

Implements npc_escortAI.

537 {
538 switch (uiPointId)
539 {
540 // Starting waypoint, After reaching uther and jaina
541 case 0:
542 // On the mountain with uther and jaina
543 case 1:
544 // Reaching city man in city
545 case 9:
546 // Reaching city man in town hall
547 case 23:
548 SetEscortPaused(true);
549 eventInRun = true;
550 break;
551 // After intro, in front of bridge
552 case 3:
553 me->SetWalk(false);
555 summons.DespawnAll(); // uther, jaina and horses
556 break;
557 // Reached City
558 case 8:
560 SetEscortPaused(true);
561 if (pInstance)
563
564 if (Creature* stalker = me->SummonCreature(NPC_INVIS_TARGET, 2026.469f, 1287.088f, 143.596f, 1.37f, TEMPSUMMON_TIMED_DESPAWN, 14000))
565 {
566 me->SetFacingToObject(stalker);
567 stalker->DespawnOrUnsummon(500ms);
568 }
569 break;
570 // Reached first cityman
571 case 10:
572 if (Creature* cityman = GetEventNpc(NPC_CITY_MAN))
573 {
574 cityman->AI()->Talk(SAY_PHASE204);
576 }
577 break;
578 // Reached second cityman
579 case 11:
580 if (Creature* cityman = GetEventNpc(NPC_CITY_MAN2))
581 {
582 cityman->AI()->Talk(SAY_PHASE204_1);
584 }
586 SetEscortPaused(true);
587 eventInRun = true;
588 break;
589 // Reached Town Hall
590 case 20:
591 if (pInstance)
594 me->SetWalk(true);
595 SetEscortPaused(true);
596 break;
597 // Inside Town Hall first scene pos
598 case 22:
600 eventInRun = true;
601 SetEscortPaused(true);
602 break;
603 // Town Hall, upper floor first fight
604 case 26:
605 SetEscortPaused(true);
606 eventInRun = true;
609 break;
610 // Town Hall, upper floor second fight
611 case 29:
615 SetEscortPaused(true);
616 eventInRun = true;
617 break;
618 // Town Hall, upper floor third fight
619 case 31:
620 me->SetWalk(true);
624 SetEscortPaused(true);
625 eventInRun = true;
626 break;
627 // Book Shelf
628 case 34:
630 break;
631 case 35:
633 break;
634 // Reached book shelf
635 case 36:
636 me->SetWalk(false);
637 if (pInstance)
639 pGate->SetGoState(GO_STATE_ACTIVE);
640 break;
641 // Behind secred passage
642 case 45:
643 me->SetWalk(false);
645 SetEscortPaused(true);
646 if (pInstance)
648 break;
649 // Some walk talk
650 case 47:
651 me->SetWalk(true);
653 break;
654 case 48:
655 me->SetWalk(false);
657 break;
658 case 53:
660 break;
661 // Before Malganis event
662 case 54:
663 if (pInstance)
665
667 SetEscortPaused(true);
668 break;
669 // Infront of malganis
670 case 55:
673 SetEscortPaused(true);
674 eventInRun = true;
675 break;
676 // After malganis defeat
677 case 56:
678 SetEscortPaused(true);
679 eventInRun = true;
680 break;
681 }
682 }
@ SAY_PHASE307
Definition culling_of_stratholme.cpp:56
@ SAY_PHASE405
Definition culling_of_stratholme.cpp:70
@ SAY_PHASE312
Definition culling_of_stratholme.cpp:61
@ SAY_PHASE406
Definition culling_of_stratholme.cpp:71
@ SAY_PHASE407
Definition culling_of_stratholme.cpp:72
@ SAY_PHASE502
Definition culling_of_stratholme.cpp:76
@ SAY_PHASE309
Definition culling_of_stratholme.cpp:58
@ SAY_PHASE204_1
Definition culling_of_stratholme.cpp:101
@ SAY_PHASE402
Definition culling_of_stratholme.cpp:67
@ SAY_PHASE118
Definition culling_of_stratholme.cpp:41
@ SAY_PHASE204
Definition culling_of_stratholme.cpp:104
@ SAY_PHASE403
Definition culling_of_stratholme.cpp:68
void SpawnTimeRift()
Definition culling_of_stratholme.cpp:1352

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, ScriptedAI::me, NPC_CITY_MAN, NPC_CITY_MAN2, NPC_INVIS_TARGET, pInstance, REACT_DEFENSIVE, SAY_PHASE118, SAY_PHASE204, SAY_PHASE204_1, 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(), Creature::SetWalk(), SpawnTimeRift(), SPELL_ARTHAS_CRUSADER_STRIKE, WorldObject::SummonCreature(), summons, TEMPSUMMON_TIMED_DESPAWN, and UNIT_NPC_FLAG_GOSSIP.

◆ WaypointReached() [2/2]

virtual void CreatureAI::WaypointReached ( uint32  ,
uint32   
)
inlinevirtual

Reimplemented from CreatureAI.

196{ }

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().


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