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
 Use to start attacking a target. Called just before JustEngagedWith()
 
- 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
 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, 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
 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 (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 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=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)
 
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
 
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=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)
 
WorldObjectGetSummoner () const
 Returns the summoner creature/object, if the creature is a temporary summon.
 
 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 IsSummonedBy (WorldObject *)
 
virtual void SummonedCreatureDespawnAll ()
 
virtual void SummonedCreatureEvade (Creature *)
 
virtual void AttackedBy (Unit *)
 
virtual void PathEndReached (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 *)
 
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 ()
 
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)
 
- 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, 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 JustEnteredCombat (Unit *)
 Called when the unit enters combat.
 
virtual void JustExitedCombat ()
 Called when the unit leaves combat.
 
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)
 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
 
- Protected Attributes inherited from UnitAI
Unit *const me
 

Detailed Description

Constructor & Destructor Documentation

◆ npc_arthasAI()

npc_arthas::npc_arthasAI::npc_arthasAI ( Creature creature)
inline
373 : npc_escortAI(creature), summons(me)
374 {
375 pInstance = creature->GetInstanceScript();
376 }
InstanceScript * GetInstanceScript() const
Definition Object.cpp:1185
Creature * me
Definition ScriptedCreature.h:280
InstanceScript * pInstance
Definition culling_of_stratholme.cpp:378
SummonList summons
Definition culling_of_stratholme.cpp:379
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.

416 {
417 if (param == ACTION_START_EVENT)
418 {
419 // Event
420 eventInRun = true;
422 }
423 else if (param == ACTION_START_CITY)
424 {
427 SetRun(false);
428 eventInRun = true;
429
432 }
433 else if (param == ACTION_KILLED_SALRAMM)
434 {
435 waveGroupId = 10;
436 eventInRun = true;
437 SetRun(true);
439 }
440 else if (param == ACTION_START_TOWN_HALL)
441 {
443 SetEscortPaused(false);
444 SetRun(false);
445
447 {
448 cr->AI()->DoAction(ACTION_FORCE_CHANGE_LOCK);
449 }
451 {
452 cr->AI()->DoAction(ACTION_FORCE_CHANGE_LOCK);
453 }
455 {
456 cr->AI()->DoAction(ACTION_FORCE_CHANGE_LOCK);
457 }
458 }
459 else if (param == ACTION_START_SECRET_PASSAGE)
460 {
462 SetEscortPaused(false);
463 SetRun(false);
464 }
465 else if (param == ACTION_START_LAST_CITY)
466 {
468 SetEscortPaused(false);
469 SetRun(true);
470 }
471 else if (param == ACTION_START_MALGANIS)
472 {
475 {
476 summons.Despawn(cr);
477 summons.Summon(cr);
478 cr->SetImmuneToAll(true);
479 cr->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
480 }
482 SetEscortPaused(false);
483 SetRun(true);
484 }
485 else if (param == ACTION_KILLED_MALGANIS)
486 {
488 eventInRun = true;
490 me->SetFacingTo(1.84f);
491
492 if (!me->GetMap()->GetPlayers().IsEmpty())
493 if (Player* player = me->GetMap()->GetPlayers().getFirst()->GetSource())
494 player->RewardPlayerAndGroupAtEvent(31006, player); // Malganis quest entry required
495 }
496 }
@ UNIT_FLAG_NON_ATTACKABLE
Definition UnitDefines.h:251
@ ACTION_START_EVENT
Definition chapter5.cpp:194
Definition Creature.h:43
void ScheduleEvent(uint32 eventId, uint32 time, uint32 group=0, uint32 phase=0)
Definition EventMap.cpp:56
bool IsEmpty() const
Definition LinkedList.h:97
MapReference * getFirst()
Definition MapRefMgr.h:31
PlayerList const & GetPlayers() const
Definition Map.h:324
Definition Player.h:1083
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(uint32 delay=0)
Definition ScriptedCreature.cpp:71
void SetFacingTo(float ori)
Definition Unit.cpp:20368
Map * GetMap() const
Definition Object.h:587
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:2350
@ 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:176
@ 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:186
@ EVENT_ACTION_PHASE5
Definition culling_of_stratholme.cpp:188
@ EVENT_ACTION_PHASE1
Definition culling_of_stratholme.cpp:185
@ ACTION_START_CITY
Definition culling_of_stratholme.h:133
@ ACTION_START_LAST_CITY
Definition culling_of_stratholme.h:137
@ ACTION_START_TOWN_HALL
Definition culling_of_stratholme.h:135
@ ACTION_KILLED_SALRAMM
Definition culling_of_stratholme.h:134
@ ACTION_KILLED_MALGANIS
Definition culling_of_stratholme.h:140
@ ACTION_START_SECRET_PASSAGE
Definition culling_of_stratholme.h:136
@ ACTION_START_MALGANIS
Definition culling_of_stratholme.h:139
@ NPC_MAL_GANIS
Definition culling_of_stratholme.h:52
@ EVENT_SRC_HALL_CITYMAN1
Definition culling_of_stratholme.h:105
@ EVENT_SRC_HALL_CITYMAN2
Definition culling_of_stratholme.h:106
@ EVENT_SRC_TOWN_CITYMAN1
Definition culling_of_stratholme.h:99
@ EVENT_SRC_HALL_CITYMAN3
Definition culling_of_stratholme.h:107
@ EVENT_SRC_MALGANIS_FINAL
Definition culling_of_stratholme.h:111
@ EVENT_SRC_TOWN_CITYMAN2
Definition culling_of_stratholme.h:100
const Position EventPos[]
Definition culling_of_stratholme.h:151
Talk
Definition hyjal.cpp:82
uint8 waveGroupId
Definition culling_of_stratholme.cpp:383
EventMap actionEvents
Definition culling_of_stratholme.cpp:381
bool eventInRun
Definition culling_of_stratholme.cpp:380
void EnterEvadeMode(EvadeReason=EVADE_REASON_OTHER) override
Definition ScriptedEscortAI.cpp:194
void SetRun(bool on=true)
Definition ScriptedEscortAI.cpp:421
void SetEscortPaused(bool on)
Definition ScriptedEscortAI.cpp:516

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)
1207{
1208 for (SummonList::iterator i = summons.begin(); i != summons.end();)
1209 {
1210 Creature* summon = ObjectAccessor::GetCreature(*me, *i);
1211 if (!summon)
1212 summons.erase(i++);
1213 else if (summon->GetEntry() == entry)
1214 return summon;
1215 else
1216 ++i;
1217 }
1218
1219 return nullptr;
1220}
uint32 GetEntry() const
Definition Object.h:116
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.

