AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
npc_hor_lich_king Struct Reference
Inheritance diagram for npc_hor_lich_king:
NullCreatureAI CreatureAI UnitAI

Public Member Functions

 npc_hor_lich_king (Creature *creature)
 
void Reset () override
 
void DoAction (int32 action) override
 
void WallCompleted ()
 
void MovementInform (uint32 type, uint32) override
 
void JustSummoned (Creature *s) override
 
void SummonedCreatureDies (Creature *, Unit *) override
 
void SummonedCreatureDespawn (Creature *s) override
 
void SpellHitTarget (Unit *target, SpellInfo const *spell) override
 
void UpdateAI (uint32 diff) override
 Use to start attacking a target. Called just before JustEngagedWith()
 
- Public Member Functions inherited from NullCreatureAI
 NullCreatureAI (Creature *c)
 
void MoveInLineOfSight (Unit *) override
 
void AttackStart (Unit *) override
 
void JustStartedThreateningMe (Unit *) override
 
void JustEnteredCombat (Unit *) override
 Called when the unit enters combat.
 
void UpdateAI (uint32) override
 Use to start attacking a target. Called just before JustEngagedWith()
 
void EnterEvadeMode (EvadeReason) override
 
void OnCharmed (bool) override
 Called when unit is charmed.
 
- Public Member Functions inherited from CreatureAI
void Talk (uint8 id, WorldObject const *whisperTarget=nullptr, Milliseconds delay=0ms)
 Causes the creature to talk/say the text assigned to their entry in the creature_text database table.
 
void Talk (uint8 id, Milliseconds delay)
 
WorldObject * GetSummoner () const
 Returns the summoner creature/object, if the creature is a temporary summon.
 
 CreatureAI (Creature *creature)
 
 ~CreatureAI () override
 
bool IsEngaged () const
 Check if creature is currently engaged in combat.
 
void MoveCircleChecks ()
 
void MoveBackwardsChecks ()
 
void MoveInLineOfSight_Safe (Unit *who)
 == Reactions At =================================
 
void TriggerAlert (Unit const *who) const
 
virtual bool CanRespawn ()
 
virtual bool IsEscortNPC (bool=true) const
 
virtual void JustEngagedWith (Unit *)
 Called for reaction when initially engaged - this happens after JustEnteredCombat.
 
void EngagementStart (Unit *who)
 
void EngagementOver ()
 
void JustExitedCombat () override
 Called when the unit leaves combat.
 
virtual void JustDied (Unit *)
 
virtual void KilledUnit (Unit *)
 
virtual void IsSummonedBy (WorldObject *)
 
virtual void SummonedCreatureDespawnAll ()
 
virtual void SummonedCreatureEvade (Creature *)
 
virtual void SpellHit (Unit *, SpellInfo const *)
 
virtual void OnSpellStart (SpellInfo const *)
 
virtual void OnSpellCast (SpellInfo const *)
 
virtual void OnSpellFailed (SpellInfo const *)
 
virtual void OnChannelFinished (SpellInfo const *)
 
virtual void AttackedBy (Unit *)
 
virtual bool IsEscorted ()
 
virtual void JustRespawned ()
 
virtual void PathEndReached (uint32)
 
virtual void WaypointPathStarted (uint32)
 == Waypoints system =============================
 
virtual void WaypointStarted (uint32, uint32)
 
virtual void WaypointReached (uint32, uint32)
 
virtual void WaypointPathEnded (uint32, uint32)
 
virtual void JustReachedHome ()
 
void DoZoneInCombat (Creature *creature=nullptr, float maxRangeToNearestTarget=250.0f)
 
virtual void ReceiveEmote (Player *, uint32)
 
virtual void OwnerAttackedBy (Unit *attacker)
 
virtual void OwnerAttacked (Unit *target)
 
void OnOwnerCombatInteraction (Unit *target)
 
virtual void CorpseRemoved (uint32 &)
 == Triggered Actions Requested ==================
 
virtual void PassengerBoarded (Unit *, int8, bool)
 == Fields =======================================
 
virtual bool BeforeSpellClick (Unit *)
 
virtual void OnSpellClick (Unit *, bool &)
 
