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

Public Member Functions

 npc_hor_lich_kingAI (Creature *creature)
 
void Reset () override
 
void DoAction (int32 a) override
 
void MovementInform (uint32 type, uint32) override
 
void JustSummoned (Creature *s) override
 
void SummonedCreatureDespawn (Creature *s) override
 
void SpellHitTarget (Unit *target, SpellInfo const *spell) override
 
void UpdateAI (uint32 diff) override
 
- Public Member Functions inherited from NullCreatureAI
 NullCreatureAI (Creature *c)
 
void MoveInLineOfSight (Unit *) override
 
void AttackStart (Unit *) override
 
void UpdateAI (uint32) override
 
void EnterEvadeMode (EvadeReason) override
 
void OnCharmed (bool) override
 
- Public Member Functions inherited from CreatureAI
void Talk (uint8 id, WorldObject const *whisperTarget=nullptr, Milliseconds delay=0s)
 Causes the creature to talk/say the text assigned to their entry in the creature_text database table.
 
void Talk (uint8 id, Milliseconds delay)
 
 CreatureAI (Creature *creature)
 
 ~CreatureAI () override
 
void MoveCircleChecks ()
 
void MoveBackwardsChecks ()
 
void MoveInLineOfSight_Safe (Unit *who)
 == Reactions At =================================
 
void TriggerAlert (Unit const *who) const
 
virtual bool CanRespawn ()
 
virtual void EnterEvadeMode (EvadeReason why=EVADE_REASON_OTHER)
 
virtual void JustEngagedWith (Unit *)
 Called for reaction when initially engaged.
 
virtual void JustDied (Unit *)
 
virtual void KilledUnit (Unit *)
 
virtual void JustSummoned (Creature *)
 
virtual void IsSummonedBy (WorldObject *)
 
virtual void SummonedCreatureDespawn (Creature *)
 
virtual void SummonedCreatureDies (Creature *, Unit *)
 
virtual void SummonedCreatureDespawnAll ()
 
virtual void SpellHit (Unit *, SpellInfo const *)
 
virtual void SpellHitTarget (Unit *, SpellInfo const *)
 
virtual void AttackedBy (Unit *)
 
virtual bool IsEscorted ()
 
virtual void JustRespawned ()
 
virtual void MovementInform (uint32, uint32)
 
virtual void PathEndReached (uint32)
 
void OnCharmed (bool apply) override
 
virtual void JustReachedHome ()
 
void DoZoneInCombat (Creature *creature=nullptr, float maxRangeToNearestTarget=250.0f)
 
virtual void ReceiveEmote (Player *, uint32)
 
virtual void OwnerAttackedBy (Unit *)
 
virtual void OwnerAttacked (Unit *)
 
virtual void CorpseRemoved (uint32 &)
 == Triggered Actions Requested ==================
 
virtual void PassengerBoarded (Unit *, int8, bool)
 == Fields =======================================
 
virtual bool BeforeSpellClick (Unit *)
 
virtual void OnSpellClick (Unit *, bool &)
 
virtual bool CanSeeAlways (WorldObject const *)
 
virtual bool CanBeSeen (Player const *)
 
virtual bool CanAlwaysBeDetectable (WorldObject const *)
 
virtual void PetStopAttack ()
 
virtual bool CheckInRoom ()
 
CreatureBoundary const * GetBoundary () const
 
void SetBoundary (CreatureBoundary const *boundary, bool negativeBoundaries=false)
 
bool IsInBoundary (Position const *who=nullptr) const
 
virtual void CalculateThreat (Unit *, float &, SpellInfo const *)
 
virtual bool OnTeleportUnreacheablePlayer (Player *)
 
- Public Member Functions inherited from UnitAI
 UnitAI (Unit *unit)
 
virtual ~UnitAI ()
 
virtual bool CanAIAttack (Unit const *) const
 
virtual void AttackStart (Unit *)
 
virtual void UpdateAI (uint32)=0
 
virtual void InitializeAI ()
 
virtual void Reset ()
 
virtual void OnCharmed (bool apply)=0
 
virtual void DoAction (int32)
 
virtual uint32 GetData (uint32) const
 
virtual void SetData (uint32, uint32)
 
virtual void SetGUID (ObjectGuid, int32=0)
 
