AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
boss_the_lich_king::boss_the_lich_kingAI Struct Reference
Inheritance diagram for boss_the_lich_king::boss_the_lich_kingAI:
BossAI ScriptedAI CreatureAI UnitAI

Public Member Functions

 boss_the_lich_kingAI (Creature *creature)
 
void Reset () override
 
void JustDied (Unit *) override
 
void JustEngagedWith (Unit *target) override
 Called for reaction when initially engaged. More...
 
bool CanAIAttack (Unit const *target) const override
 
void KilledUnit (Unit *victim) override
 
void DoAction (int32 action) override
 
void DamageTaken (Unit *attacker, uint32 &damage, DamageEffectType, SpellSchoolMask) override
 Called at any Damage from any attacker (before damage apply) More...
 
void JustSummoned (Creature *summon) override
 
void SummonedCreatureDies (Creature *summon, Unit *) override
 
void SpellHit (Unit *, SpellInfo const *spell) override
 
void SpellHitTarget (Unit *, SpellInfo const *spell) override
 
void MovementInform (uint32 type, uint32 pointId) override
 
void UpdateAI (uint32 diff) override
 Use to start attacking a target. Called just before JustEngagedWith() More...
 
uint32 GetData (uint32 type) const override
 
void SetData (uint32 type, uint32 value) override
 
void EnterEvadeMode (EvadeReason why) override
 
- Public Member Functions inherited from BossAI
 BossAI (Creature *creature, uint32 bossId)
 
 ~BossAI () override
 
bool CanRespawn () override
 
void DamageTaken (Unit *attacker, uint32 &damage, DamageEffectType damagetype, SpellSchoolMask damageSchoolMask) override
 Called at any Damage from any attacker (before damage apply) More...
 
void JustSummoned (Creature *summon) override
 
void SummonedCreatureDespawn (Creature *summon) override
 
void SummonedCreatureDespawnAll () override
 
void UpdateAI (uint32 diff) override
 Use to start attacking a target. Called just before JustEngagedWith() More...
 
void ScheduleHealthCheckEvent (uint32 healthPct, std::function< void()> exec)
 Executes a function once the creature reaches the defined health point percent. More...
 
void ScheduleHealthCheckEvent (std::initializer_list< uint8 > healthPct, std::function< void()> exec)
 
virtual void ExecuteEvent (uint32)
 
virtual void ScheduleTasks ()
 
void Reset () override
 
void JustEngagedWith (Unit *) override
 Called for reaction when initially engaged. More...
 
void EnterEvadeMode (EvadeReason why=EVADE_REASON_OTHER) override
 
void JustDied (Unit *) override
 
void JustReachedHome () override
 
- 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) More...
 
void UpdateAI (uint32 diff) override
 Use to start attacking a target. Called just before JustEngagedWith() More...
 
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. More...
 
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
 
- 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. More...
 
void Talk (uint8 id, Milliseconds delay)
 
 CreatureAI (Creature *creature)
 
 ~CreatureAI () override
 
void MoveCircleChecks ()
 
void MoveBackwardsChecks ()
 
void MoveInLineOfSight_Safe (Unit *who)
 == Reactions At ================================= More...
 
void TriggerAlert (Unit const *who) const
 
virtual bool CanRespawn ()
 
virtual void EnterEvadeMode (EvadeReason why=EVADE_REASON_OTHER)
 
virtual void JustEngagedWith (Unit *)
 Called for reaction when initially engaged. More...
 
virtual void JustDied (Unit *)
 
virtual void KilledUnit (Unit *)
 
virtual void JustSummoned (Creature *)
 
virtual void IsSummonedBy (WorldObject *)
 
virtual void SummonedCreatureDespawn (Creature *)
 
virtual void SummonedCreatureDies (Creature *, Unit *)
 
virtual void SummonedCreatureDespawnAll ()
 
virtual void SummonedCreatureEvade (Creature *)
 
virtual void SpellHit (Unit *, SpellInfo const *)
 
virtual void SpellHitTarget (Unit *, SpellInfo const *)
 
virtual void AttackedBy (Unit *)
 
virtual bool IsEscorted ()
 
virtual void JustRespawned ()
 
virtual void MovementInform (uint32, uint32)
 
virtual void PathEndReached (uint32)
 
void OnCharmed (bool apply) override
 Called when unit is charmed. More...
 
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 ================== More...
 
virtual void PassengerBoarded (Unit *, int8, bool)
 == Fields ======================================= More...
 
virtual bool BeforeSpellClick (Unit *)
 
virtual void OnSpellClick (Unit *, bool &)
 
virtual bool CanSeeAlways (WorldObject const *)
 
virtual bool CanBeSeen (Player const *)
 
virtual bool CanAlwaysBeDetectable (WorldObject const *)
 
virtual void PetStopAttack ()
 
virtual bool CheckInRoom ()
 
CreatureBoundary const * GetBoundary () const
 
void SetBoundary (CreatureBoundary const *boundary, bool negativeBoundaries=false)
 
bool IsInBoundary (Position const *who=nullptr) const
 
virtual void CalculateThreat (Unit *, float &, SpellInfo const *)
 
virtual bool OnTeleportUnreacheablePlayer (Player *)
 
virtual void OnAuraRemove (AuraApplication *, AuraRemoveMode)
 
- Public Member Functions inherited from UnitAI
 UnitAI (Unit *unit)
 
virtual ~UnitAI ()
 
virtual bool CanAIAttack (Unit const *) const
 
virtual void AttackStart (Unit *)
 
virtual void UpdateAI (uint32)=0
 Use to start attacking a target. Called just before JustEngagedWith() More...
 
virtual void InitializeAI ()
 
virtual void Reset ()
 
virtual void OnCharmed (bool apply)=0
 Called when unit is charmed. More...
 
virtual void DoAction (int32)
 
virtual uint32 GetData (uint32) const
 
virtual void SetData (uint32, uint32)
 
virtual void SetGUID (ObjectGuid, int32=0)
 
virtual ObjectGuid GetGUID (int32=0) const
 