396 {
398 if (pInstance)
400 }
@ 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:111

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

1244{
1246
1247 // Fight
1250}
SpellCastResult DoCast(uint32 spellId)
Definition UnitAI.cpp:177
@ SPELL_ARTHAS_AURA
Definition culling_of_stratholme.cpp:143
@ EVENT_COMBAT_HEALTH_CHECK
Definition culling_of_stratholme.cpp:184
@ EVENT_COMBAT_EXORCISM
Definition culling_of_stratholme.cpp:183
EventMap combatEvents
Definition culling_of_stratholme.cpp:382

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.

403 {
404 summons.Summon(cr);
405 }

References SummonList::Summon(), and summons.

◆ ReorderInstance()

void npc_arthas::npc_arthasAI::ReorderInstance ( uint32  data)
1253{
1254 Start(true, true);
1255 SetEscortPaused(true);
1256 SetDespawnAtEnd(false);
1257
1258 switch (data)
1259 {
1261 SetNextWaypoint(9, false);
1263 break;
1267 SetNextWaypoint(12, false);
1269
1271 {
1272 eventInRun = true;
1274 }
1275 else if (data == COS_PROGRESS_KILLED_MEATHOOK)
1276 {
1277 waveGroupId = 4;
1279 }
1280 else // if (data == COS_PROGRESS_KILLED_SALRAMM)
1281 {
1282 if (pInstance)
1285 }
1286 break;
1288 SetNextWaypoint(21, false);
1290 break;
1292 SetNextWaypoint(32, false);
1294 break;
1296 SetNextWaypoint(46, false);
1298 break;
1300 SetNextWaypoint(55, false);
1302 break;
1303 }
1304
1305 if (data >= COS_PROGRESS_KILLED_EPOCH)
1306 if (pInstance)
1308 pGate->SetGoState(GO_STATE_READY);
1309
1311}
@ GO_STATE_READY
Definition GameObjectData.h:690
@ UNIT_NPC_FLAG_GOSSIP
Definition UnitDefines.h:315
@ REACT_DEFENSIVE
Definition Unit.h:550
@ 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:95
void RescheduleEvent(uint32 eventId, uint32 time, uint32 groupId=0, uint32 phase=0)
Definition EventMap.cpp:81
Definition GameObject.h:120
ObjectGuid GetGuidData(uint32 type) const override
Definition InstanceScript.cpp:110
Map * instance
Definition InstanceScript.h:149
void DoUpdateWorldState(uint32 worldstateId, uint32 worldstateValue)
Definition InstanceScript.cpp:621
GameObject * GetGameObject(ObjectGuid const guid)
Definition Map.cpp:2394
void SetNpcFlag(NPCFlags flags)
Definition Unit.h:719
@ 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:123
@ COS_PROGRESS_KILLED_EPOCH
Definition culling_of_stratholme.h:124
@ COS_PROGRESS_LAST_CITY
Definition culling_of_stratholme.h:125
@ COS_PROGRESS_KILLED_MEATHOOK
Definition culling_of_stratholme.h:121
@ COS_PROGRESS_FINISHED_CITY_INTRO
Definition culling_of_stratholme.h:120
@ COS_PROGRESS_FINISHED_INTRO
Definition culling_of_stratholme.h:119
@ COS_PROGRESS_KILLED_SALRAMM
Definition culling_of_stratholme.h:122
@ COS_PROGRESS_BEFORE_MALGANIS
Definition culling_of_stratholme.h:126
@ DATA_SHOW_INFINITE_TIMER
Definition culling_of_stratholme.h:35
void DoAction(int32 param) override
Definition culling_of_stratholme.cpp:415
void SendNextWave(uint32 entry)
Definition culling_of_stratholme.cpp:1313
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:442
void SetDespawnAtEnd(bool despawn)
Definition ScriptedEscortAI.h:104
bool SetNextWaypoint(uint32 pointId, float x, float y, float z, float orientation)
Definition ScriptedEscortAI.cpp:527

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