virtual bool CanSeeAlways (WorldObject const *)
 
virtual bool CanBeSeen (Player const *)
 
virtual bool CanAlwaysBeDetectable (WorldObject const *)
 
virtual void PetStopAttack ()
 
int32 VisualizeBoundary (uint32 duration, Unit *owner=nullptr, bool fill=false, bool checkZ=false) const
 
virtual bool CheckInRoom ()
 
CreatureBoundary const * GetBoundary () const
 
void SetBoundary (CreatureBoundary const *boundary, bool negativeBoundaries=false)
 
bool IsInBoundary (Position const *who=nullptr) const
 
virtual void CalculateThreat (Unit *, float &, SpellInfo const *)
 
virtual bool OnTeleportUnreacheablePlayer (Player *)
 
virtual void OnAuraRemove (AuraApplication *, AuraRemoveMode)
 
virtual void DistancingStarted ()
 
virtual void DistancingEnded ()
 
- Public Member Functions inherited from UnitAI
 UnitAI (Unit *unit)
 
virtual ~UnitAI ()
 
virtual bool CanAIAttack (Unit const *) const
 
virtual void InitializeAI ()
 
virtual uint32 GetData (uint32) const
 
virtual void SetData (uint32, uint32)
 
virtual void SetGUID (ObjectGuid const &, int32=0)
 
virtual ObjectGuid GetGUID (int32=0) const
 