UnitSelectTarget (SelectTargetMethod targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
 
template<class PREDICATE >
UnitSelectTarget (SelectTargetMethod targetType, uint32 position, PREDICATE const &predicate)
 
void SelectTargetList (std::list< Unit * > &targetList, uint32 num, SelectTargetMethod targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
 Select the best (up to) <num> targets (in <targetType> order) from the threat list that fulfill the following: More...
 
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. More...
 
virtual void JustExitedCombat ()
 Called when the unit leaves combat. More...
 
virtual void DamageDealt (Unit *, uint32 &, DamageEffectType)
 Called at any Damage to any victim (before damage apply) More...
 
virtual void DamageTaken (Unit *, uint32 &, DamageEffectType, SpellSchoolMask)
 Called at any Damage from any attacker (before damage apply) More...
 
virtual void HealReceived (Unit *, uint32 &)
 Called when the creature receives heal. More...
 
virtual void OnPowerUpdate (Powers, int32, int32, uint32)
 Called when the creature power updates. More...
 
virtual void HealDone (Unit *, uint32 &)
 Called when the unit heals. More...
 
virtual void OnCalculateMeleeDamageReceived (uint32 &, Unit *)
 Called during damage calculations. More...
 
virtual void OnCalculateSpellDamageReceived (int32 &, Unit *)
 
virtual void OnCalculatePeriodicTickReceived (uint32 &, Unit *)
 Called during calculation when receiving periodic healing or damage (DoT or HoT) More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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

uint8 _phase
 
uint32 _necroticPlagueStack
 
uint32 _vileSpiritExplosions
 
uint16 _positionCheckTimer
 
uint32 _lastTalkTimeKill
 
uint32 _lastTalkTimeBuff
 
bool _bFrostmournePhase
 
bool _bFordringMustFallYell
 
- Public Attributes inherited from BossAI
float callForHelpRange
 
InstanceScript *const instance
 
- 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 BossAI
void _Reset ()
 
void _JustEngagedWith ()
 
void _JustDied ()
 
void _JustReachedHome ()
 
void _EnterEvadeMode (EvadeReason why=EVADE_REASON_OTHER)
 
void TeleportCheaters ()
 
- Protected Member Functions inherited from CreatureAI
bool UpdateVictim ()
 
bool UpdateVictimWithGaze ()
 
void SetGazeOn (Unit *target)
 
CreatureDoSummon (uint32 entry, Position const &pos, uint32 despawnTime=30000, TempSummonType summonType=TEMPSUMMON_CORPSE_TIMED_DESPAWN)
 
CreatureDoSummon (uint32 entry, WorldObject *obj, float radius=5.0f, uint32 despawnTime=30000, TempSummonType summonType=TEMPSUMMON_CORPSE_TIMED_DESPAWN)
 
CreatureDoSummonFlyer (uint32 entry, WorldObject *obj, float flightZ, float radius=5.0f, uint32 despawnTime=30000, TempSummonType summonType=TEMPSUMMON_CORPSE_TIMED_DESPAWN)
 
virtual void MoveInLineOfSight (Unit *)
 
bool _EnterEvadeMode (EvadeReason why=EVADE_REASON_OTHER)
 
- Protected Attributes inherited from BossAI
SummonList summons
 
- 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

◆ boss_the_lich_kingAI()

boss_the_lich_king::boss_the_lich_kingAI::boss_the_lich_kingAI ( Creature creature)
inline
636 : BossAI(creature, DATA_THE_LICH_KING)
637 {
639 me->SetImmuneToPC(true);
641 }
@ REACT_PASSIVE
Definition: Unit.h:548
@ SPELL_EMOTE_SIT_NO_SHEATH
Definition: boss_the_lich_king.cpp:82
@ DATA_THE_LICH_KING
Definition: icecrown_citadel.h:104
Creature * me
Definition: ScriptedCreature.h:280
Definition: ScriptedCreature.h:457
void SetReactState(ReactStates state)
A creature can have 3 ReactStates : Agressive, Passive, Neutral.
Definition: Creature.h:97
Aura * AddAura(uint32 spellId, Unit *target)
Definition: Unit.cpp:18819
void SetImmuneToPC(bool apply, bool keepCombat=false)
Definition: Unit.cpp:13568

References Unit::AddAura(), ScriptedAI::me, REACT_PASSIVE, Unit::SetImmuneToPC(), Creature::SetReactState(), and SPELL_EMOTE_SIT_NO_SHEATH.

Member Function Documentation

◆ CanAIAttack()

bool boss_the_lich_king::boss_the_lich_kingAI::CanAIAttack ( Unit const *  target) const
inlineoverridevirtual

Reimplemented from UnitAI.

717 {
718 return me->IsVisible() && IsValidPlatformTarget(target) && !target->GetVehicle();
719 }
bool IsValidPlatformTarget(Unit const *target)
Definition: boss_the_lich_king.cpp:363
bool IsVisible() const
Definition: Unit.h:1481

References Unit::GetVehicle(), IsValidPlatformTarget(), Unit::IsVisible(), and ScriptedAI::me.

◆ DamageTaken()

void boss_the_lich_king::boss_the_lich_kingAI::DamageTaken ( Unit ,
uint32 ,
DamageEffectType  ,
SpellSchoolMask   
)
inlineoverridevirtual

Called at any Damage from any attacker (before damage apply)

Note
It use for recalculation damage or special reaction at damage for attack reaction use AttackedBy called for non DOT damage in Unit::DealDamage also

Reimplemented from BossAI.

769 {
770 if (!attacker || (_bFrostmournePhase && attacker->GetExactDistSq(495.708f, -2523.76f, 1049.95f) > 40.0f * 40.0f)) // frostmourne room, prevent exploiting (tele hack to get back and damage him)
771 {
772 damage = 0;
773 return;
774 }
775
777 {
780 me->AttackStop();
781 events.CancelEventGroup(EVENT_GROUP_ABILITIES);
784 return;
785 }
786
788 {
791 me->AttackStop();
792 events.CancelEventGroup(EVENT_GROUP_ABILITIES);
795 return;
796 }
797
799 {
803 events.Reset();
806 me->AttackStop();
809 me->CastSpell((Unit*)nullptr, SPELL_FURY_OF_FROSTMOURNE, false);
810 me->SetWalk(true);
811
813 tirion->AI()->DoAction(ACTION_OUTRO);
814 return;
815 }
816
817 if (_phase == PHASE_OUTRO)
818 {
819 if (!me->IsLevitating())
820 damage = me->GetHealth() > 1 ? 1 : 0;
821 else if (damage >= me->GetHealth()) // dying...
822 {
823 damage = me->GetHealth() - 1;
824 me->SetDisableGravity(false);
826 if (Creature* frostmourne = me->FindNearestCreature(NPC_FROSTMOURNE_TRIGGER, 50.0f))
827 frostmourne->DespawnOrUnsummon(1);
829 terenas->DespawnOrUnsummon(1);
830
831 me->m_Events.AddEvent(new LichKingDeathEvent(*me), me->m_Events.CalculateTime(2500)); // die after spinning anim is over, so death anim is visible
833 }
834
835 if (!_bFordringMustFallYell && me->GetHealth() < 500000)
836 {
839 {
840 tirion->AI()->Talk(SAY_TIRION_OUTRO_3);
841 }
842 }
843 }
844 else if (damage >= me->GetHealth())
845 damage = me->GetHealth() - 1;
846 }
@ UNIT_STATE_CASTING
Definition: UnitDefines.h:164
@ EVENT_GROUP_ABILITIES
Definition: boss_the_lich_king.cpp:293
@ MUSIC_FURY_OF_FROSTMOURNE
Definition: boss_the_lich_king.cpp:352
@ ACTION_TELEPORT_BACK
Definition: boss_the_lich_king.cpp:342
@ ACTION_OUTRO
Definition: boss_the_lich_king.cpp:340
@ SPELL_FURY_OF_FROSTMOURNE
Definition: boss_the_lich_king.cpp:89
@ PHASE_ONE
Definition: boss_the_lich_king.cpp:302
@ PHASE_TRANSITION
Definition: boss_the_lich_king.cpp:305
@ PHASE_OUTRO
Definition: boss_the_lich_king.cpp:307
@ PHASE_THREE
Definition: boss_the_lich_king.cpp:304
@ PHASE_TWO
Definition: boss_the_lich_king.cpp:303
@ POINT_CENTER_2
Definition: boss_the_lich_king.cpp:328
@ POINT_CENTER_1
Definition: boss_the_lich_king.cpp:327
@ SAY_TIRION_OUTRO_3
Definition: boss_the_lich_king.cpp:66
Position const CenterPosition
Definition: boss_the_lich_king.cpp:313
@ NPC_FROSTMOURNE_TRIGGER
Definition: icecrown_citadel.h:371
@ NPC_TERENAS_MENETHIL_OUTRO
Definition: icecrown_citadel.h:372
@ NPC_STRANGULATE_VEHICLE
Definition: icecrown_citadel.h:367
@ AREA_THE_FROZEN_THRONE
Definition: icecrown_citadel.h:586
@ DATA_HIGHLORD_TIRION_FORDRING
Definition: icecrown_citadel.h:134
events
Definition: boss_sartura.cpp:43
Creature * GetCreature(WorldObject const &u, ObjectGuid const guid)
Definition: ObjectAccessor.cpp:213
void AddEvent(BasicEvent *Event, uint64 e_time, bool set_addtime=true)
Definition: EventProcessor.h:103
uint64 CalculateTime(uint64 t_offset) const
Definition: EventProcessor.cpp:159
void DespawnAll(uint32 delay=0)
Definition: ScriptedCreature.cpp:71
void DoAction(int32 info, uint16 max=0)
Definition: ScriptedCreature.h:102
Definition: ScriptedCreature.h:167
bool HealthAbovePct(uint32 pct) const
Definition: ScriptedCreature.h:365
bool HealthBelowPct(uint32 pct) const
Definition: ScriptedCreature.h:364
InstanceScript *const instance
Definition: ScriptedCreature.h:464
SummonList summons
Definition: ScriptedCreature.h:501
Definition: Creature.h:46
bool SetDisableGravity(bool disable, bool packetOnly=false, bool updateAnimationTier=true) override
Enable or disable the creature's fly mode by adding or removing: MOVEMENTFLAG_FLYING....
Definition: Creature.cpp:3192
bool SetWalk(bool enable) override
Enable or disable the creature's walk mode by removing: MOVEMENTFLAG_WALKING. Infom also the client.
Definition: Creature.cpp:3178
Map * GetMap() const
Definition: Object.h:531
Creature * FindNearestCreature(uint32 entry, float range, bool alive=true) const
Definition: Object.cpp:2446
Definition: Unit.h:630
void InterruptNonMeleeSpells(bool withDelayed, uint32 spellid=0, bool withInstant=true, bool bySelf=false)
Definition: Unit.cpp:4111
MotionMaster * GetMotionMaster()
Definition: Unit.h:1601
bool IsLevitating() const
Definition: Unit.h:1694
EventProcessor m_Events
Definition: Unit.h:1792
uint32 GetHealth() const
Definition: Unit.h:869
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:1168
bool HasUnitState(const uint32 f) const
Definition: Unit.h:673
bool AttackStop()
Force the unit to stop attacking. This will clear UNIT_STATE_MELEE_ATTACKING, Interrupt current spell...
Definition: Unit.cpp:10365
ObjectGuid GetGuidData(uint32 type) const override
Definition: InstanceScript.cpp:95
void SetZoneMusic(uint32 zoneId, uint32 musicId)
Definition: Map.cpp:3759
void MovePoint(uint32 id, const Position &pos, bool generatePath=true, bool forceDestination=true)
Definition: MotionMaster.h:211
void MoveFall(uint32 id=0, bool addFlagForNPC=false)
The unit will fall. Used when in the air. Doesn't work with UNIT_FLAG_DISABLE_MOVE.
Definition: MotionMaster.cpp:624
Definition: boss_the_lich_king.cpp:566
Definition: boss_the_lich_king.cpp:582
bool _bFordringMustFallYell
Definition: boss_the_lich_king.cpp:650
uint8 _phase
Definition: boss_the_lich_king.cpp:643
bool _bFrostmournePhase
Definition: boss_the_lich_king.cpp:649

References _bFordringMustFallYell, _bFrostmournePhase, _phase, ACTION_OUTRO, ACTION_TELEPORT_BACK, EventProcessor::AddEvent(), AREA_THE_FROZEN_THRONE, Unit::AttackStop(), EventProcessor::CalculateTime(), Unit::CastSpell(), CenterPosition, DATA_HIGHLORD_TIRION_FORDRING, SummonList::DespawnAll(), SummonList::DoAction(), EVENT_GROUP_ABILITIES, WorldObject::FindNearestCreature(), ObjectAccessor::GetCreature(), Position::GetExactDistSq(), InstanceScript::GetGuidData(), Unit::GetHealth(), WorldObject::GetMap(), Unit::GetMotionMaster(), Unit::HasUnitState(), ScriptedAI::HealthAbovePct(), ScriptedAI::HealthBelowPct(), BossAI::instance, Unit::InterruptNonMeleeSpells(), Unit::IsLevitating(), Unit::m_Events, ScriptedAI::me, MotionMaster::MoveFall(), MotionMaster::MovePoint(), MUSIC_FURY_OF_FROSTMOURNE, NPC_FROSTMOURNE_TRIGGER, NPC_STRANGULATE_VEHICLE, NPC_TERENAS_MENETHIL_OUTRO, PHASE_ONE, PHASE_OUTRO, PHASE_THREE, PHASE_TRANSITION, PHASE_TWO, POINT_CENTER_1, POINT_CENTER_2, REACT_PASSIVE, SAY_TIRION_OUTRO_3, Creature::SetDisableGravity(), Creature::SetReactState(), Creature::SetWalk(), Map::SetZoneMusic(), SPELL_FURY_OF_FROSTMOURNE, BossAI::summons, and UNIT_STATE_CASTING.

◆ DoAction()

void boss_the_lich_king::boss_the_lich_kingAI::DoAction ( int32  action)
inlineoverridevirtual

Reimplemented from UnitAI.

736 {
737 switch (action)
738 {
742 break;
744 events.ScheduleEvent(EVENT_START_ATTACK, 5250ms);
745 break;
751 tirion->AI()->DoAction(ACTION_BREAK_FROSTMOURNE);
752 break;
754 {
756 events.RescheduleEvent(EVENT_START_ATTACK, 1s);
759 if (!IsHeroic() && _phase != PHASE_OUTRO && me->IsInCombat() && _lastTalkTimeBuff + 5 <= GameTime::GetGameTime().count())
761 }
762 break;
763 default:
764 break;
765 }
766 }
@ EQUIP_BROKEN_FROSTMOURNE
Definition: boss_the_lich_king.cpp:356
@ ACTION_BREAK_FROSTMOURNE
Definition: boss_the_lich_king.cpp:341
@ ACTION_START_ATTACK
Definition: boss_the_lich_king.cpp:339
@ SPELL_SUMMON_BROKEN_FROSTMOURNE_2
Definition: boss_the_lich_king.cpp:98
@ SPELL_SUMMON_BROKEN_FROSTMOURNE
Definition: boss_the_lich_king.cpp:97
@ PHASE_FROSTMOURNE
Definition: boss_the_lich_king.cpp:306
@ SAY_LK_FROSTMOURNE_ESCAPE
Definition: boss_the_lich_king.cpp:46
@ EVENT_START_ATTACK
Definition: boss_the_lich_king.cpp:241
@ ACTION_RESTORE_LIGHT
Definition: icecrown_citadel.h:543
Talk
Definition: hyjal.cpp:82
@ WEATHER_STATE_FINE
Definition: Weather.h:47
Seconds GetGameTime()
Definition: GameTime.cpp:38
bool IsHeroic() const
Definition: ScriptedCreature.h:379
void SetEquipmentSlots(bool loadDefault, int32 mainHand=EQUIP_NO_CHANGE, int32 offHand=EQUIP_NO_CHANGE, int32 ranged=EQUIP_NO_CHANGE)
Definition: ScriptedCreature.cpp:520
bool IsInCombat() const
Definition: Unit.h:820
void SetZoneWeather(uint32 zoneId, WeatherState weatherId, float weatherGrade)
Definition: Map.cpp:3779
void SetZoneOverrideLight(uint32 zoneId, uint32 lightId, Milliseconds fadeInTime)
Definition: Map.cpp:3800
uint32 _lastTalkTimeBuff
Definition: boss_the_lich_king.cpp:648

References _lastTalkTimeBuff, _phase, ACTION_BREAK_FROSTMOURNE, ACTION_RESTORE_LIGHT, ACTION_START_ATTACK, ACTION_TELEPORT_BACK, AREA_THE_FROZEN_THRONE, Unit::CastSpell(), DATA_HIGHLORD_TIRION_FORDRING, SummonList::DoAction(), EQUIP_BROKEN_FROSTMOURNE, EVENT_START_ATTACK, ObjectAccessor::GetCreature(), GameTime::GetGameTime(), InstanceScript::GetGuidData(), WorldObject::GetMap(), BossAI::instance, ScriptedAI::IsHeroic(), Unit::IsInCombat(), ScriptedAI::me, NPC_STRANGULATE_VEHICLE, PHASE_FROSTMOURNE, PHASE_OUTRO, SAY_LK_FROSTMOURNE_ESCAPE, ScriptedAI::SetEquipmentSlots(), Map::SetZoneOverrideLight(), Map::SetZoneWeather(), SPELL_SUMMON_BROKEN_FROSTMOURNE, SPELL_SUMMON_BROKEN_FROSTMOURNE_2, BossAI::summons, and WEATHER_STATE_FINE.

Referenced by JustDied(), and Reset().

◆ EnterEvadeMode()

void boss_the_lich_king::boss_the_lich_kingAI::EnterEvadeMode ( EvadeReason  why)
inlineoverridevirtual

Reimplemented from BossAI.

1264 {
1271
1273 tirion->DespawnOrUnsummon();
1274 }
@ FAIL
Definition: InstanceScript.h:59
@ REACT_AGGRESSIVE
Definition: Unit.h:550
@ SPELL_KILL_FROSTMOURNE_PLAYERS
Definition: boss_the_lich_king.cpp:162
void EnterEvadeMode(EvadeReason why=EVADE_REASON_OTHER) override
Definition: ScriptedCreature.h:488
virtual bool SetBossState(uint32 id, EncounterState state)
Definition: InstanceScript.cpp:351

References ACTION_TELEPORT_BACK, Unit::CastSpell(), DATA_HIGHLORD_TIRION_FORDRING, DATA_THE_LICH_KING, SummonList::DoAction(), BossAI::EnterEvadeMode(), FAIL, ObjectAccessor::GetCreature(), InstanceScript::GetGuidData(), BossAI::instance, ScriptedAI::me, NPC_STRANGULATE_VEHICLE, REACT_AGGRESSIVE, InstanceScript::SetBossState(), Creature::SetReactState(), SPELL_KILL_FROSTMOURNE_PLAYERS, and BossAI::summons.

Referenced by JustEngagedWith().

◆ GetData()

uint32 boss_the_lich_king::boss_the_lich_kingAI::GetData ( uint32  type) const
inlineoverridevirtual

Reimplemented from UnitAI.

1234 {
1235 switch (type)
1236 {
1237 case DATA_PLAGUE_STACK:
1238 return _necroticPlagueStack;
1239 case DATA_VILE:
1240 return _vileSpiritExplosions;
1241 default:
1242 break;
1243 }
1244
1245 return 0;
1246 }
#define DATA_PLAGUE_STACK
Definition: boss_the_lich_king.cpp:360
#define DATA_VILE
Definition: boss_the_lich_king.cpp:361
uint32 _vileSpiritExplosions
Definition: boss_the_lich_king.cpp:645
uint32 _necroticPlagueStack
Definition: boss_the_lich_king.cpp:644

References _necroticPlagueStack, _vileSpiritExplosions, DATA_PLAGUE_STACK, and DATA_VILE.

◆ JustDied()

void boss_the_lich_king::boss_the_lich_kingAI::JustDied ( Unit )
inlineoverridevirtual

Reimplemented from BossAI.

686 {
687 _JustDied();
689 me->PlayDirectSound(17374);
690 }
void _JustDied()
Definition: ScriptedCreature.cpp:614
void PlayDirectSound(uint32 sound_id, Player *target=nullptr)
Definition: Object.cpp:2890
void DoAction(int32 action) override
Definition: boss_the_lich_king.cpp:735

References BossAI::_JustDied(), ACTION_RESTORE_LIGHT, DoAction(), ScriptedAI::me, and WorldObject::PlayDirectSound().

◆ JustEngagedWith()

void boss_the_lich_king::boss_the_lich_kingAI::JustEngagedWith ( Unit )
inlineoverridevirtual

Called for reaction when initially engaged.

Reimplemented from BossAI.

693 {
694 if (!instance->CheckRequiredBosses(DATA_THE_LICH_KING, target->ToPlayer()) || !me->IsVisible())
695 {
698 return;
699 }
700
703 me->setActive(true);
706
707 events.ScheduleEvent(EVENT_BERSERK, 15min, EVENT_GROUP_BERSERK);
710 events.ScheduleEvent(EVENT_INFEST, 5s, EVENT_GROUP_ABILITIES);
711 events.ScheduleEvent(EVENT_NECROTIC_PLAGUE, 30s, 31s, EVENT_GROUP_ABILITIES);
712 if (IsHeroic())
713 events.ScheduleEvent(EVENT_SHADOW_TRAP, 15s + 500ms, EVENT_GROUP_ABILITIES);
714 }
@ IN_PROGRESS
Definition: InstanceScript.h:58
@ EVENT_GROUP_BERSERK
Definition: boss_the_lich_king.cpp:294
@ EVENT_SUMMON_SHAMBLING_HORROR
Definition: boss_the_lich_king.cpp:246
@ EVENT_SHADOW_TRAP
Definition: boss_the_lich_king.cpp:250
@ EVENT_NECROTIC_PLAGUE
Definition: boss_the_lich_king.cpp:249
@ EVENT_INFEST
Definition: boss_the_lich_king.cpp:248
@ EVENT_BERSERK
Definition: boss_the_lich_king.cpp:240
@ EVENT_SUMMON_DRUDGE_GHOUL
Definition: boss_the_lich_king.cpp:247
@ LIGHT_S_HAMMER_TELEPORT
Definition: icecrown_citadel.h:80
@ EVADE_REASON_OTHER
Definition: CreatureAI.h:94
void SetInCombatWithZone()
Set in combat all units in the dungeon/raid. Affect only units with IsAIEnabled.
Definition: Creature.cpp:2806
void setActive(bool isActiveObject)
Definition: Object.cpp:1085
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint8 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Definition: Unit.cpp:4891
void DoCastSpellOnPlayers(uint32 spell)
Definition: InstanceScript.cpp:650
virtual bool CheckRequiredBosses(uint32, Player const *=nullptr) const
Definition: InstanceScript.h:248
void EnterEvadeMode(EvadeReason why) override
Definition: boss_the_lich_king.cpp:1263

References _phase, InstanceScript::CheckRequiredBosses(), DATA_THE_LICH_KING, InstanceScript::DoCastSpellOnPlayers(), EnterEvadeMode(), CreatureAI::EVADE_REASON_OTHER, EVENT_BERSERK, EVENT_GROUP_ABILITIES, EVENT_GROUP_BERSERK, EVENT_INFEST, EVENT_NECROTIC_PLAGUE, EVENT_SHADOW_TRAP, EVENT_SUMMON_DRUDGE_GHOUL, EVENT_SUMMON_SHAMBLING_HORROR, IN_PROGRESS, BossAI::instance, ScriptedAI::IsHeroic(), Unit::IsVisible(), LIGHT_S_HAMMER_TELEPORT, ScriptedAI::me, PHASE_ONE, Unit::RemoveAurasDueToSpell(), WorldObject::setActive(), InstanceScript::SetBossState(), Creature::SetInCombatWithZone(), SPELL_EMOTE_SIT_NO_SHEATH, and Object::ToPlayer().

◆ JustSummoned()

void boss_the_lich_king::boss_the_lich_kingAI::JustSummoned ( Creature summon)
inlineoverridevirtual

Reimplemented from BossAI.

849 {
851 {
852 return;
853 }
854
855 switch (summon->GetEntry())
856 {
858 case NPC_DRUDGE_GHOUL:
860 summon->CastSpell(summon, SPELL_RISEN_WITCH_DOCTOR_SPAWN, true);
863 summon->m_Events.AddEvent(new StartMovementEvent(me, summon), summon->m_Events.CalculateTime(5000));
864 break;
867 break;
868 case NPC_VILE_SPIRIT:
869 {
871 summon->GetMotionMaster()->MoveRandom(10.0f);
872 if (_phase == PHASE_THREE)
873 summon->m_Events.AddEvent(new VileSpiritActivateEvent(summon), summon->m_Events.CalculateTime(15000));
874 break;
875 }
877 summons.Summon(summon);
878 return;
879 case NPC_DEFILE:
881 summon->m_positionZ = 840.86f;
882 summon->UpdatePosition(summon->GetPositionX(), summon->GetPositionY(), summon->GetPositionZ(), summon->GetOrientation(), true);
883 summon->StopMovingOnCurrentPos();
884 break;
886 if (_phase == PHASE_THREE || events.GetNextEventTime(EVENT_QUAKE_2))
887 summon->DespawnOrUnsummon(1);
888 break;
889 default:
890 break;
891 }
892
893 BossAI::JustSummoned(summon);
894 }
@ SPELL_RISEN_WITCH_DOCTOR_SPAWN
Definition: boss_the_lich_king.cpp:124
@ EVENT_QUAKE_2
Definition: boss_the_lich_king.cpp:243
@ NPC_RAGING_SPIRIT
Definition: icecrown_citadel.h:361
@ NPC_VALKYR_SHADOWGUARD
Definition: icecrown_citadel.h:364
@ NPC_SHAMBLING_HORROR
Definition: icecrown_citadel.h:358
@ NPC_HIGHLORD_TIRION_FORDRING_LK
Definition: icecrown_citadel.h:354
@ NPC_VILE_SPIRIT
Definition: icecrown_citadel.h:365
@ NPC_DEFILE
Definition: icecrown_citadel.h:362
@ NPC_SHADOW_TRAP_TRIGGER
Definition: icecrown_citadel.h:363
@ NPC_DRUDGE_GHOUL
Definition: icecrown_citadel.h:359
@ EMOTE_ONESHOT_EMERGE
Definition: SharedDefines.h:2043
void Summon(Creature const *summon)
Definition: ScriptedCreature.h:88
void JustSummoned(Creature *summon) override
Definition: ScriptedCreature.cpp:674
void SetHomePosition(float x, float y, float z, float o)
Definition: Creature.h:337
void DespawnOrUnsummon(Milliseconds msTimeToDespawn, Seconds forcedRespawnTimer)
Definition: Creature.cpp:2173
uint32 GetEntry() const
Definition: Object.h:112
float m_positionZ
Definition: Position.h:58
float GetPositionZ() const
Definition: Position.h:119
float GetOrientation() const
Definition: Position.h:120
float GetPositionX() const
Definition: Position.h:117
float GetPositionY() const
Definition: Position.h:118
virtual bool UpdatePosition(float x, float y, float z, float ang, bool teleport=false)
Definition: Unit.cpp:19983
void StopMovingOnCurrentPos()
Definition: Unit.cpp:16645
void HandleEmoteCommand(uint32 emoteId)
Definition: Unit.cpp:1984
void MoveRandom(float wanderDistance=0.0f)
Enable a random movement in desired range around the unit. Doesn't work with UNIT_FLAG_DISABLE_MOVE.
Definition: MotionMaster.cpp:242
Definition: boss_the_lich_king.cpp:500
Definition: boss_the_lich_king.cpp:523

References _phase, EventProcessor::AddEvent(), EventProcessor::CalculateTime(), Unit::CastSpell(), CenterPosition, Creature::DespawnOrUnsummon(), EMOTE_ONESHOT_EMERGE, EVENT_QUAKE_2, Object::GetEntry(), Unit::GetMotionMaster(), Position::GetOrientation(), Position::GetPositionX(), Position::GetPositionY(), Position::GetPositionZ(), Unit::HandleEmoteCommand(), BossAI::JustSummoned(), Unit::m_Events, Position::m_positionZ, ScriptedAI::me, MotionMaster::MoveRandom(), NPC_DEFILE, NPC_DRUDGE_GHOUL, NPC_HIGHLORD_TIRION_FORDRING_LK, NPC_RAGING_SPIRIT, NPC_SHADOW_TRAP_TRIGGER, NPC_SHAMBLING_HORROR, NPC_STRANGULATE_VEHICLE, NPC_VALKYR_SHADOWGUARD, NPC_VILE_SPIRIT, PHASE_THREE, REACT_PASSIVE, Creature::SetHomePosition(), Creature::SetReactState(), SPELL_RISEN_WITCH_DOCTOR_SPAWN, Unit::StopMovingOnCurrentPos(), SummonList::Summon(), BossAI::summons, and Unit::UpdatePosition().

◆ KilledUnit()

void boss_the_lich_king::boss_the_lich_kingAI::KilledUnit ( Unit victim)
inlineoverridevirtual

Reimplemented from ScriptedAI.

727 {
728 if (victim->IsPlayer() && !me->IsInEvadeMode() && _phase != PHASE_OUTRO && _lastTalkTimeKill + 5 < GameTime::GetGameTime().count())
729 {
732 }
733 }
@ SAY_LK_KILL
Definition: boss_the_lich_king.cpp:48
bool IsInEvadeMode() const
Definition: Creature.h:137
bool IsPlayer() const
Definition: Object.h:197
uint32 _lastTalkTimeKill
Definition: boss_the_lich_king.cpp:647

References _lastTalkTimeKill, _phase, GameTime::GetGameTime(), Creature::IsInEvadeMode(), Object::IsPlayer(), ScriptedAI::me, PHASE_OUTRO, and SAY_LK_KILL.

◆ MovementInform()

void boss_the_lich_king::boss_the_lich_kingAI::MovementInform ( uint32  type,
uint32  pointId 
)
inlineoverridevirtual

Reimplemented from ScriptedAI.

934 {
935 if (type != POINT_MOTION_TYPE)
936 return;
937
938 switch (pointId)
939 {
940 case POINT_CENTER_1:
941 me->SetFacingTo(0.0f);
945 //events.DelayEvents(62500, EVENT_GROUP_BERSERK); // delay berserk timer, its not ticking during phase transitions, 15mins on movies
946 events.ScheduleEvent(EVENT_QUAKE, 62s + 500ms);
950 break;
951 case POINT_CENTER_2:
952 me->SetFacingTo(0.0f);
957 //events.DelayEvents(62500, EVENT_GROUP_BERSERK); // delay berserk timer, its not ticking during phase transitions, 15 mins on movies
958 events.ScheduleEvent(EVENT_QUAKE_2, 62s + 500ms);
962 break;
963 default:
964 break;
965 }
966 }
@ POINT_MOTION_TYPE
Definition: MotionMaster.h:46
@ MUSIC_SPECIAL
Definition: boss_the_lich_king.cpp:351
@ SPELL_REMORSELESS_WINTER_2
Definition: boss_the_lich_king.cpp:110
@ SPELL_REMORSELESS_WINTER_1
Definition: boss_the_lich_king.cpp:109
@ SAY_LK_REMORSELESS_WINTER
Definition: boss_the_lich_king.cpp:42
@ EVENT_SUMMON_ICE_SPHERE
Definition: boss_the_lich_king.cpp:252
@ EVENT_SUMMON_RAGING_SPIRIT
Definition: boss_the_lich_king.cpp:253
@ EVENT_PAIN_AND_SUFFERING
Definition: boss_the_lich_king.cpp:251
@ EVENT_QUAKE
Definition: boss_the_lich_king.cpp:242
void DespawnEntry(uint32 entry)
Definition: ScriptedCreature.cpp:54
void SetFacingTo(float ori)
Definition: Unit.cpp:20483

References AREA_THE_FROZEN_THRONE, Unit::CastSpell(), SummonList::DespawnEntry(), EVENT_GROUP_ABILITIES, EVENT_PAIN_AND_SUFFERING, EVENT_QUAKE, EVENT_QUAKE_2, EVENT_SUMMON_ICE_SPHERE, EVENT_SUMMON_RAGING_SPIRIT, WorldObject::GetMap(), ScriptedAI::me, MUSIC_SPECIAL, NPC_VALKYR_SHADOWGUARD, POINT_CENTER_1, POINT_CENTER_2, POINT_MOTION_TYPE, SAY_LK_REMORSELESS_WINTER, Unit::SetFacingTo(), Map::SetZoneMusic(), SPELL_REMORSELESS_WINTER_1, SPELL_REMORSELESS_WINTER_2, and BossAI::summons.

◆ Reset()

void boss_the_lich_king::boss_the_lich_kingAI::Reset ( )
inlineoverridevirtual

Reimplemented from BossAI.

653 {
657 _positionCheckTimer = 5000;
660 _bFrostmournePhase = false;
662
663 _Reset();
665 SetEquipmentSlots(true);
666 if (me->IsImmuneToPC())
668
670
671 // Reset The Frozen Throne gameobjects
674 Cell::VisitGridObjects(me, worker, 333.0f);
675
677 me->SetImmuneToPC(true);
680
683 }
@ UNIT_STAND_STATE_SIT
Definition: UnitDefines.h:33
@ TEMPSUMMON_MANUAL_DESPAWN
Definition: Object.h:52
Position const TirionSpawn
Definition: boss_the_lich_king.cpp:314
@ PHASE_NONE
Definition: boss_the_lich_king.cpp:300
void _Reset()
Definition: ScriptedCreature.cpp:598
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:2355
void SetStandState(uint8 state)
Definition: Unit.cpp:16682
bool IsImmuneToPC() const
Definition: Unit.h:813
static void VisitGridObjects(WorldObject const *obj, T &visitor, float radius, bool dont_load=true)
Definition: CellImpl.h:179
Definition: GridNotifiers.h:366
Definition: boss_the_lich_king.cpp:465
uint16 _positionCheckTimer
Definition: boss_the_lich_king.cpp:646

References _bFordringMustFallYell, _bFrostmournePhase, _lastTalkTimeBuff, _lastTalkTimeKill, _necroticPlagueStack, _phase, _positionCheckTimer, BossAI::_Reset(), _vileSpiritExplosions, ACTION_RESTORE_LIGHT, Unit::AddAura(), DATA_HIGHLORD_TIRION_FORDRING, DoAction(), ObjectAccessor::GetCreature(), InstanceScript::GetGuidData(), BossAI::instance, Unit::IsImmuneToPC(), ScriptedAI::me, NPC_HIGHLORD_TIRION_FORDRING_LK, PHASE_NONE, REACT_PASSIVE, ScriptedAI::SetEquipmentSlots(), Unit::SetImmuneToPC(), Creature::SetReactState(), Unit::SetStandState(), SPELL_EMOTE_SIT_NO_SHEATH, WorldObject::SummonCreature(), TEMPSUMMON_MANUAL_DESPAWN, TirionSpawn, UNIT_STAND_STATE_SIT, and Cell::VisitGridObjects().

◆ SetData()

void boss_the_lich_king::boss_the_lich_kingAI::SetData ( uint32  type,
uint32  value 
)
inlineoverridevirtual

Reimplemented from UnitAI.

1249 {
1250 switch (type)
1251 {
1252 case DATA_PLAGUE_STACK:
1253 _necroticPlagueStack = std::max(value, _necroticPlagueStack);
1254 break;
1255 case DATA_VILE:
1256 _vileSpiritExplosions += value;
1257 break;
1258 default:
1259 break;
1260 }
1261 }

References _necroticPlagueStack, _vileSpiritExplosions, DATA_PLAGUE_STACK, and DATA_VILE.

◆ SpellHit()

void boss_the_lich_king::boss_the_lich_kingAI::SpellHit ( Unit ,
SpellInfo const *  spell 
)
inlineoverridevirtual

Reimplemented from ScriptedAI.

915 {
916 if (spell->Id == HARVESTED_SOUL_BUFF && me->IsInCombat() && !IsHeroic() && _phase != PHASE_OUTRO && _lastTalkTimeBuff + 5 <= GameTime::GetGameTime().count())
917 {
920 }
921 }
#define HARVESTED_SOUL_BUFF
Definition: boss_the_lich_king.cpp:195
@ SAY_LK_FROSTMOURNE_KILL
Definition: boss_the_lich_king.cpp:47

References _lastTalkTimeBuff, _phase, GameTime::GetGameTime(), HARVESTED_SOUL_BUFF, SpellInfo::Id, ScriptedAI::IsHeroic(), Unit::IsInCombat(), ScriptedAI::me, PHASE_OUTRO, and SAY_LK_FROSTMOURNE_KILL.

◆ SpellHitTarget()

void boss_the_lich_king::boss_the_lich_kingAI::SpellHitTarget ( Unit ,
SpellInfo const *  spell 
)
inlineoverridevirtual

Reimplemented from ScriptedAI.

924 {
925 if (spell->Id == REMORSELESS_WINTER_1 || spell->Id == REMORSELESS_WINTER_2)
926 {
930 }
931 }
#define REMORSELESS_WINTER_1
Definition: boss_the_lich_king.cpp:191
@ LIGHT_SNOWSTORM
Definition: boss_the_lich_king.cpp:347
#define REMORSELESS_WINTER_2
Definition: boss_the_lich_king.cpp:192
@ WEATHER_STATE_LIGHT_SNOW
Definition: Weather.h:52

References AREA_THE_FROZEN_THRONE, SummonList::DespawnEntry(), WorldObject::GetMap(), SpellInfo::Id, LIGHT_SNOWSTORM, ScriptedAI::me, NPC_SHADOW_TRAP_TRIGGER, REMORSELESS_WINTER_1, REMORSELESS_WINTER_2, Map::SetZoneOverrideLight(), Map::SetZoneWeather(), BossAI::summons, and WEATHER_STATE_LIGHT_SNOW.

◆ SummonedCreatureDies()

void boss_the_lich_king::boss_the_lich_kingAI::SummonedCreatureDies ( Creature summon,
Unit  
)
inlineoverridevirtual

Reimplemented from CreatureAI.

897 {
898 switch (summon->GetEntry())
899 {
901 case NPC_DRUDGE_GHOUL:
902 case NPC_ICE_SPHERE:
905 case NPC_VILE_SPIRIT:
906 summon->ToTempSummon()->SetTimer(5000);
908 break;
909 default:
910 break;
911 }
912 }
@ TEMPSUMMON_TIMED_DESPAWN
Definition: Object.h:47
@ NPC_ICE_SPHERE
Definition: icecrown_citadel.h:360
void SetTempSummonType(TempSummonType type)
Definition: TemporarySummon.cpp:277
void SetTimer(uint32 t)
Definition: TemporarySummon.h:58
TempSummon * ToTempSummon()
Definition: Unit.h:1716

References Object::GetEntry(), NPC_DRUDGE_GHOUL, NPC_ICE_SPHERE, NPC_RAGING_SPIRIT, NPC_SHAMBLING_HORROR, NPC_VALKYR_SHADOWGUARD, NPC_VILE_SPIRIT, TempSummon::SetTempSummonType(), TempSummon::SetTimer(), TEMPSUMMON_TIMED_DESPAWN, and Unit::ToTempSummon().

◆ UpdateAI()

void boss_the_lich_king::boss_the_lich_kingAI::UpdateAI ( uint32  )
inlineoverridevirtual

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

Reimplemented from BossAI.

969 {
970 if (_phase == PHASE_NONE)
971 return;
972
973 // check phase first to prevent updating victim and entering evade mode when not wanted
974 if (!((1 << _phase) & PHASE_MASK_NO_VICTIM))
975 if (!UpdateVictim())
976 return;
977
978 // handle falling players so they don't fall infinitely
979 if (_positionCheckTimer <= diff)
980 {
981 _positionCheckTimer = 5000;
982 Map::PlayerList const& players = me->GetMap()->GetPlayers();
983 if (!players.IsEmpty())
984 for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
985 if (Player* player = itr->GetSource())
986 if (player->GetPositionZ() < 700.0f)
987 Unit::Kill(me, player);
988 }
989 else
990 _positionCheckTimer -= diff;
991
992 events.Update(diff);
993
994 // during Remorseless Winter phases The Lich King is channeling a spell, but we must continue casting other spells
996 return;
997
998 switch (events.ExecuteEvent())
999 {
1000 case EVENT_BERSERK:
1002 me->CastSpell(me, SPELL_BERSERK2, true);
1003 break;
1004 case EVENT_START_ATTACK:
1007 {
1008 _bFrostmournePhase = false;
1010 events.RescheduleEvent(EVENT_DEFILE, 0ms, EVENT_GROUP_ABILITIES);
1011 events.RescheduleEvent(EVENT_SOUL_REAPER, 7s, 12s, EVENT_GROUP_ABILITIES);
1012
1013 for (SummonList::iterator i = summons.begin(); i != summons.end(); ++i)
1014 if (Creature* summon = ObjectAccessor::GetCreature(*me, *i))
1015 if (summon->GetEntry() == NPC_RAGING_SPIRIT)
1016 summon->SetReactState(REACT_AGGRESSIVE);
1017 }
1018 break;
1019 case EVENT_QUAKE:
1020 _phase = PHASE_TWO;
1021 events.CancelEventGroup(EVENT_GROUP_ABILITIES);
1022 events.ScheduleEvent(EVENT_INFEST, 14s, EVENT_GROUP_ABILITIES);
1024 events.ScheduleEvent(EVENT_SOUL_REAPER, 40s, EVENT_GROUP_ABILITIES);
1025 events.ScheduleEvent(EVENT_DEFILE, 38s, EVENT_GROUP_ABILITIES);
1026
1029 me->SetFacingTo(0.0f);
1030 me->CastSpell((Unit*)nullptr, SPELL_QUAKE, false);
1033 break;
1034 case EVENT_QUAKE_2:
1036 events.CancelEventGroup(EVENT_GROUP_ABILITIES);
1037 events.ScheduleEvent(EVENT_SOUL_REAPER, 40s, EVENT_GROUP_ABILITIES);
1038 events.ScheduleEvent(EVENT_DEFILE, 38s, EVENT_GROUP_ABILITIES);
1041
1044 me->SetFacingTo(0.0f);
1045 me->CastSpell((Unit*)nullptr, SPELL_QUAKE, false);
1048 break;
1049
1050 // ABILITIES:
1055 break;
1059 break;
1060 case EVENT_INFEST:
1061 me->CastSpell(me, SPELL_INFEST, false);
1062 events.ScheduleEvent(EVENT_INFEST, 22s + 500ms, EVENT_GROUP_ABILITIES);
1063 break;
1065 if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, NecroticPlagueTargetCheck(me, NECROTIC_PLAGUE_LK, NECROTIC_PLAGUE_PLR)))
1066 {
1068 me->CastSpell(target, SPELL_NECROTIC_PLAGUE, false);
1069 events.ScheduleEvent(EVENT_NECROTIC_PLAGUE, 30s, 31s, EVENT_GROUP_ABILITIES);
1070 }
1071 else
1073 break;
1074 case EVENT_SHADOW_TRAP:
1075 if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, ShadowTrapLKTargetSelector(me, true, true, 100.0f)))
1076 me->CastSpell(target, SPELL_SHADOW_TRAP, false);
1077 events.ScheduleEvent(EVENT_SHADOW_TRAP, 15s + 500ms, EVENT_GROUP_ABILITIES);
1078 break;
1080 if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true))
1081 {
1082 //events.DelayEventsToMax(500, EVENT_GROUP_ABILITIES);
1083 me->SetFacingTo(me->GetAngle(target));
1084 me->CastSpell(target, SPELL_PAIN_AND_SUFFERING, false);
1085 }
1086 events.ScheduleEvent(EVENT_PAIN_AND_SUFFERING, (IsHeroic() ? urand(1250, 1750) : urand(1750, 2250)), EVENT_GROUP_ABILITIES);
1087 break;
1089 me->CastSpell((Unit*)nullptr, SPELL_SUMMON_ICE_SPHERE, false);
1091 break;
1093 if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 100.0f, true))
1094 me->CastSpell(target, SPELL_RAGING_SPIRIT, false);
1095 events.ScheduleEvent(EVENT_SUMMON_RAGING_SPIRIT, (!HealthAbovePct(40) ? 15s : 20s), EVENT_GROUP_ABILITIES);
1096 break;
1097 case EVENT_DEFILE:
1098 {
1099 uint32 evTime = events.GetNextEventTime(EVENT_SUMMON_VALKYR);
1100 // if defile (cast time 2sec) is less than 3 before valkyr appears
1101 // we've to decide
1102 if (evTime && (events.GetTimer() > evTime || evTime - events.GetTimer() < 5000))
1103 {
1104 // if valkyr is less than 1.5 secs after defile (cast time 2 sec) then we've a sync issue, so
1105 // we need to cancel it (break) and schedule a defile to be casted 5 or 4 seconds after valkyr
1106 if (events.GetTimer() > evTime || evTime - events.GetTimer() < 3500)
1107 {
1108 uint32 t = events.GetTimer() > evTime ? 0 : evTime - events.GetTimer();
1109 events.ScheduleEvent(EVENT_DEFILE, t + (Is25ManRaid() ? 5000 : 4000), EVENT_GROUP_ABILITIES);
1110 break;
1111 }
1112
1113 // if valkyr is coming between 1.5 and 3 seconds after defile then we've to
1114 // delay valkyr just a bit
1115 events.RescheduleEvent(EVENT_SUMMON_VALKYR, 5s, EVENT_GROUP_ABILITIES);
1116 }
1117
1118 if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, DefileTargetSelector(me)))
1119 {
1121 me->CastSpell(target, SPELL_DEFILE, false);
1122 // defile has a fixed CD (from dbm) that can be variable only
1123 // if no target has been found at the moment (schedule after 1 second)
1124 events.ScheduleEvent(EVENT_DEFILE, 32s + 500ms, EVENT_GROUP_ABILITIES);
1125 }
1126 else
1127 {
1128 // be sure it happen trying each seconds if no target
1129 events.ScheduleEvent(EVENT_DEFILE, 1s, EVENT_GROUP_ABILITIES);
1130 }
1131 }
1132 break;
1133 case EVENT_SOUL_REAPER:
1135 {
1137 events.ScheduleEvent(EVENT_SOUL_REAPER, 30s + 500ms, EVENT_GROUP_ABILITIES);
1138 }
1139 else
1141 break;
1143 {
1146 me->CastSpell((Unit*)nullptr, SUMMON_VALKYR, false);
1148
1149 // schedule a defile (or reschedule it) if next defile event
1150 // doesn't exist ( now > next defile ) or defile is coming too soon
1151 uint32 minTime = (Is25ManRaid() ? 5000 : 4000);
1152 if (uint32 evTime = events.GetNextEventTime(EVENT_DEFILE))
1153 if (events.GetTimer() > evTime || evTime - events.GetTimer() < minTime)
1154 {
1155 events.RescheduleEvent(EVENT_DEFILE, minTime, EVENT_GROUP_ABILITIES);
1156 }
1157 }
1158 break;
1159 case EVENT_VILE_SPIRITS:
1161 me->CastSpell((Unit*)nullptr, SPELL_VILE_SPIRITS, false);
1163 break;
1164 case EVENT_HARVEST_SOUL:
1165 if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, NonTankLKTargetSelector(me, true, true, 55.0f)))
1166 {
1168 me->CastSpell(target, SPELL_HARVEST_SOUL, false);
1169 events.ScheduleEvent(EVENT_HARVEST_SOUL, 75s, EVENT_GROUP_ABILITIES);
1170 }
1171 else
1172 events.ScheduleEvent(EVENT_HARVEST_SOUL, 10s, EVENT_GROUP_ABILITIES);
1173 break;
1176 me->CastSpell((Unit*)nullptr, SPELL_HARVEST_SOULS, false);
1179 me->AttackStop();
1180 events.ScheduleEvent(EVENT_START_ATTACK, 55s);
1181 events.DelayEvents(52500, EVENT_GROUP_VILE_SPIRITS);
1182 events.CancelEvent(EVENT_DEFILE);
1183 events.CancelEvent(EVENT_SOUL_REAPER);
1185 events.ScheduleEvent(EVENT_HARVEST_SOULS, 100s, 110s, EVENT_GROUP_ABILITIES);
1186
1187 for (SummonList::iterator i = summons.begin(); i != summons.end(); ++i)
1188 if (Creature* summon = ObjectAccessor::GetCreature(*me, *i))
1189 {
1190 if (summon->GetEntry() == NPC_VILE_SPIRIT)
1191 {
1192 summon->m_Events.KillAllEvents(true);
1193 summon->m_Events.AddEvent(new VileSpiritActivateEvent(summon), summon->m_Events.CalculateTime(55000));
1194 summon->GetMotionMaster()->Clear(true);
1195 summon->StopMoving();
1196 summon->SetReactState(REACT_PASSIVE);
1197 summon->AttackStop();
1198 }
1199 else if (summon->GetEntry() == NPC_RAGING_SPIRIT)
1200 {
1201 summon->GetMotionMaster()->Clear(true);
1202 summon->StopMoving();
1203 summon->SetReactState(REACT_PASSIVE);
1204 summon->AttackStop();
1205 }
1206 }
1207 break;
1209 _bFrostmournePhase = true;
1211 {
1212 terenas->AI()->DoAction(ACTION_FROSTMOURNE_INTRO);
1213 if (Creature* spawner = terenas->FindNearestCreature(NPC_WORLD_TRIGGER_INFINITE_AOI, 100.0f, true))
1214 {
1215 spawner->CastSpell(spawner, SPELL_SUMMON_SPIRIT_BOMB_1, true); // summons bombs randomly
1216 spawner->CastSpell(spawner, SPELL_SUMMON_SPIRIT_BOMB_2, true); // summons bombs on players
1217 spawner->m_Events.AddEvent(new TriggerWickedSpirit(spawner), spawner->m_Events.CalculateTime(3000));
1218 terenas->SetImmuneToAll(true); // to avoid being healed by player trinket procs. terenas' health doesn't matter on heroic
1219 }
1220 }
1221 break;
1222
1223 default:
1224 break;
1225 }
1226
1229
1231 }
uint32 urand(uint32 min, uint32 max)
Definition: Random.cpp:44
std::uint32_t uint32
Definition: Define.h:107
@ MOVE_RUN
Definition: UnitDefines.h:329
@ EVENT_GROUP_VILE_SPIRITS
Definition: boss_the_lich_king.cpp:295
@ SPELL_HARVEST_SOULS
Definition: boss_the_lich_king.cpp:164
@ SPELL_PAIN_AND_SUFFERING
Definition: boss_the_lich_king.cpp:112
@ SPELL_NECROTIC_PLAGUE
Definition: boss_the_lich_king.cpp:128
@ SPELL_SHADOW_TRAP
Definition: boss_the_lich_king.cpp:131
@ SPELL_QUAKE
Definition: boss_the_lich_king.cpp:111
@ SPELL_SUMMON_ICE_SPHERE
Definition: boss_the_lich_king.cpp:113
@ SPELL_SUMMON_DRUDGE_GHOULS
Definition: boss_the_lich_king.cpp:126
@ SPELL_SUMMON_SHAMBLING_HORROR
Definition: boss_the_lich_king.cpp:125
@ SPELL_SUMMON_SPIRIT_BOMB_2
Definition: boss_the_lich_king.cpp:179
@ SPELL_SOUL_REAPER
Definition: boss_the_lich_king.cpp:139
@ SPELL_HARVEST_SOUL
Definition: boss_the_lich_king.cpp:157
@ SPELL_SUMMON_SPIRIT_BOMB_1
Definition: boss_the_lich_king.cpp:178
@ SPELL_RAGING_SPIRIT
Definition: boss_the_lich_king.cpp:118
@ SPELL_VILE_SPIRITS
Definition: boss_the_lich_king.cpp:153
@ SPELL_DEFILE
Definition: boss_the_lich_king.cpp:136
@ SPELL_INFEST
Definition: boss_the_lich_king.cpp:127
@ PHASE_MASK_NO_VICTIM
Definition: boss_the_lich_king.cpp:310
@ PHASE_MASK_NO_CAST_CHECK
Definition: boss_the_lich_king.cpp:309
@ POINT_NONE
Definition: boss_the_lich_king.cpp:326
@ SAY_LK_QUAKE
Definition: boss_the_lich_king.cpp:43
@ SAY_LK_SUMMON_VALKYR
Definition: boss_the_lich_king.cpp:44
@ EMOTE_NECROTIC_PLAGUE_WARNING
Definition: boss_the_lich_king.cpp:51
@ SAY_LK_HARVEST_SOUL
Definition: boss_the_lich_king.cpp:45
@ EMOTE_DEFILE_WARNING
Definition: boss_the_lich_king.cpp:50
@ SAY_LK_BERSERK
Definition: boss_the_lich_king.cpp:49
#define NECROTIC_PLAGUE_PLR
Definition: boss_the_lich_king.cpp:190
#define SUMMON_VALKYR
Definition: boss_the_lich_king.cpp:193
#define NECROTIC_PLAGUE_LK
Definition: boss_the_lich_king.cpp:189
Position const TerenasSpawnHeroic
Definition: boss_the_lich_king.cpp:321
@ EVENT_DEFILE
Definition: boss_the_lich_king.cpp:254
@ EVENT_FROSTMOURNE_HEROIC
Definition: boss_the_lich_king.cpp:260
@ EVENT_HARVEST_SOUL
Definition: boss_the_lich_king.cpp:258
@ EVENT_SUMMON_VALKYR
Definition: boss_the_lich_king.cpp:256
@ EVENT_HARVEST_SOULS
Definition: boss_the_lich_king.cpp:259
@ EVENT_VILE_SPIRITS
Definition: boss_the_lich_king.cpp:257
@ EVENT_SOUL_REAPER
Definition: boss_the_lich_king.cpp:255
@ NPC_WORLD_TRIGGER_INFINITE_AOI
Definition: icecrown_citadel.h:369
@ NPC_TERENAS_MENETHIL_FROSTMOURNE_H
Definition: icecrown_citadel.h:357
@ ACTION_FROSTMOURNE_INTRO
Definition: icecrown_citadel.h:544
@ SPELL_BERSERK2
Definition: icecrown_citadel.h:54
bool IsEmpty() const
Definition: LinkedList.h:97
Definition: LinkedList.h:139
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
bool UpdateVictim()
Definition: CreatureAI.cpp:269
iterator begin()
Definition: ScriptedCreature.h:48
iterator end()
Definition: ScriptedCreature.h:58
StorageType::iterator iterator
Definition: ScriptedCreature.h:36
bool Is25ManRaid() const
Definition: ScriptedCreature.h:385
bool HasReactState(ReactStates state) const
Definition: Creature.h:99
Definition: TemporarySummon.h:40
bool IsWithinLOSInMap(WorldObject const *obj, VMAP::ModelIgnoreFlags ignoreFlags=VMAP::ModelIgnoreFlags::Nothing, LineOfSightChecks checks=LINEOFSIGHT_ALL_CHECKS, Optional< float > collisionHeight={ }, Optional< float > combatReach={ }) const
Definition: Object.cpp:1347
float GetAngle(const Position *pos) const
Definition: Position.cpp:77
Definition: Player.h:1064
void ClearUnitState(uint32 f)
Definition: Unit.h:674
float GetSpeed(UnitMoveType mtype) const
Definition: Unit.cpp:14378
static void Kill(Unit *killer, Unit *victim, bool durabilityLoss=true, WeaponAttackType attackType=BASE_ATTACK, SpellInfo const *spellProto=nullptr, Spell const *spell=nullptr)
Definition: Unit.cpp:17658
bool IsWithinMeleeRange(Unit const *obj, float dist=0.f) const
Definition: Unit.cpp:665
Unit * GetVictim() const
Definition: Unit.h:789
PlayerList const & GetPlayers() const
Definition: Map.h:486
TempSummon * SummonCreature(uint32 entry, Position const &pos, SummonPropertiesEntry const *properties=nullptr, uint32 duration=0, WorldObject *summoner=nullptr, uint32 spellId=0, uint32 vehId=0, bool visibleBySummonerOnly=false)
Definition: Object.cpp:2163
Definition: MapRefMgr.h:26
iterator begin()
Definition: MapRefMgr.h:36
iterator end()
Definition: MapRefMgr.h:37
void MoveCharge(float x, float y, float z, float speed=SPEED_CHARGE, uint32 id=EVENT_CHARGE, const Movement::PointsArray *path=nullptr, bool generatePath=false, float orientation=0.0f, ObjectGuid targetGUID=ObjectGuid::Empty)
The unit will charge the target. Doesn't work with UNIT_FLAG_DISABLE_MOVE.
Definition: MotionMaster.cpp:667
MovementGeneratorType GetCurrentMovementGeneratorType() const
Definition: MotionMaster.cpp:910
Definition: boss_the_lich_king.cpp:380
Definition: boss_the_lich_king.cpp:406
Definition: boss_the_lich_king.cpp:440
Definition: boss_the_lich_king.cpp:540
Definition: boss_the_lich_king.cpp:597