Referenced by Reset().

◆ Reset()

void npc_arthas::npc_arthasAI::Reset ( )
inlineoverridevirtual

Reimplemented from UnitAI.

499 {
503 eventInRun = false;
504 waveGroupId = 0;
505 waveKillCount = 0;
506 timeRiftId = 0;
507
509
510 if (pInstance)
511 {
514 if (data >= COS_PROGRESS_FINISHED_INTRO)
515 ReorderInstance(data);
516 }
517 }
std::uint32_t uint32
Definition Define.h:107
void Reset()
Definition EventMap.cpp:21
void RemoveNpcFlag(NPCFlags flags)
Definition Unit.h:720
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:384
uint8 timeRiftId
Definition culling_of_stratholme.cpp:385
void ReorderInstance(uint32 data)
Definition culling_of_stratholme.cpp:1252

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 
)
1223{
1224 actionEvents.ScheduleEvent(currentEvent + 1, time);
1225}

Referenced by UpdateAI().

◆ SendNextWave()

void npc_arthas::npc_arthasAI::SendNextWave ( uint32  entry)
1314{
1315 if (!pInstance)
1316 return;
1317
1318 if (entry == NPC_MEATHOOK)
1319 {
1320 waveKillCount = 4;
1322 }
1323 else if (entry == NPC_SALRAMM)
1324 {
1326 return;
1327 }
1328
1329 // Group is killed
1330 if (++waveKillCount >= 4)
1331 {
1332 waveGroupId++;
1333 if (waveGroupId == 4) // Meathook
1335 else if (waveGroupId == 9) // Salramm
1337 else
1339
1341 }
1342}
@ NPC_SALRAMM
Definition culling_of_stratholme.h:50
@ EVENT_SRC_SALRAMM
Definition culling_of_stratholme.h:104
@ EVENT_SRC_MEATHOOK
Definition culling_of_stratholme.h:103
void SummonNextWave()
Definition culling_of_stratholme.cpp:1227

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 ( )
1345{
1346 if (timeRiftId >= 5)
1347 return;
1348
1350 {
1351 // Spawn everyone at time rift pos
1353 {
1354 if (cr->GetEntry() == NPC_TIME_RIFT)
1355 cr->DespawnOrUnsummon(10000);
1356 else // x, y, z (0 is entry)
1357 {
1358 // first infinite
1359 if (i == 1)
1360 AttackStart(cr);
1361
1362 cr->SetInCombatWithZone();
1363 cr->AddThreat(me, 0.0f);
1364 cr->SetReactState(REACT_AGGRESSIVE);
1366 }
1367 }
1368 }
1369
1370 timeRiftId++;
1371}
std::uint8_t uint8
Definition Define.h:109
@ REACT_AGGRESSIVE
Definition Unit.h:551
@ POINT_CHRONOS
Definition culling_of_stratholme.cpp:178
@ ENCOUNTER_CHRONO_MAX_SPAWNS_FIRST
Definition culling_of_stratholme.cpp:172
@ ENCOUNTER_CHRONO_MAX_SPAWNS_SECOND
Definition culling_of_stratholme.cpp:173
float RiftAndSpawnsLocations[ENCOUNTER_CHRONO_NUMBER][ENCOUNTER_CHRONO_MAX_SPAWNS_FIRST][5]
Definition culling_of_stratholme.cpp:245
@ NPC_TIME_RIFT
Definition culling_of_stratholme.h:59
void AttackStart(Unit *who) override
Definition ScriptedEscortAI.cpp:45

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.

407{ summons.Despawn(cr); }

References SummonList::Despawn(), and summons.

◆ SummonedCreatureDies()

◆ SummonNextWave()

void npc_arthas::npc_arthasAI::SummonNextWave ( )
1228{
1229 Map::PlayerList const& PlayerList = me->GetMap()->GetPlayers();
1230 if (!PlayerList.IsEmpty())
1231 for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
1232 i->GetSource()->PlayerTalkClass->SendPointOfInterest(1000 + waveGroupId);
1233
1234 waveKillCount = 0; // this is forced condition!
1235 uint32 tableId = waveGroupId;
1236 if (tableId > 4)
1237 tableId--;
1238
1239 for (uint32 i = 0; i < ENCOUNTER_WAVES_MAX_SPAWNS; ++i)
1240 me->SummonCreature(/*entry*/(uint32)WavesLocations[tableId][i][0], WavesLocations[tableId][i][1], WavesLocations[tableId][i][2], WavesLocations[tableId][i][3], WavesLocations[tableId][i][4]);
1241}
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:168
float WavesLocations[ENCOUNTER_WAVES_NUMBER][ENCOUNTER_WAVES_MAX_SPAWNS][5]
Definition culling_of_stratholme.cpp:192

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.