Unit * SelectTarget (SelectTargetMethod targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
 
template<class PREDICATE >
Unit * SelectTarget (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 OnDespawn ()
 Called when the unit is about to be removed from the world (despawn, grid unload, corpse disappearing, player logging out etc.)
 
virtual void EvadeTimerExpired ()
 Called when evade timer expires (target unreachable for too long)
 
virtual void DamageDealt (Unit *, uint32 &, DamageEffectType, SpellSchoolMask)
 Called at any Damage to any victim (before damage apply)
 
virtual void DamageTaken (Unit *, uint32 &, DamageEffectType, SpellSchoolMask)
 Called at any Damage from any attacker (before damage apply)
 
virtual void HealReceived (Unit *, uint32 &)
 Called when the creature receives heal.
 
virtual void OnPowerUpdate (Powers, int32, int32, uint32)
 Called when the creature power updates.
 
virtual void HealDone (Unit *, uint32 &)
 Called when the unit heals.
 
virtual void OnCalculateMeleeDamageReceived (uint32 &, Unit *)
 Called during damage calculations.
 
virtual void OnCalculateSpellDamageReceived (int32 &, Unit *)
 
virtual void OnCalculatePeriodicTickReceived (uint32 &, Unit *)
 Called during calculation when receiving periodic healing or damage (DoT or HoT)
 
void AttackStartCaster (Unit *victim, float dist)
 
SpellCastResult DoAddAuraToAllHostilePlayers (uint32 spellid)
 
SpellCastResult DoCast (uint32 spellId)
 
SpellCastResult DoCast (Unit *victim, uint32 spellId, bool triggered=false)
 
SpellCastResult DoCastSelf (uint32 spellId, bool triggered=false)
 
SpellCastResult DoCastToAllHostilePlayers (uint32 spellid, bool triggered=false)
 To specify the caster as target if the spell is self-cast.
 
SpellCastResult DoCastVictim (uint32 spellId, bool triggered=false)
 
SpellCastResult DoCastAOE (uint32 spellId, bool triggered=false)
 
SpellCastResult DoCastRandomTarget (uint32 spellId, uint32 threatTablePosition=0, float dist=0.0f, bool playerOnly=true, bool triggered=false, bool withTank=true, int32 aura=0)
 Cast the spell on a random unit from the threat list.
 
SpellCastResult DoCastMaxThreat (uint32 spellId, uint32 threatTablePosition=0, float dist=0.0f, bool playerOnly=true, bool triggered=false)
 Cast spell on the top threat target, which may not be the current victim.
 
float DoGetSpellMaxRange (uint32 spellId, bool positive=false)
 
void DoMeleeAttackIfReady ()
 
bool DoSpellAttackIfReady (uint32 spell)
 
void DoSpellAttackToRandomTargetIfReady (uint32 spell, uint32 threatTablePosition=0, float dist=0.f, bool playerOnly=true)
 
virtual void SummonMovementInform (Creature *, uint32, uint32)
 Called when a summon reaches a waypoint or point movement finished.
 
virtual void sGossipHello (Player *)
 
virtual void sGossipSelect (Player *, uint32, uint32)
 
virtual void sGossipSelectCode (Player *, uint32, uint32, char const *)
 
virtual void sQuestAccept (Player *, Quest const *)
 
virtual void sQuestSelect (Player *, Quest const *)
 
virtual void sQuestComplete (Player *, Quest const *)
 
virtual void sQuestReward (Player *, Quest const *, uint32)
 
virtual void sOnGameEvent (bool, uint16)
 
virtual std::string GetDebugInfo () const
 

Public Attributes

InstanceScript * instance
 
EventMap events
 
SummonList summons
 
uint8 currentWall
 
uint8 summonsCount
 
uint8 div2
 

Additional Inherited Members

- 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 NullCreatureAI
static int32 Permissible (Creature const *creature)
 
- 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 AISpellInfoType * AISpellInfo
 
- Protected Member Functions inherited from CreatureAI
bool UpdateVictim ()
 
bool UpdateVictimWithGaze ()
 
void SetGazeOn (Unit *target)
 
Creature * DoSummon (uint32 entry, Position const &pos, uint32 despawnTime=30000, TempSummonType summonType=TEMPSUMMON_CORPSE_TIMED_DESPAWN)
 
Creature * DoSummon (uint32 entry, WorldObject *obj, float radius=5.0f, uint32 despawnTime=30000, TempSummonType summonType=TEMPSUMMON_CORPSE_TIMED_DESPAWN)
 
Creature * DoSummonFlyer (uint32 entry, WorldObject *obj, float flightZ, float radius=5.0f, uint32 despawnTime=30000, TempSummonType summonType=TEMPSUMMON_CORPSE_TIMED_DESPAWN)
 
bool _EnterEvadeMode (EvadeReason why=EVADE_REASON_OTHER)
 
- Protected Attributes inherited from CreatureAI
Creature *const me
 
EventMap events
 
TaskScheduler scheduler
 
CreatureBoundary const * _boundary
 
bool _negateBoundary
 
bool _isEngaged
 
- Protected Attributes inherited from UnitAI
Unit *const me
 

Detailed Description

Constructor & Destructor Documentation

◆ npc_hor_lich_king()

npc_hor_lich_king::npc_hor_lich_king ( Creature *  creature)
inline
1503 : NullCreatureAI(creature), summons(me)
1504 {
1506 if (!instance)
1507 me->IsAIEnabled = false;
1508 }
Creature *const me
Definition CreatureAI.h:71
Definition PassiveAI.h:56
bool IsAIEnabled
Definition Unit.h:2102
InstanceScript * GetInstanceScript() const
Definition Object.cpp:1247
InstanceScript * instance
Definition halls_of_reflection.cpp:1510
SummonList summons
Definition halls_of_reflection.cpp:1512

References WorldObject::GetInstanceScript(), instance, Unit::IsAIEnabled, and CreatureAI::me.

Member Function Documentation

◆ DoAction()

void npc_hor_lich_king::DoAction ( int32  action)
inlineoverridevirtual

Reimplemented from UnitAI.

1526 {
1527 if (action == ACTION_START_LK_FIGHT_REAL)
1528 events.ScheduleEvent(EVENT_LK_START_FOLLOWING, 1500ms);
1529 }
events
Definition boss_sartura.cpp:43
@ EVENT_LK_START_FOLLOWING
Definition halls_of_reflection.cpp:1488
@ ACTION_START_LK_FIGHT_REAL
Definition halls_of_reflection.h:256

References ACTION_START_LK_FIGHT_REAL, and EVENT_LK_START_FOLLOWING.

◆ JustSummoned()

void npc_hor_lich_king::JustSummoned ( Creature *  s)
inlineoverridevirtual

Reimplemented from CreatureAI.

1572 {
1573 ++summonsCount;
1574 summons.Summon(s);
1578 if (Unit* target = s->SelectNearestPlayer(350.0f))
1579 {
1580 s->AddThreat(target, 1000.0f);
1581 s->AI()->AttackStart(target);
1582 }
1584 }
void SetInCombatWithZone()
Set in combat all units in the dungeon/raid. Affect only units with IsAIEnabled.
Definition Creature.cpp:2882
void SetHomePosition(float x, float y, float z, float o)
Definition Creature.h:347
CreatureAI * AI() const
Definition Creature.h:144
void MovePoint(uint32 id, Position const &pos, ForcedMovement forcedMovement=FORCED_MOVEMENT_NONE, float speed=0.f, bool generatePath=true, bool forceDestination=true, std::optional< AnimTier > animTier=std::nullopt)
Definition MotionMaster.h:241
void Summon(Creature const *summon)
Definition ScriptedCreature.h:88
virtual void AttackStart(Unit *)
Definition UnitAI.cpp:29
Definition Unit.h:665
void AddThreat(Unit *victim, float fThreat, SpellSchoolMask schoolMask=SPELL_SCHOOL_MASK_NORMAL, SpellInfo const *threatSpell=nullptr)
Definition Unit.cpp:11198
MotionMaster * GetMotionMaster()
Definition Unit.h:1761
Player * SelectNearestPlayer(float distance=0) const
Definition Object.cpp:2585
const Position PathWaypoints[PATH_WP_COUNT]
Definition halls_of_reflection.h:356
const uint8 WP_STOP[6]
Definition halls_of_reflection.h:354
uint8 currentWall
Definition halls_of_reflection.cpp:1513
uint8 summonsCount
Definition halls_of_reflection.cpp:1514

References Unit::AddThreat(), Creature::AI(), UnitAI::AttackStart(), currentWall, Unit::GetMotionMaster(), MotionMaster::MovePoint(), PathWaypoints, WorldObject::SelectNearestPlayer(), Creature::SetHomePosition(), Creature::SetInCombatWithZone(), SummonList::Summon(), summons, summonsCount, and WP_STOP.

◆ MovementInform()

void npc_hor_lich_king::MovementInform ( uint32  type,
uint32   
)
inlineoverridevirtual

Reimplemented from CreatureAI.

1547 {
1548 // Xinef: dont use 0, it is no longer the last point
1549 // Xinef: if type is escort and spline is finalized, it means that we reached last point from the path
1550 if (type == ESCORT_MOTION_TYPE && me->movespline->Finalized())
1551 {
1552 if (currentWall == 0)
1553 {
1555 me->SetOrientation(4.15f);
1557 {
1558 me->SetFacingToObject(icewall);
1560 events.ScheduleEvent(EVENT_LK_REMORSELESS_WINTER, 4s);
1561 }
1562 }
1563 else if (currentWall == 4)
1564 {
1567 }
1568 }
1569 }
@ DONE
Definition InstanceScript.h:61
@ ESCORT_MOTION_TYPE
Definition MotionMaster.h:57
Definition Creature.h:47
virtual bool SetBossState(uint32 id, EncounterState state)
Definition InstanceScript.cpp:400
ObjectGuid GetGuidData(uint32 type) const override
Definition InstanceScript.cpp:115
Map * instance
Definition InstanceScript.h:149
Creature * GetCreature(ObjectGuid const &guid)
Definition Map.cpp:2442
bool Finalized() const
Definition MoveSpline.h:118
void SetFacingToObject(WorldObject *object, Milliseconds timed=0ms)
Definition Unit.cpp:16078
Movement::MoveSpline * movespline
Definition Unit.h:2119
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:1372
@ EVENT_LK_REMORSELESS_WINTER
Definition halls_of_reflection.cpp:1490
@ NPC_ICE_WALL_TARGET
Definition halls_of_reflection.h:81
@ SPELL_SUMMON_ICE_WALL
Definition halls_of_reflection.h:297
@ SAY_LK_NOWHERE_TO_RUN
Definition halls_of_reflection.h:203
@ SAY_LK_IW_1
Definition halls_of_reflection.h:196
@ DATA_LICH_KING
Definition halls_of_reflection.h:33
Talk
Definition hyjal.cpp:82
void SetOrientation(float orientation)
Definition Position.h:116

References Unit::CastSpell(), currentWall, DATA_LICH_KING, DONE, ESCORT_MOTION_TYPE, EVENT_LK_REMORSELESS_WINTER, Movement::MoveSpline::Finalized(), Map::GetCreature(), InstanceScript::GetGuidData(), InstanceScript::instance, instance, CreatureAI::me, Unit::movespline, NPC_ICE_WALL_TARGET, SAY_LK_IW_1, SAY_LK_NOWHERE_TO_RUN, InstanceScript::SetBossState(), Unit::SetFacingToObject(), Position::SetOrientation(), and SPELL_SUMMON_ICE_WALL.

◆ Reset()

void npc_hor_lich_king::Reset ( )
inlineoverridevirtual

Reimplemented from UnitAI.

1518 {
1519 currentWall = 0;
1520 summonsCount = 0;
1521 div2 = 0;
1522 events.Reset();
1523 events.RescheduleEvent(EVENT_LK_CHECK_COMBAT, 1s);
1524 }
@ EVENT_LK_CHECK_COMBAT
Definition halls_of_reflection.cpp:1491
uint8 div2
Definition halls_of_reflection.cpp:1515

References currentWall, div2, EVENT_LK_CHECK_COMBAT, and summonsCount.

◆ SpellHitTarget()

void npc_hor_lich_king::SpellHitTarget ( Unit *  target,
SpellInfo const *  spell 
)
inlineoverridevirtual

Reimplemented from CreatureAI.

1600 {
1601 if (target && target->IsAlive() && spell->Id == SPELL_LICH_KING_ZAP_PLAYER)
1602 Unit::DealDamage(me, target, 10000);
1603 }
bool IsAlive() const
Definition Unit.h:1796
static uint32 DealDamage(Unit *attacker, Unit *victim, uint32 damage, CleanDamage const *cleanDamage=nullptr, DamageEffectType damagetype=DIRECT_DAMAGE, SpellSchoolMask damageSchoolMask=SPELL_SCHOOL_MASK_NORMAL, SpellInfo const *spellProto=nullptr, bool durabilityLoss=true, bool allowGM=false, Spell const *spell=nullptr)
Definition Unit.cpp:990
@ SPELL_LICH_KING_ZAP_PLAYER
Definition halls_of_reflection.h:294

References Unit::DealDamage(), SpellInfo::Id, Unit::IsAlive(), CreatureAI::me, and SPELL_LICH_KING_ZAP_PLAYER.

◆ SummonedCreatureDespawn()

void npc_hor_lich_king::SummonedCreatureDespawn ( Creature *  s)
inlineoverridevirtual

Reimplemented from CreatureAI.

1595 {
1596 summons.Despawn(s);
1597 }
void Despawn(Creature const *summon)
Definition ScriptedCreature.h:89

References SummonList::Despawn(), and summons.

◆ SummonedCreatureDies()

void npc_hor_lich_king::SummonedCreatureDies ( Creature *  ,
Unit *   
)
inlineoverridevirtual

Reimplemented from CreatureAI.

1587 {
1588 if (!summonsCount)
1589 return;
1590 if (--summonsCount == 0)
1591 WallCompleted();
1592 }
void WallCompleted()
Definition halls_of_reflection.cpp:1531

References summonsCount, and WallCompleted().

◆ UpdateAI()

void npc_hor_lich_king::UpdateAI ( uint32  )
inlineoverridevirtual

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

Implements UnitAI.

1606 {
1607 if (me->HealthBelowPct(70))
1608 me->SetHealth(me->GetMaxHealth() * 3 / 4);
1609
1610 events.Update(diff);
1611
1612 if (me->IsNonMeleeSpellCast(false, true, true))
1613 return;
1614
1615 switch (events.ExecuteEvent())
1616 {
1618 if (me->isActiveObject()) // during fight
1619 {
1621 if (leader->IsAlive() && leader->GetPositionX() < 5575.0f && me->GetExactDist2d(leader) <= 12.5f && !leader->HasAura(SPELL_HARVEST_SOUL) && me->HasAura(SPELL_REMORSELESS_WINTER))
1622 {
1624 me->StopMoving();
1625 summonsCount = 255;
1626 leader->InterruptNonMeleeSpells(true);
1628 events.ScheduleEvent(EVENT_LK_KILL_LEADER, 3s);
1629 events.ScheduleEvent(EVENT_LK_CHECK_COMBAT, 1s);
1630 break;
1631 }
1633 {
1635 ++div2;
1636 if (div2 > 1)
1637 {
1638 div2 = 0;
1639 if (me->HasAura(SPELL_REMORSELESS_WINTER)) // prevent going behind him during fight
1640 {
1642 for (Map::PlayerList::const_iterator itr = pl.begin(); itr != pl.end(); ++itr)
1643 if (Player* p = itr->GetSource())
1644 if (!p->IsGameMaster() && p->IsAlive() && (p->GetPositionX() - me->GetPositionX() + p->GetPositionY() - me->GetPositionY()) > 20.0f)
1646 }
1647 }
1648 }
1649 else
1650 {
1653 }
1654 }
1655 events.ScheduleEvent(EVENT_LK_CHECK_COMBAT, 1s);
1656 break;
1659 {
1660 leader->CastSpell(leader, SPELL_HOR_SUICIDE, true);
1661 Unit::Kill(me, leader);
1664 }
1665 break;
1667 {
1668 me->SetSpeed(MOVE_RUN, 9.0f / 7.0f);
1670 path.emplace_back(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ());
1671 for (uint8 i = 0; i <= 2; ++i)
1674 }
1675 break;
1677 {
1682 path.emplace_back(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ());
1683 for (uint8 i = 3; i < PATH_WP_COUNT - 1; ++i)
1687 events.ScheduleEvent(EVENT_LK_SUMMON, 1s);
1688 }
1689 break;
1690 case EVENT_LK_SUMMON:
1691 switch (currentWall)
1692 {
1693 case 0:
1694 events.ScheduleEvent(EVENT_LK_SUMMON_GHOULS, 0ms);
1695 events.ScheduleEvent(EVENT_LK_SUMMON_RWD, 4s);
1696 break;
1697 case 1:
1698 events.ScheduleEvent(EVENT_LK_SUMMON_LA, 0ms);
1699 events.ScheduleEvent(EVENT_LK_SUMMON_GHOULS, 100ms);
1700 events.ScheduleEvent(EVENT_LK_SUMMON_RWD, 4s);
1701 events.ScheduleEvent(EVENT_LK_SUMMON_RWD, 5100ms);
1702 break;
1703 case 2:
1704 events.ScheduleEvent(EVENT_LK_SUMMON_LA, 0ms);
1705 events.ScheduleEvent(EVENT_LK_SUMMON_GHOULS, 100ms);
1706 events.ScheduleEvent(EVENT_LK_SUMMON_LA, 4s);
1707 events.ScheduleEvent(EVENT_LK_SUMMON_RWD, 4100ms);
1708 events.ScheduleEvent(EVENT_LK_SUMMON_RWD, 5200ms);
1709 break;
1710 case 3:
1711 events.ScheduleEvent(EVENT_LK_SUMMON_LA, 0ms);
1712 events.ScheduleEvent(EVENT_LK_SUMMON_RWD, 100ms);
1713 events.ScheduleEvent(EVENT_LK_SUMMON_GHOULS, 1200ms);
1714 events.ScheduleEvent(EVENT_LK_SUMMON_RWD, 5300ms);
1715 events.ScheduleEvent(EVENT_LK_SUMMON_RWD, 6400ms);
1716 events.ScheduleEvent(EVENT_LK_SUMMON_GHOULS, 12s + 500ms);
1717 events.ScheduleEvent(EVENT_LK_SUMMON_LA, 16s + 500ms);
1718 events.ScheduleEvent(EVENT_LK_SUMMON_RWD, 16s + 600ms);
1719 events.ScheduleEvent(EVENT_LK_SUMMON_LA, 17s + 700ms);
1720 break;
1721 }
1722 break;
1725 break;
1728 break;
1729 case EVENT_LK_SUMMON_LA:
1731 break;
1736 break;
1737 }
1738 }
std::uint8_t uint8
Definition Define.h:109
@ MOVE_RUN
Definition UnitDefines.h:357
CreatureTemplate const * GetCreatureTemplate() const
Definition Creature.h:207
Creature * GetCreature(uint32 type)
Definition InstanceScript.cpp:120
Definition LinkedList.h:139
Definition MapRefMgr.h:26
iterator begin()
Definition MapRefMgr.h:36
iterator end()
Definition MapRefMgr.h:37
bool HavePlayers() const
Definition Map.h:324
PlayerList const & GetPlayers() const
Definition Map.h:335
void MoveSplinePath(Movement::PointsArray *path, ForcedMovement forcedMovement=FORCED_MOVEMENT_NONE)
Definition MotionMaster.cpp:504
void propagateSpeedChange()
Definition MotionMaster.cpp:1062
void MovementExpired(bool reset=true)
Definition MotionMaster.h:207
Definition Player.h:1086
void DespawnAll(Milliseconds delay=0ms)
Definition ScriptedCreature.cpp:72
SpellCastResult DoCastAOE(uint32 spellId, bool triggered=false)
Definition UnitAI.cpp:286
SpellCastResult DoCastSelf(uint32 spellId, bool triggered=false)
Definition UnitAI.h:399
void InterruptNonMeleeSpells(bool withDelayed, uint32 spellid=0, bool withInstant=true, bool bySelf=false)
Definition Unit.cpp:4047
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:13580
bool IsNonMeleeSpellCast(bool withDelayed, bool skipChanneled=false, bool skipAutorepeat=false, bool isAutoshoot=false, bool skipInstant=true) const
Definition Unit.cpp:4017
uint32 GetMaxHealth() const
Definition Unit.h:1115
void StopMoving()
Definition Unit.cpp:12639
void SetHealth(uint32 val)
Definition Unit.cpp:11950
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint8 reqEffMask=0) const
Definition Unit.cpp:5764
bool HealthBelowPct(int32 pct) const
Definition Unit.h:1122
void SetSpeed(UnitMoveType mtype, float rate, bool forced=false)
Definition Unit.cpp:11052
bool isActiveObject() const
Definition Object.h:684
virtual void SetData(uint32, uint32)
Definition ZoneScript.h:52
@ NPC_SYLVANAS_PART2
Definition forge_of_souls.h:46
@ EVENT_LK_KILL_LEADER
Definition halls_of_reflection.cpp:1492
@ EVENT_LK_SUMMON_NEXT_ICE_WALL
Definition halls_of_reflection.cpp:1497
@ EVENT_LK_SUMMON_GHOULS
Definition halls_of_reflection.cpp:1494
@ EVENT_LK_SUMMON_RWD
Definition halls_of_reflection.cpp:1495
@ EVENT_LK_SUMMON_LA
Definition halls_of_reflection.cpp:1496
@ EVENT_LK_SUMMON
Definition halls_of_reflection.cpp:1493
@ SPELL_SUMMON_RAGING_GHOULS
Definition halls_of_reflection.h:301
@ SPELL_SUMMON_LUMBERING_ABOMINATION
Definition halls_of_reflection.h:303
@ SPELL_SUMMON_RISEN_WITCH_DOCTOR
Definition halls_of_reflection.h:302
@ SPELL_HARVEST_SOUL
Definition halls_of_reflection.h:299
@ SPELL_HOR_SUICIDE
Definition halls_of_reflection.h:300
@ SPELL_REMORSELESS_WINTER
Definition halls_of_reflection.h:293
@ SPELL_FURY_OF_FROSTMOURNE
Definition halls_of_reflection.h:298
@ SAY_LK_WINTER
Definition halls_of_reflection.h:202
#define PATH_WP_COUNT
Definition halls_of_reflection.h:353
@ ACTION_STOP_LK_FIGHT
Definition halls_of_reflection.h:51
std::vector< Vector3 > PointsArray
Definition MoveSplineInitArgs.h:28
float speed_run
Definition CreatureData.h:202
float GetExactDist2d(const float x, const float y) const
Definition Position.h:170
float GetPositionZ() const
Definition Position.h:123
float GetPositionX() const
Definition Position.h:121
float GetPositionY() const
Definition Position.h:122

References ACTION_STOP_LK_FIGHT, MapRefMgr::begin(), Unit::CastSpell(), currentWall, SummonList::DespawnAll(), div2, UnitAI::DoCastAOE(), UnitAI::DoCastSelf(), MapRefMgr::end(), EVENT_LK_CHECK_COMBAT, EVENT_LK_KILL_LEADER, EVENT_LK_REMORSELESS_WINTER, EVENT_LK_START_FOLLOWING, EVENT_LK_SUMMON, EVENT_LK_SUMMON_GHOULS, EVENT_LK_SUMMON_LA, EVENT_LK_SUMMON_NEXT_ICE_WALL, EVENT_LK_SUMMON_RWD, Map::GetCreature(), InstanceScript::GetCreature(), Creature::GetCreatureTemplate(), Position::GetExactDist2d(), InstanceScript::GetGuidData(), Unit::GetMaxHealth(), Unit::GetMotionMaster(), Map::GetPlayers(), Position::GetPositionX(), Position::GetPositionY(), Position::GetPositionZ(), Unit::HasAura(), Map::HavePlayers(), Unit::HealthBelowPct(), InstanceScript::instance, instance, Unit::InterruptNonMeleeSpells(), WorldObject::isActiveObject(), Unit::IsNonMeleeSpellCast(), Unit::Kill(), CreatureAI::me, MOVE_RUN, MotionMaster::MovementExpired(), MotionMaster::MoveSplinePath(), NPC_ICE_WALL_TARGET, NPC_SYLVANAS_PART2, PATH_WP_COUNT, PathWaypoints, MotionMaster::propagateSpeedChange(), SAY_LK_IW_1, SAY_LK_WINTER, ZoneScript::SetData(), Unit::SetHealth(), Creature::SetInCombatWithZone(), Unit::SetSpeed(), CreatureTemplate::speed_run, SPELL_FURY_OF_FROSTMOURNE, SPELL_HARVEST_SOUL, SPELL_HOR_SUICIDE, SPELL_LICH_KING_ZAP_PLAYER, SPELL_REMORSELESS_WINTER, SPELL_SUMMON_ICE_WALL, SPELL_SUMMON_LUMBERING_ABOMINATION, SPELL_SUMMON_RAGING_GHOULS, SPELL_SUMMON_RISEN_WITCH_DOCTOR, Unit::StopMoving(), summons, and summonsCount.

◆ WallCompleted()

void npc_hor_lich_king::WallCompleted ( )
inline
1532 {
1533 ++currentWall;
1535 if (currentWall <= 3)
1536 {
1537 events.ScheduleEvent(EVENT_LK_SUMMON_NEXT_ICE_WALL, 1s);
1538 events.ScheduleEvent(EVENT_LK_SUMMON, currentWall == 3 ? 11s : 7500ms);
1539 }
1540 else
1543 c->AI()->DoAction(ACTION_INFORM_WALL_DESTROYED);
1544 }
void RemoveAura(AuraApplicationMap::iterator &i, AuraRemoveMode mode=AURA_REMOVE_BY_DEFAULT)
Definition Unit.cpp:4797
@ ACTION_INFORM_WALL_DESTROYED
Definition halls_of_reflection.h:257
@ ACTION_DELETE_ICE_WALL
Definition halls_of_reflection.h:52

References ACTION_DELETE_ICE_WALL, ACTION_INFORM_WALL_DESTROYED, currentWall, EVENT_LK_SUMMON, EVENT_LK_SUMMON_NEXT_ICE_WALL, InstanceScript::GetCreature(), instance, CreatureAI::me, NPC_SYLVANAS_PART2, Unit::RemoveAura(), ZoneScript::SetData(), and SPELL_REMORSELESS_WINTER.

Referenced by SummonedCreatureDies().

Member Data Documentation

◆ currentWall

uint8 npc_hor_lich_king::currentWall

◆ div2

uint8 npc_hor_lich_king::div2

Referenced by Reset(), and UpdateAI().

◆ events

EventMap npc_hor_lich_king::events

◆ instance

InstanceScript* npc_hor_lich_king::instance

◆ summons

SummonList npc_hor_lich_king::summons

◆ summonsCount

uint8 npc_hor_lich_king::summonsCount

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