References _bFrostmournePhase, _phase, _positionCheckTimer, ACTION_FROSTMOURNE_INTRO, AREA_THE_FROZEN_THRONE, Unit::AttackStop(), SummonList::begin(), MapRefMgr::begin(), Unit::CastSpell(), Unit::ClearUnitState(), UnitAI::DoMeleeAttackIfReady(), EMOTE_DEFILE_WARNING, EMOTE_NECROTIC_PLAGUE_WARNING, SummonList::end(), MapRefMgr::end(), EVENT_BERSERK, EVENT_DEFILE, EVENT_FROSTMOURNE_HEROIC, EVENT_GROUP_ABILITIES, EVENT_GROUP_VILE_SPIRITS, EVENT_HARVEST_SOUL, EVENT_HARVEST_SOULS, EVENT_INFEST, EVENT_NECROTIC_PLAGUE, EVENT_PAIN_AND_SUFFERING, EVENT_QUAKE, EVENT_QUAKE_2, EVENT_SHADOW_TRAP, EVENT_SOUL_REAPER, EVENT_START_ATTACK, EVENT_SUMMON_DRUDGE_GHOUL, EVENT_SUMMON_ICE_SPHERE, EVENT_SUMMON_RAGING_SPIRIT, EVENT_SUMMON_SHAMBLING_HORROR, EVENT_SUMMON_VALKYR, EVENT_VILE_SPIRITS, WorldObject::FindNearestCreature(), Position::GetAngle(), ObjectAccessor::GetCreature(), MotionMaster::GetCurrentMovementGeneratorType(), WorldObject::GetMap(), Unit::GetMotionMaster(), Map::GetPlayers(), Position::GetPositionX(), Position::GetPositionY(), Position::GetPositionZ(), Unit::GetSpeed(), Unit::GetVictim(), Creature::HasReactState(), Unit::HasUnitState(), ScriptedAI::HealthAbovePct(), Unit::InterruptNonMeleeSpells(), ScriptedAI::Is25ManRaid(), LinkedListHead::IsEmpty(), ScriptedAI::IsHeroic(), WorldObject::IsWithinLOSInMap(), Unit::IsWithinMeleeRange(), Unit::Kill(), ScriptedAI::me, MOVE_RUN, MotionMaster::MoveCharge(), MUSIC_SPECIAL, NECROTIC_PLAGUE_LK, NECROTIC_PLAGUE_PLR, NPC_RAGING_SPIRIT, NPC_TERENAS_MENETHIL_FROSTMOURNE_H, NPC_VILE_SPIRIT, NPC_WORLD_TRIGGER_INFINITE_AOI, PHASE_FROSTMOURNE, PHASE_MASK_NO_CAST_CHECK, PHASE_MASK_NO_VICTIM, PHASE_NONE, PHASE_THREE, PHASE_TWO, POINT_MOTION_TYPE, POINT_NONE, REACT_AGGRESSIVE, REACT_PASSIVE, SAY_LK_BERSERK, SAY_LK_HARVEST_SOUL, SAY_LK_QUAKE, SAY_LK_SUMMON_VALKYR, UnitAI::SelectTarget(), Unit::SetFacingTo(), Creature::SetReactState(), Map::SetZoneMusic(), SPELL_BERSERK2, SPELL_DEFILE, SPELL_HARVEST_SOUL, SPELL_HARVEST_SOULS, SPELL_INFEST, SPELL_NECROTIC_PLAGUE, SPELL_PAIN_AND_SUFFERING, SPELL_QUAKE, SPELL_RAGING_SPIRIT, SPELL_SHADOW_TRAP, SPELL_SOUL_REAPER, SPELL_SUMMON_DRUDGE_GHOULS, SPELL_SUMMON_ICE_SPHERE, SPELL_SUMMON_SHAMBLING_HORROR, SPELL_SUMMON_SPIRIT_BOMB_1, SPELL_SUMMON_SPIRIT_BOMB_2, SPELL_VILE_SPIRITS, SUMMON_VALKYR, Map::SummonCreature(), BossAI::summons, TerenasSpawnHeroic, UNIT_STATE_CASTING, CreatureAI::UpdateVictim(), and urand().