668 {
670
671 if (eventInRun)
672 {
673 actionEvents.Update(diff);
674 switch (uint32 currentEvent = actionEvents.ExecuteEvent())
675 {
677 SetRun(false);
680 {
682 uther->SetTarget(me->GetGUID());
683 me->SetTarget(uther->GetGUID());
684 }
685 for (int i = 0; i < 3; ++i)
687 horse->GetMotionMaster()->MovePoint(0, EventPos[EVENT_DST_HORSE1 + i], false);
688
689 ScheduleNextEvent(currentEvent, 4000);
690 break;
691 case EVENT_ACTION_PHASE1+1:
692 // Start Event
693 Start(true, false);
694 SetDespawnAtEnd(false);
695 SetDespawnAtFar(false);
696
697 ScheduleNextEvent(currentEvent, 9000);
698 break;
699 // After waypoint 0
700 case EVENT_ACTION_PHASE1+2:
702 ScheduleNextEvent(currentEvent, 2000);
703 break;
704 case EVENT_ACTION_PHASE1+3:
705 if (Creature* uther = GetEventNpc(NPC_UTHER))
706 uther->AI()->Talk(SAY_PHASE102);
707
708 ScheduleNextEvent(currentEvent, 8000);
709 break;
710 case EVENT_ACTION_PHASE1+4:
711 SetEscortPaused(false);
712 eventInRun = false;
714 ScheduleNextEvent(currentEvent, 2000);
715 break;
716 // After waypoint 1
717 case EVENT_ACTION_PHASE1+5:
718 if (Creature* jaina = GetEventNpc(NPC_JAINA))
719 jaina->SetTarget(me->GetGUID());
720
722 ScheduleNextEvent(currentEvent, 10000);
723 break;
724 case EVENT_ACTION_PHASE1+6:
725 if (Creature* uther = GetEventNpc(NPC_UTHER))
726 uther->AI()->Talk(SAY_PHASE105);
727
728 ScheduleNextEvent(currentEvent, 1000);
729 break;
730 case EVENT_ACTION_PHASE1+7:
732 ScheduleNextEvent(currentEvent, 4000);
733 break;
734 case EVENT_ACTION_PHASE1+8:
735 if (Creature* uther = GetEventNpc(NPC_UTHER))
736 uther->AI()->Talk(SAY_PHASE107);
737
738 ScheduleNextEvent(currentEvent, 6000);
739 break;
740 case EVENT_ACTION_PHASE1+9:
742 ScheduleNextEvent(currentEvent, 4000);
743 break;
744 case EVENT_ACTION_PHASE1+10:
745 if (Creature* uther = GetEventNpc(NPC_UTHER))
746 uther->AI()->Talk(SAY_PHASE109);
747
748 ScheduleNextEvent(currentEvent, 8000);
749 break;
750 case EVENT_ACTION_PHASE1+11:
752 ScheduleNextEvent(currentEvent, 4000);
753 break;
754 case EVENT_ACTION_PHASE1+12:
755 if (Creature* uther = GetEventNpc(NPC_UTHER))
756 uther->AI()->Talk(SAY_PHASE111);
757
758 ScheduleNextEvent(currentEvent, 4000);
759 break;
760 case EVENT_ACTION_PHASE1+13:
762 ScheduleNextEvent(currentEvent, 11000);
763 break;
764 case EVENT_ACTION_PHASE1+14:
765 if (Creature* jaina = GetEventNpc(NPC_JAINA))
766 jaina->AI()->Talk(SAY_PHASE113);
767
768 ScheduleNextEvent(currentEvent, 2500);
769 break;
770 case EVENT_ACTION_PHASE1+15:
772 ScheduleNextEvent(currentEvent, 9000);
773 break;
774 case EVENT_ACTION_PHASE1+16:
775 if (Creature* uther = GetEventNpc(NPC_UTHER))
776 uther->AI()->Talk(SAY_PHASE115);
777
778 ScheduleNextEvent(currentEvent, 4000);
779 break;
780 case EVENT_ACTION_PHASE1+17:
781 for (SummonList::const_iterator i = summons.begin(); i != summons.end(); ++i)
782 {
784 if (summon && summon->GetEntry() == NPC_HORSE_ESCORT)
786 }
787
788 ScheduleNextEvent(currentEvent, 1000);
789 break;
790 case EVENT_ACTION_PHASE1+18:
791 if (Creature* uther = GetEventNpc(NPC_UTHER))
792 {
793 uther->SetTarget();
794 uther->AddUnitMovementFlag(MOVEMENTFLAG_WALKING);
795 uther->GetMotionMaster()->MovePoint(0, EventPos[EVENT_POS_RETREAT], false);
796 }
797 ScheduleNextEvent(currentEvent, 1000);
798 break;
799 case EVENT_ACTION_PHASE1+19:
800 if (Creature* jaina = GetEventNpc(NPC_JAINA))
801 {
802 jaina->SetTarget();
803 jaina->AddUnitMovementFlag(MOVEMENTFLAG_WALKING);
804 jaina->GetMotionMaster()->MovePoint(0, EventPos[EVENT_POS_RETREAT], false);
805 }
807 ScheduleNextEvent(currentEvent, 2000);
808 break;
809 case EVENT_ACTION_PHASE1+20:
810 if (Creature* jaina = GetEventNpc(NPC_JAINA))
811 {
812 jaina->GetMotionMaster()->MoveIdle();
813 jaina->AI()->Talk(SAY_PHASE117);
814 }
815
816 ScheduleNextEvent(currentEvent, 2000);
817 break;
818 case EVENT_ACTION_PHASE1+21:
819 if (Creature* jaina = GetEventNpc(NPC_JAINA))
820 {
821 jaina->AddUnitMovementFlag(MOVEMENTFLAG_WALKING);
822 jaina->GetMotionMaster()->MovePoint(0, EventPos[EVENT_POS_RETREAT], false);
823 }
825 ScheduleNextEvent(currentEvent, 4000);
826 break;
827 case EVENT_ACTION_PHASE1+22:
828 SetEscortPaused(false);
829 eventInRun = false;
830 me->SetTarget();
831 // dont schedule next, do it in gossip select!
832 break;
833 //After Gossip 1 (waypoint 8)
835 summons.DespawnEntry(NPC_INVIS_TARGET); // remove trigger
836 me->SetTarget();
837 SetEscortPaused(false);
838 eventInRun = false;
839 ScheduleNextEvent(currentEvent, 1000);
840 break;
841 // After waypoint 9
842 case EVENT_ACTION_PHASE2+1:
843 if (Creature* cityman = GetEventNpc(NPC_CITY_MAN))
844 {
845 cityman->AI()->Talk(SAY_PHASE202);
846 cityman->SetTarget(me->GetGUID());
847 cityman->AddUnitMovementFlag(MOVEMENTFLAG_WALKING);
848 cityman->GetMotionMaster()->MovePoint(0, EventPos[EVENT_DST_CITYMAN]);
849 }
850
851 ScheduleNextEvent(currentEvent, 9000);
852 break;
853 case EVENT_ACTION_PHASE2+2:
855 SetEscortPaused(false);
856 eventInRun = false;
857 ScheduleNextEvent(currentEvent, 1500);
858 break;
859 // After waypoint 11
860 case EVENT_ACTION_PHASE2+3:
861 if (Creature* stalker = me->SummonCreature(NPC_INVIS_TARGET, 2081.447f, 1287.770f, 141.3241f, 1.37f, TEMPSUMMON_TIMED_DESPAWN, 10000))
862 {
863 me->SetFacingToObject(stalker);
864 stalker->DespawnOrUnsummon(500);
865 }
867 ScheduleNextEvent(currentEvent, 4000);
868 break;
869 case EVENT_ACTION_PHASE2+4:
871 {
872 malganis->CastSpell(malganis, SPELL_MALGANIS_APPEAR, true);
873 malganis->AI()->Talk(SAY_PHASE206);
874 malganis->SetTarget(me->GetGUID());
875 me->SetTarget(malganis->GetGUID());
876 malganis->SetReactState(REACT_PASSIVE);
877
878 std::list<Creature*> unitList;
879 malganis->GetCreaturesWithEntryInRange(unitList, 20.0f, NPC_CITY_MAN);
880 malganis->GetCreaturesWithEntryInRange(unitList, 20.0f, NPC_CITY_MAN2);
881
882 for (std::list<Creature*>::const_iterator itr = unitList.begin(); itr != unitList.end(); ++itr)
883 if ((*itr)->ToCreature())
884 {
885 (*itr)->ToCreature()->AI()->DoAction(ACTION_INFECT_CITIZIEN);
886 (*itr)->GetMotionMaster()->MoveFleeing(malganis, 2000);
887 }
888
889 unitList.clear();
890 }
891
892 ScheduleNextEvent(currentEvent, 12000);
893 break;
894 case EVENT_ACTION_PHASE2+5:
895 if (Creature* malganis = GetEventNpc(NPC_MAL_GANIS))
896 malganis->AI()->Talk(SAY_PHASE207);
897
898 ScheduleNextEvent(currentEvent, 15000);
899 break;
900 case EVENT_ACTION_PHASE2+6:
901 if (Creature* malganis = GetEventNpc(NPC_MAL_GANIS))
902 {
903 me->SetTarget();
904 me->SetFacingToObject(malganis);
905 malganis->SetVisible(false);
906 }
907
909 ScheduleNextEvent(currentEvent, 11000);
910 break;
911 case EVENT_ACTION_PHASE2+7:
917 ScheduleNextEvent(currentEvent, 20000);
918 if (pInstance)
920 break;
921 case EVENT_ACTION_PHASE2+8:
922 if (pInstance)
924
926 break;
927 case EVENT_ACTION_PHASE2+9:
928 if (pInstance)
930
932 eventInRun = false;
933 SetEscortPaused(false);
934 break;
935 // After waypoint 22
939 cr->SetTarget(me->GetGUID());
941 cr->SetTarget(me->GetGUID());
943 cr->SetTarget(me->GetGUID());
944 ScheduleNextEvent(currentEvent, 1000);
945 break;
946 case EVENT_ACTION_PHASE3+1:
949 cr->AI()->Talk(SAY_PHASE302);
950
951 ScheduleNextEvent(currentEvent, 7000);
952 break;
953 case EVENT_ACTION_PHASE3+2:
955 SetEscortPaused(false);
956 eventInRun = false;
957 ScheduleNextEvent(currentEvent, 0);
958 break;
959 // After waypoint 23
960 case EVENT_ACTION_PHASE3+3:
961 SetRun(true);
964 ScheduleNextEvent(currentEvent, 2000);
965 break;
966 case EVENT_ACTION_PHASE3+4:
968 ScheduleNextEvent(currentEvent, 2000);
969 break;
970 case EVENT_ACTION_PHASE3+5:
972 cr->AI()->Talk(SAY_PHASE305);
973 ScheduleNextEvent(currentEvent, 1000);
974 break;
975 // Trio citizen transformation right as we enter Town Hall
976 case EVENT_ACTION_PHASE3+6:
978 {
979 cr->UpdateEntry(NPC_INFINITE_HUNTER, nullptr, false);
980 cr->SetFullHealth();
981 cr->SetImmuneToAll(true);
982 cr->SetReactState(REACT_PASSIVE);
983 }
984 ScheduleNextEvent(currentEvent, 2000);
985 break;
986 case EVENT_ACTION_PHASE3+7:
988 {
989 cr->UpdateEntry(NPC_INFINITE_AGENT, nullptr, false);
990 cr->SetFullHealth();
991 cr->SetImmuneToAll(true);
992 cr->SetReactState(REACT_PASSIVE);
993 }
994 ScheduleNextEvent(currentEvent, 2000);
995 break;
996 case EVENT_ACTION_PHASE3+8:
998 {
999 cr->UpdateEntry(NPC_INFINITE_ADVERSARY, nullptr, false);
1000 cr->SetFullHealth();
1001 cr->SetReactState(REACT_AGGRESSIVE);
1002 cr->SetInCombatWithZone();
1003 cr->AddThreat(me, 0.0f);
1004 }
1006 {
1007 cr->SetImmuneToAll(false);
1008 cr->SetReactState(REACT_AGGRESSIVE);
1009 cr->SetInCombatWithZone();
1010 cr->AddThreat(me, 0.0f);
1011 }
1013 {
1014 cr->SetImmuneToAll(false);
1015 cr->SetReactState(REACT_AGGRESSIVE);
1016 cr->SetInCombatWithZone();
1017 cr->AddThreat(me, 0.0f);
1018 }
1019 ScheduleNextEvent(currentEvent, 2000);
1020 break;
1021 case EVENT_ACTION_PHASE3+9:
1022 // Arthas is fighting infinites in town hall
1023 if (me->IsInCombat())
1024 {
1026 return;
1027 }
1028
1031 me->SetFacingTo(0.0f);
1032 ScheduleNextEvent(currentEvent, 5000);
1033 break;
1034 case EVENT_ACTION_PHASE3+10:
1036 ScheduleNextEvent(currentEvent, 5000);
1037 break;
1038 case EVENT_ACTION_PHASE3+11:
1039 SetEscortPaused(false);
1040 eventInRun = false;
1041 ScheduleNextEvent(currentEvent, 1000);
1042 break;
1043 case EVENT_ACTION_PHASE3+12:
1044 // Arthas is fighting first chronos
1045 if (me->IsInCombat())
1046 {
1048 return;
1049 }
1050
1051 eventInRun = false;
1052 SetEscortPaused(false);
1054 me->SetFacingTo(M_PI);
1055 ScheduleNextEvent(currentEvent, 0);
1056 break;
1057 case EVENT_ACTION_PHASE3+13:
1058 // Arthas is fighting second chronos
1059 if (me->IsInCombat())
1060 {
1062 return;
1063 }
1064
1065 eventInRun = false;
1066 SetEscortPaused(false);
1068 me->SetFacingTo(M_PI * 3 / 2);
1069 ScheduleNextEvent(currentEvent, 0);
1070 break;
1071 case EVENT_ACTION_PHASE3+14:
1072 // Arthas is fighting third chronos
1073 if (me->IsInCombat())
1074 {
1076 return;
1077 }
1078
1079 me->SetFacingTo(M_PI / 2);
1080 ScheduleNextEvent(currentEvent, 8000);
1081 break;
1082 case EVENT_ACTION_PHASE3+15:
1086 {
1087 cr->SetImmuneToAll(true);
1088 cr->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
1089 me->SetTarget(cr->GetGUID());
1090 cr->GetMotionMaster()->MovePoint(0, EventPos[EVENT_DST_EPOCH]);
1091 }
1092
1093 ScheduleNextEvent(currentEvent, 3000);
1094 break;
1095 case EVENT_ACTION_PHASE3+16:
1096 if (Creature* cr = GetEventNpc(NPC_EPOCH))
1097 cr->AI()->Talk(SAY_PHASE314);
1098
1099 ScheduleNextEvent(currentEvent, 14000);
1100 break;
1101 case EVENT_ACTION_PHASE3+17:
1103 ScheduleNextEvent(currentEvent, 7000);
1104 break;
1105 case EVENT_ACTION_PHASE3+18:
1106 if (Creature* cr = GetEventNpc(NPC_EPOCH))
1107 {
1108 cr->SetImmuneToAll(false);
1109 cr->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
1110 cr->SetReactState(REACT_AGGRESSIVE);
1111 cr->AddThreat(me, 0.0f);
1112 cr->SetInCombatWithZone();
1113 }
1114 ScheduleNextEvent(currentEvent, 1000);
1115 break;
1116 case EVENT_ACTION_PHASE3+19:
1117 // Arthas is fighting epoch chronos
1118 if (me->IsInCombat())
1119 {
1121 return;
1122 }
1123
1124 if (pInstance)
1126
1128 eventInRun = false;
1129 break;
1132 {
1133 cr->SetImmuneToAll(false);
1134 cr->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
1135 cr->SetInCombatWithZone();
1136 cr->AddThreat(me, 0.0f);
1137 AttackStart(cr);
1138 }
1139 eventInRun = false;
1140 SetEscortPaused(true);
1141 break;
1142 case EVENT_ACTION_PHASE5+1:
1144 SetEscortPaused(false);
1145 eventInRun = false;
1146 ScheduleNextEvent(currentEvent, 5000);
1147 break;
1148 case EVENT_ACTION_PHASE5+2:
1149 me->SetFacingTo(5.28f);
1151 if (pInstance)
1152 {
1155 go->SetGoState(GO_STATE_ACTIVE);
1156
1157 if (!me->GetMap()->GetPlayers().IsEmpty())
1158 {
1159 if (Player* player = me->GetMap()->GetPlayers().getFirst()->GetSource())
1160 {
1161 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))
1162 {
1163 chest->SetLootRecipient(me->GetMap());
1164 }
1165 }
1166 }
1167 }
1168 ScheduleNextEvent(currentEvent, 10000);
1169 break;
1170 case EVENT_ACTION_PHASE5+3:
1171 eventInRun = false;
1172 me->SetVisible(false);
1173 break;
1174 }
1175 }
1176
1177 //Battling skills
1178 if (!me->GetVictim())
1179 return;
1180
1181 combatEvents.Update(diff);
1183 return;
1184
1185 switch (combatEvents.ExecuteEvent())
1186 {
1190
1192 break;
1194 if (HealthBelowPct(40))
1196
1198 break;
1199 }
1200
1202 }
@ GO_STATE_ACTIVE
Definition GameObjectData.h:689
@ TEMPSUMMON_DEAD_DESPAWN
Definition Object.h:53
@ TEMPSUMMON_TIMED_DESPAWN
Definition Object.h:49
@ MOVEMENTFLAG_WALKING
Definition UnitDefines.h:373
@ UNIT_STATE_CASTING
Definition UnitDefines.h:185
@ REACT_PASSIVE
Definition Unit.h:549
void SetTarget(ObjectGuid guid=ObjectGuid::Empty) override
Definition Creature.cpp:3560
uint32 ExecuteEvent()
Definition EventMap.cpp:114
void Update(uint32 time)
Definition EventMap.h:54
void RepeatEvent(uint32 time)
Definition EventMap.cpp:99
void MovePoint(uint32 id, const Position &pos, bool generatePath=true, bool forceDestination=true)
Definition MotionMaster.h:213
static ObjectGuid GetGUID(Object const *o)
Definition Object.h:113
StorageType::const_iterator const_iterator
Definition ScriptedCreature.h:37
void DespawnEntry(uint32 entry)
Definition ScriptedCreature.cpp:54
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
Definition Unit.h:620
void SetVisible(bool x)
Definition Unit.cpp:14324
MotionMaster * GetMotionMaster()
Definition Unit.h:1673
void SetFacingToObject(WorldObject *object)
Definition Unit.cpp:20378
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:1193
Unit * GetVictim() const
Definition Unit.h:848
bool HasUnitState(const uint32 f) const
Definition Unit.h:691
void SetImmuneToAll(bool apply, bool keepCombat=false)
Definition Unit.h:869
bool IsInCombat() const
Definition Unit.h:879
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:2364
@ 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:175
@ SPELL_MALGANIS_APPEAR
Definition culling_of_stratholme.cpp:149
@ SPELL_ARTHAS_EXORCISM_N
Definition culling_of_stratholme.cpp:144
@ SPELL_ARTHAS_CRUSADER_STRIKE
Definition culling_of_stratholme.cpp:151
@ SPELL_ARTHAS_HOLY_LIGHT
Definition culling_of_stratholme.cpp:146
@ SPELL_ARTHAS_EXORCISM_H
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:187
@ 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:127
@ EVENT_POS_RETREAT
Definition culling_of_stratholme.h:98
@ EVENT_SRC_UTHER
Definition culling_of_stratholme.h:89
@ EVENT_DST_HORSE1
Definition culling_of_stratholme.h:95
@ EVENT_DST_CITYMAN
Definition culling_of_stratholme.h:101
@ EVENT_SRC_EPOCH
Definition culling_of_stratholme.h:108
@ EVENT_DST_UTHER
Definition culling_of_stratholme.h:94
@ EVENT_SRC_MALGANIS
Definition culling_of_stratholme.h:102
@ EVENT_DST_EPOCH
Definition culling_of_stratholme.h:109
@ EVENT_SRC_HORSE1
Definition culling_of_stratholme.h:91
@ EVENT_SRC_JAINA
Definition culling_of_stratholme.h:90
@ DATA_START_WAVES
Definition culling_of_stratholme.h:34
const T & DUNGEON_MODE(const T &normal5, const T &heroic10) const
Definition ScriptedCreature.h:388
bool HealthBelowPct(uint32 pct) const
Definition ScriptedCreature.h:364
void ScheduleNextEvent(uint32 currentEvent, uint32 time)
Definition culling_of_stratholme.cpp:1222
Creature * GetEventNpc(uint32 entry)
Definition culling_of_stratholme.cpp:1206
void SetDespawnAtFar(bool despawn)
Definition ScriptedEscortAI.h:105
void UpdateAI(uint32 diff) override
Use to start attacking a target. Called just before JustEngagedWith()
Definition ScriptedEscortAI.cpp:233
@ NPC_JAINA
Definition zone_undercity.cpp:406

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(), 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::RepeatEvent(), 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(), 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 WORLD_STATE_CULLING_OF_STRATHOLME_WAVE_COUNT.