virtual ObjectGuid GetGUID (int32=0) const
 
UnitSelectTarget (SelectTargetMethod targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
 
template<class PREDICATE >
UnitSelectTarget (SelectTargetMethod targetType, uint32 position, PREDICATE const &predicate)
 
void SelectTargetList (std::list< Unit * > &targetList, uint32 num, SelectTargetMethod targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
 
template<class PREDICATE >
void SelectTargetList (std::list< Unit * > &targetList, uint32 num, SelectTargetMethod targetType, uint32 position, PREDICATE const &predicate)
 
virtual void JustEnteredCombat (Unit *)
 Called when the unit enters combat (NOTE: Creature engage logic should NOT be here, but in JustEngagedWith, which happens once threat is established!)
 
virtual void JustExitedCombat ()
 Called when the unit leaves combat.
 
virtual void DamageDealt (Unit *, uint32 &, DamageEffectType)
 
virtual void DamageTaken (Unit *, uint32 &, DamageEffectType, SpellSchoolMask)
 
virtual void HealReceived (Unit *, uint32 &)
 
virtual void HealDone (Unit *, uint32 &)
 
void AttackStartCaster (Unit *victim, float dist)
 
SpellCastResult DoAddAuraToAllHostilePlayers (uint32 spellid)
 
SpellCastResult DoCast (uint32 spellId)
 
SpellCastResult DoCast (Unit *victim, uint32 spellId, bool triggered=false)
 
SpellCastResult DoCastSelf (uint32 spellId, bool triggered=false)
 
SpellCastResult DoCastToAllHostilePlayers (uint32 spellid, bool triggered=false)
 
SpellCastResult DoCastVictim (uint32 spellId, bool triggered=false)
 
SpellCastResult DoCastAOE (uint32 spellId, bool triggered=false)
 
SpellCastResult DoCastRandomTarget (uint32 spellId, uint32 threatTablePosition=0, float dist=0.0f, bool playerOnly=true, bool triggered=false)
 
SpellCastResult DoCastMaxThreat (uint32 spellId, uint32 threatTablePosition=0, float dist=0.0f, bool playerOnly=true, bool triggered=false)
 Cast spell on the max threat target, which may not always be the current victim.
 
float DoGetSpellMaxRange (uint32 spellId, bool positive=false)
 
void DoMeleeAttackIfReady ()
 
bool DoSpellAttackIfReady (uint32 spell)
 
void DoSpellAttackToRandomTargetIfReady (uint32 spell, uint32 threatTablePosition=0, float dist=0.f, bool playerOnly=true)
 
virtual void SummonMovementInform (Creature *, uint32, uint32)
 
virtual void sGossipHello (Player *)
 
virtual void sGossipSelect (Player *, uint32, uint32)
 
virtual void sGossipSelectCode (Player *, uint32, uint32, char const *)
 
virtual void sQuestAccept (Player *, Quest const *)
 
virtual void sQuestSelect (Player *, Quest const *)
 
virtual void sQuestComplete (Player *, Quest const *)
 
virtual void sQuestReward (Player *, Quest const *, uint32)
 
virtual void sOnGameEvent (bool, uint16)
 
virtual std::string GetDebugInfo () const
 

Public Attributes

InstanceScriptpInstance
 
EventMap events
 
SummonList summons
 
uint8 currentWall
 
uint8 reqKillCount
 
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 AISpellInfoTypeAISpellInfo
 
- Protected Member Functions inherited from CreatureAI
bool UpdateVictim ()
 
bool UpdateVictimWithGaze ()
 
void SetGazeOn (Unit *target)
 
CreatureDoSummon (uint32 entry, Position const &pos, uint32 despawnTime=30000, TempSummonType summonType=TEMPSUMMON_CORPSE_TIMED_DESPAWN)
 
CreatureDoSummon (uint32 entry, WorldObject *obj, float radius=5.0f, uint32 despawnTime=30000, TempSummonType summonType=TEMPSUMMON_CORPSE_TIMED_DESPAWN)
 
CreatureDoSummonFlyer (uint32 entry, WorldObject *obj, float flightZ, float radius=5.0f, uint32 despawnTime=30000, TempSummonType summonType=TEMPSUMMON_CORPSE_TIMED_DESPAWN)
 
virtual void MoveInLineOfSight (Unit *)
 
bool _EnterEvadeMode (EvadeReason why=EVADE_REASON_OTHER)
 
- Protected Attributes inherited from CreatureAI
Creature *const me
 
EventMap events
 
CreatureBoundary const * _boundary
 
bool _negateBoundary
 
- Protected Attributes inherited from UnitAI
Unit *const me
 

Detailed Description

Constructor & Destructor Documentation

◆ npc_hor_lich_kingAI()

npc_hor_lich_king::npc_hor_lich_kingAI::npc_hor_lich_kingAI ( Creature creature)
inline
1426 : NullCreatureAI(creature), summons(me)
1427 {
1429 if (!pInstance)
1430 me->IsAIEnabled = false;
1431 }
Definition: PassiveAI.h:53
Creature *const me
Definition: CreatureAI.h:72
InstanceScript * GetInstanceScript() const
Definition: Object.cpp:1192
bool IsAIEnabled
Definition: Unit.h:2350
InstanceScript * pInstance
Definition: halls_of_reflection.cpp:1433
SummonList summons
Definition: halls_of_reflection.cpp:1435

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

Member Function Documentation

◆ DoAction()

void npc_hor_lich_king::npc_hor_lich_kingAI::DoAction ( int32  a)
inlineoverridevirtual

Reimplemented from UnitAI.

1449 {
1451 events.ScheduleEvent(EVENT_LK_START_FOLLOWING, 1500ms);
1453 {
1454 if ((a == ACTION_CHECK_TRASH_DIED && reqKillCount == 0) || (a == ACTION_INFORM_TRASH_DIED && (--reqKillCount) == 0))
1455 {
1456 events.CancelEvent(EVENT_DECREASE_REQ_COUNT_BY_100); // just in case, magic happens sometimes
1457 ++currentWall;
1459 if (currentWall <= 3)
1460 {
1461 events.ScheduleEvent(EVENT_LK_SUMMON_NEXT_ICE_WALL, 1s);
1462 events.ScheduleEvent(EVENT_LK_SUMMON, currentWall == 3 ? 11s : 7500ms);
1463 }
1464 else
1466
1468 c->AI()->DoAction(ACTION_INFORM_WALL_DESTROYED);
1469 }
1470 }
1471 }
events
Definition: boss_sartura.cpp:43
@ NPC_SYLVANAS_PART2
Definition: forge_of_souls.h:41
@ EVENT_LK_START_FOLLOWING
Definition: halls_of_reflection.cpp:1400
@ EVENT_DECREASE_REQ_COUNT_BY_100
Definition: halls_of_reflection.cpp:1411
@ EVENT_LK_SUMMON_NEXT_ICE_WALL
Definition: halls_of_reflection.cpp:1409
@ EVENT_LK_SUMMON
Definition: halls_of_reflection.cpp:1405
@ ACTION_INFORM_WALL_DESTROYED
Definition: halls_of_reflection.h:253
@ ACTION_INFORM_TRASH_DIED
Definition: halls_of_reflection.h:251
@ SPELL_REMORSELESS_WINTER
Definition: halls_of_reflection.h:283
@ ACTION_CHECK_TRASH_DIED
Definition: halls_of_reflection.h:252
@ ACTION_START_LK_FIGHT_REAL
Definition: halls_of_reflection.h:250
@ ACTION_DELETE_ICE_WALL
Definition: halls_of_reflection.h:51
Definition: Creature.h:46
void RemoveAura(AuraApplicationMap::iterator &i, AuraRemoveMode mode=AURA_REMOVE_BY_DEFAULT)
Definition: Unit.cpp:4708
ObjectGuid GetGuidData(uint32 type) const override
Definition: InstanceScript.cpp:94
Map * instance
Definition: InstanceScript.h:146
Creature * GetCreature(ObjectGuid const guid)
Definition: Map.cpp:3293
virtual void SetData(uint32, uint32)
Definition: ZoneScript.h:53
uint8 currentWall
Definition: halls_of_reflection.cpp:1436
uint8 reqKillCount
Definition: halls_of_reflection.cpp:1437

References ACTION_CHECK_TRASH_DIED, ACTION_DELETE_ICE_WALL, ACTION_INFORM_TRASH_DIED, ACTION_INFORM_WALL_DESTROYED, ACTION_START_LK_FIGHT_REAL, currentWall, EVENT_DECREASE_REQ_COUNT_BY_100, EVENT_LK_START_FOLLOWING, EVENT_LK_SUMMON, EVENT_LK_SUMMON_NEXT_ICE_WALL, Map::GetCreature(), InstanceScript::GetGuidData(), InstanceScript::instance, CreatureAI::me, NPC_SYLVANAS_PART2, pInstance, Unit::RemoveAura(), reqKillCount, ZoneScript::SetData(), and SPELL_REMORSELESS_WINTER.

Referenced by UpdateAI().

◆ JustSummoned()

void npc_hor_lich_king::npc_hor_lich_kingAI::JustSummoned ( Creature s)
inlineoverridevirtual

Reimplemented from CreatureAI.

1498 {
1499 ++reqKillCount;
1500 if (events.GetNextEventTime(EVENT_DECREASE_REQ_COUNT_BY_100))
1501 events.RescheduleEvent(EVENT_DECREASE_REQ_COUNT_BY_100, 10s);
1502 summons.Summon(s);
1506 if (Unit* target = s->SelectNearestPlayer(350.0f))
1507 {
1508 s->AddThreat(target, 1000.0f);
1509 s->AI()->AttackStart(target);
1510 }
1512 }
const Position PathWaypoints[PATH_WP_COUNT]
Definition: halls_of_reflection.h:335
const uint8 WP_STOP[6]
Definition: halls_of_reflection.h:333
virtual void AttackStart(Unit *)
Definition: UnitAI.cpp:28
void Summon(Creature const *summon)
Definition: ScriptedCreature.h:90
void SetInCombatWithZone()
Definition: Creature.cpp:2723
void SetHomePosition(float x, float y, float z, float o)
Definition: Creature.h:328
CreatureAI * AI() const
Definition: Creature.h:135
Player * SelectNearestPlayer(float distance=0) const
Definition: Object.cpp:2436
Definition: Unit.h:1290
void AddThreat(Unit *victim, float fThreat, SpellSchoolMask schoolMask=SPELL_SCHOOL_MASK_NORMAL, SpellInfo const *threatSpell=nullptr)
Definition: Unit.cpp:14548
MotionMaster * GetMotionMaster()
Definition: Unit.h:2262
void MovePoint(uint32 id, const Position &pos, bool generatePath=true, bool forceDestination=true)
Definition: MotionMaster.h:210

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

◆ MovementInform()

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

Reimplemented from CreatureAI.

1474 {
1475 // Xinef: dont use 0, it is no longer the last point
1476 // Xinef: if type is escort and spline is finalized, it means that we reached last point from the path
1477 if (type == ESCORT_MOTION_TYPE && me->movespline->Finalized())
1478 {
1479 if (currentWall == 0)
1480 {
1482 me->SetOrientation(4.15f);
1484 {
1486 events.ScheduleEvent(EVENT_LK_REMORSELESS_WINTER, 4s);
1487 }
1488 }
1489 else if (currentWall == 4)
1490 {
1493 }
1494 }
1495 }
@ DONE
Definition: InstanceScript.h:59
@ ESCORT_MOTION_TYPE
Definition: MotionMaster.h:55
@ EVENT_LK_REMORSELESS_WINTER
Definition: halls_of_reflection.cpp:1402
@ NPC_ICE_WALL_TARGET
Definition: halls_of_reflection.h:81
@ SPELL_SUMMON_ICE_WALL
Definition: halls_of_reflection.h:287
@ SAY_LK_NOWHERE_TO_RUN
Definition: halls_of_reflection.h:197
@ SAY_LK_IW_1
Definition: halls_of_reflection.h:190
@ DATA_LICH_KING
Definition: halls_of_reflection.h:42
Talk
Definition: boss_fathomlord_karathress.cpp:23
void SetOrientation(float orientation)
Definition: Position.h:112
Movement::MoveSpline * movespline
Definition: Unit.h:2440
SpellCastResult CastSpell(SpellCastTargets const &targets, SpellInfo const *spellInfo, CustomSpellValues const *value, TriggerCastFlags triggerFlags=TRIGGERED_NONE, Item *castItem=nullptr, AuraEffect const *triggeredByAura=nullptr, ObjectGuid originalCaster=ObjectGuid::Empty)
Definition: Unit.cpp:1169
bool Finalized() const
Definition: MoveSpline.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, CreatureAI::me, Unit::movespline, NPC_ICE_WALL_TARGET, pInstance, SAY_LK_IW_1, SAY_LK_NOWHERE_TO_RUN, ZoneScript::SetData(), Position::SetOrientation(), and SPELL_SUMMON_ICE_WALL.

◆ Reset()

void npc_hor_lich_king::npc_hor_lich_kingAI::Reset ( )
inlineoverridevirtual

Reimplemented from UnitAI.

1441 {
1442 currentWall = 0;
1443 reqKillCount = 0;
1444 events.Reset();
1445 events.RescheduleEvent(EVENT_LK_CHECK_COMBAT, 1s);
1446 }
@ EVENT_LK_CHECK_COMBAT
Definition: halls_of_reflection.cpp:1403

References currentWall, EVENT_LK_CHECK_COMBAT, and reqKillCount.

◆ SpellHitTarget()

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

Reimplemented from CreatureAI.

1520 {
1521 if (target && target->IsAlive() && spell->Id == SPELL_LICH_KING_ZAP_PLAYER)
1522 Unit::DealDamage(me, target, 10000);
1523 }
@ SPELL_LICH_KING_ZAP_PLAYER
Definition: halls_of_reflection.h:284
bool IsAlive() const
Definition: Unit.h:1808
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:815

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

◆ SummonedCreatureDespawn()

void npc_hor_lich_king::npc_hor_lich_kingAI::SummonedCreatureDespawn ( Creature s)
inlineoverridevirtual

Reimplemented from CreatureAI.

1515 {
1516 summons.Despawn(s);
1517 }
void Despawn(Creature const *summon)
Definition: ScriptedCreature.h:91

References SummonList::Despawn(), and summons.

◆ UpdateAI()

void npc_hor_lich_king::npc_hor_lich_kingAI::UpdateAI ( uint32  diff)
inlineoverridevirtual
Todo:
: LK Moves too fast at the begining and too slow after and the leaders (Sylvana/Jaina) should be running instead of walking.

Reimplemented from NullCreatureAI.

1526 {
1527 if (me->HealthBelowPct(70))
1528 me->SetHealth(me->GetMaxHealth() * 3 / 4);
1529
1530 events.Update(diff);
1531
1532 if (me->IsNonMeleeSpellCast(false, true, true))
1533 return;
1534
1535 switch(events.ExecuteEvent())
1536 {
1538 if (me->isActiveObject()) // during fight
1539 {
1541 if (leader->IsAlive() && leader->GetPositionX() < 5575.0f && me->GetExactDist2d(leader) <= 12.5f && !leader->HasAura(SPELL_HARVEST_SOUL) && me->HasAura(SPELL_REMORSELESS_WINTER))
1542 {
1544 me->StopMoving();
1545 reqKillCount = 255;
1546 leader->InterruptNonMeleeSpells(true);
1547 me->CastSpell(leader, SPELL_HARVEST_SOUL, false);
1548 events.ScheduleEvent(EVENT_LK_KILL_LEADER, 3s);
1549 events.ScheduleEvent(EVENT_LK_CHECK_COMBAT, 1s);
1550 break;
1551 }
1553 {
1555 ++div2;
1556 if (div2 > 1)
1557 {
1558 div2 = 0;
1559 if (me->HasAura(SPELL_REMORSELESS_WINTER)) // prevent going behind him during fight
1560 {
1562 for (Map::PlayerList::const_iterator itr = pl.begin(); itr != pl.end(); ++itr)
1563 if (Player* p = itr->GetSource())
1564 if (!p->IsGameMaster() && p->IsAlive() && (p->GetPositionX() - me->GetPositionX() + p->GetPositionY() - me->GetPositionY()) > 20.0f)
1566 }
1567 }
1568 }
1569 else
1570 {
1573 }
1574 }
1575 events.ScheduleEvent(EVENT_LK_CHECK_COMBAT, 1s);
1576 break;
1579 {
1580 leader->CastSpell(leader, SPELL_HOR_SUICIDE, true);
1581 Unit::Kill(me, leader);
1583 me->CastSpell((Unit*)nullptr, SPELL_FURY_OF_FROSTMOURNE, false);
1584 }
1585 break;
1587 {
1588 me->SetSpeed(MOVE_RUN, 9.0f / 7.0f);
1590 path.push_back(G3D::Vector3(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ()));
1591 for (uint8 i = 0; i <= 2; ++i)
1592 path.push_back(G3D::Vector3(PathWaypoints[i].GetPositionX(), PathWaypoints[i].GetPositionY(), PathWaypoints[i].GetPositionZ()));
1594 }
1595 break;
1597 {
1602 path.push_back(G3D::Vector3(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ()));
1603 for (uint8 i = 3; i < PATH_WP_COUNT - 1; ++i)
1604 path.push_back(G3D::Vector3(PathWaypoints[i].GetPositionX(), PathWaypoints[i].GetPositionY(), PathWaypoints[i].GetPositionZ()));
1607 events.ScheduleEvent(EVENT_LK_SUMMON, 1s);
1608 }
1609 break;
1610 case EVENT_LK_SUMMON:
1611 switch (currentWall)
1612 {
1613 case 0:
1614 events.ScheduleEvent(EVENT_LK_SUMMON_GHOULS, 0ms);
1615 events.ScheduleEvent(EVENT_LK_SUMMON_RWD, 4s);
1616 break;
1617 case 1:
1618 events.ScheduleEvent(EVENT_LK_SUMMON_LA, 0ms);
1619 events.ScheduleEvent(EVENT_LK_SUMMON_GHOULS, 100ms);
1620 events.ScheduleEvent(EVENT_LK_SUMMON_RWD, 4s);
1621 events.ScheduleEvent(EVENT_LK_SUMMON_RWD, 5100ms);
1622 break;
1623 case 2:
1624 events.ScheduleEvent(EVENT_LK_SUMMON_LA, 0ms);
1625 events.ScheduleEvent(EVENT_LK_SUMMON_GHOULS, 100ms);
1626 events.ScheduleEvent(EVENT_LK_SUMMON_LA, 4s);
1627 events.ScheduleEvent(EVENT_LK_SUMMON_RWD, 4100ms);
1628 events.ScheduleEvent(EVENT_LK_SUMMON_RWD, 5200ms);
1629 break;
1630 case 3:
1631 events.ScheduleEvent(EVENT_LK_SUMMON_LA, 0ms);
1632 events.ScheduleEvent(EVENT_LK_SUMMON_RWD, 100ms);
1633 events.ScheduleEvent(EVENT_LK_SUMMON_GHOULS, 1200ms);
1634 events.ScheduleEvent(EVENT_LK_SUMMON_RWD, 5300ms);
1635 events.ScheduleEvent(EVENT_LK_SUMMON_RWD, 6400ms);
1636 events.ScheduleEvent(EVENT_LK_SUMMON_GHOULS, 12s + 500ms);
1637 events.ScheduleEvent(EVENT_LK_SUMMON_LA, 16s + 500ms);
1638 events.ScheduleEvent(EVENT_LK_SUMMON_RWD, 16s + 600ms);
1639 events.ScheduleEvent(EVENT_LK_SUMMON_LA, 17s + 700ms);
1640 break;
1641 }
1642 if (currentWall <= 3)
1643 {
1644 reqKillCount = 100;
1645 events.RescheduleEvent(EVENT_DECREASE_REQ_COUNT_BY_100, 10s);
1646 }
1647 break;
1649 reqKillCount = (reqKillCount <= 100 ? 0 : reqKillCount - 100);
1651 break;
1653 me->CastSpell((Unit*)nullptr, SPELL_SUMMON_RAGING_GHOULS, false);
1654 break;
1657 break;
1658 case EVENT_LK_SUMMON_LA:
1660 break;
1665 break;
1666 }
1667 }
std::uint8_t uint8
Definition: Define.h:110
@ MOVE_RUN
Definition: Unit.h:379
@ EVENT_LK_KILL_LEADER
Definition: halls_of_reflection.cpp:1404
@ EVENT_LK_SUMMON_GHOULS
Definition: halls_of_reflection.cpp:1406
@ EVENT_LK_SUMMON_RWD
Definition: halls_of_reflection.cpp:1407
@ EVENT_LK_SUMMON_LA
Definition: halls_of_reflection.cpp:1408
@ SPELL_SUMMON_RAGING_GHOULS
Definition: halls_of_reflection.h:291
@ SPELL_SUMMON_LUMBERING_ABOMINATION
Definition: halls_of_reflection.h:293
@ SPELL_SUMMON_RISEN_WITCH_DOCTOR
Definition: halls_of_reflection.h:292
@ SPELL_HARVEST_SOUL
Definition: halls_of_reflection.h:289
@ SPELL_HOR_SUICIDE
Definition: halls_of_reflection.h:290
@ SPELL_FURY_OF_FROSTMOURNE
Definition: halls_of_reflection.h:288
@ SAY_LK_WINTER
Definition: halls_of_reflection.h:196
#define PATH_WP_COUNT
Definition: halls_of_reflection.h:332
@ ACTION_STOP_LK_FIGHT
Definition: halls_of_reflection.h:50
std::vector< Vector3 > PointsArray
Definition: MoveSplineInitArgs.h:28
Definition: LinkedList.h:139
void DespawnAll(uint32 delay=0)
Definition: ScriptedCreature.cpp:67
CreatureTemplate const * GetCreatureTemplate() const
Definition: Creature.h:197
float speed_run
Definition: CreatureData.h:194
bool isActiveObject() const
Definition: Object.h:560
float GetExactDist2d(const float x, const float y) const
Definition: Position.h:166
float GetPositionZ() const
Definition: Position.h:119
float GetPositionX() const
Definition: Position.h:117
float GetPositionY() const
Definition: Position.h:118
Definition: Player.h:1046
void InterruptNonMeleeSpells(bool withDelayed, uint32 spellid=0, bool withInstant=true, bool bySelf=false)
Definition: Unit.cpp:4069
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:17862
bool IsNonMeleeSpellCast(bool withDelayed, bool skipChanneled=false, bool skipAutorepeat=false, bool isAutoshoot=false, bool skipInstant=true) const
Definition: Unit.cpp:4039
uint32 GetMaxHealth() const
Definition: Unit.h:1441
void StopMoving()
Definition: Unit.cpp:16824
void SetHealth(uint32 val)
Definition: Unit.cpp:15370
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint8 reqEffMask=0) const
Definition: Unit.cpp:5610
bool HealthBelowPct(int32 pct) const
Definition: Unit.h:1444
void SetSpeed(UnitMoveType mtype, float rate, bool forced=false)
Definition: Unit.cpp:14323
bool HavePlayers() const
Definition: Map.h:475
PlayerList const & GetPlayers() const
Definition: Map.h:484
Definition: MapRefMgr.h:26
iterator begin()
Definition: MapRefMgr.h:36
iterator end()
Definition: MapRefMgr.h:37
void propagateSpeedChange()
Definition: MotionMaster.cpp:794
void MovementExpired(bool reset=true)
Definition: MotionMaster.h:178
void MoveSplinePath(Movement::PointsArray *path)
Definition: MotionMaster.cpp:409
uint8 div2
Definition: halls_of_reflection.cpp:1438
void DoAction(int32 a) override
Definition: halls_of_reflection.cpp:1448

References ACTION_CHECK_TRASH_DIED, ACTION_STOP_LK_FIGHT, MapRefMgr::begin(), Unit::CastSpell(), currentWall, SummonList::DespawnAll(), div2, DoAction(), MapRefMgr::end(), EVENT_DECREASE_REQ_COUNT_BY_100, 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(), 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, 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, pInstance, MotionMaster::propagateSpeedChange(), reqKillCount, 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(), and summons.

Member Data Documentation

◆ currentWall

uint8 npc_hor_lich_king::npc_hor_lich_kingAI::currentWall

◆ div2

uint8 npc_hor_lich_king::npc_hor_lich_kingAI::div2

Referenced by UpdateAI().

◆ events

EventMap npc_hor_lich_king::npc_hor_lich_kingAI::events

◆ pInstance

InstanceScript* npc_hor_lich_king::npc_hor_lich_kingAI::pInstance

◆ reqKillCount

uint8 npc_hor_lich_king::npc_hor_lich_kingAI::reqKillCount

◆ summons

SummonList npc_hor_lich_king::npc_hor_lich_kingAI::summons