Member Data Documentation

◆ _bFordringMustFallYell

bool boss_the_lich_king::boss_the_lich_kingAI::_bFordringMustFallYell

Referenced by DamageTaken(), and Reset().

◆ _bFrostmournePhase

bool boss_the_lich_king::boss_the_lich_kingAI::_bFrostmournePhase

Referenced by DamageTaken(), Reset(), and UpdateAI().

◆ _lastTalkTimeBuff

uint32 boss_the_lich_king::boss_the_lich_kingAI::_lastTalkTimeBuff

Referenced by DoAction(), Reset(), and SpellHit().

◆ _lastTalkTimeKill

uint32 boss_the_lich_king::boss_the_lich_kingAI::_lastTalkTimeKill

Referenced by KilledUnit(), and Reset().

◆ _necroticPlagueStack

uint32 boss_the_lich_king::boss_the_lich_kingAI::_necroticPlagueStack

Referenced by GetData(), Reset(), and SetData().

◆ _phase

uint8 boss_the_lich_king::boss_the_lich_kingAI::_phase

◆ _positionCheckTimer

uint16 boss_the_lich_king::boss_the_lich_kingAI::_positionCheckTimer

Referenced by Reset(), and UpdateAI().

◆ _vileSpiritExplosions

uint32 boss_the_lich_king::boss_the_lich_kingAI::_vileSpiritExplosions

Referenced by GetData(), Reset(), and SetData().