◆ WaypointReached()

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

Implements npc_escortAI.

520 {
521 switch (uiPointId)
522 {
523 // Starting waypoint, After reaching uther and jaina
524 case 0:
525 // On the mountain with uther and jaina
526 case 1:
527 // Reaching city man in city
528 case 9:
529 // Reaching city man in town hall
530 case 23:
531 SetEscortPaused(true);
532 eventInRun = true;
533 break;
534 // After intro, in front of bridge
535 case 3:
536 SetRun(true);
538 summons.DespawnAll(); // uther, jaina and horses
539 break;
540 // Reached City
541 case 8:
543 SetEscortPaused(true);
544 if (pInstance)
546
547 if (Creature* stalker = me->SummonCreature(NPC_INVIS_TARGET, 2026.469f, 1287.088f, 143.596f, 1.37f, TEMPSUMMON_TIMED_DESPAWN, 14000))
548 {
549 me->SetFacingToObject(stalker);
550 stalker->DespawnOrUnsummon(500);
551 }
552 break;
553 // Reached first cityman
554 case 10:
555 if (Creature* cityman = GetEventNpc(NPC_CITY_MAN))
556 {
557 cityman->AI()->Talk(SAY_PHASE204);
559 }
560 break;
561 // Reached second cityman
562 case 11:
563 if (Creature* cityman = GetEventNpc(NPC_CITY_MAN2))
564 {
565 cityman->AI()->Talk(SAY_PHASE204_1);
567 }
569 SetEscortPaused(true);
570 eventInRun = true;
571 break;
572 // Reached Town Hall
573 case 20:
574 if (pInstance)
577 SetRun(false);
578 SetEscortPaused(true);
579 break;
580 // Inside Town Hall first scene pos
581 case 22:
583 eventInRun = true;
584 SetEscortPaused(true);
585 break;
586 // Town Hall, upper floor first fight
587 case 26:
588 SetEscortPaused(true);
589 eventInRun = true;
592 break;
593 // Town Hall, upper floor second fight
594 case 29:
598 SetEscortPaused(true);
599 eventInRun = true;
600 break;
601 // Town Hall, upper floor third fight
602 case 31:
603 SetRun(false);
607 SetEscortPaused(true);
608 eventInRun = true;
609 break;
610 // Book Shelf
611 case 34:
613 break;
614 case 35:
616 break;
617 // Reached book shelf
618 case 36:
619 SetRun(true);
620 if (pInstance)
622 pGate->SetGoState(GO_STATE_ACTIVE);
623 break;
624 // Behind secred passage
625 case 45:
626 SetRun(true);
628 SetEscortPaused(true);
629 if (pInstance)
631 break;
632 // Some walk talk
633 case 47:
634 SetRun(false);
636 break;
637 case 48:
638 SetRun(true);
640 break;
641 case 53:
643 break;
644 // Before Malganis event
645 case 54:
646 if (pInstance)
648
650 SetEscortPaused(true);
651 break;
652 // Infront of malganis
653 case 55:
656 SetEscortPaused(true);
657 eventInRun = true;
658 break;
659 // After malganis defeat
660 case 56:
661 SetEscortPaused(true);
662 eventInRun = true;
663 break;
664 }
665 }
@ 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:1344

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


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