AzeorthCore 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)
 
 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 EnterCombat (Unit *)
 
virtual void JustDied (Unit *)
 
virtual void KilledUnit (Unit *)
 
virtual void JustSummoned (Creature *)
 
virtual void IsSummonedBy (Unit *)
 
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 ================== 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 *)
 
- 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 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)
 
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
1385 : NullCreatureAI(creature), summons(me)
1386 {
1388 if (!pInstance)
1389 me->IsAIEnabled = false;
1390 }
Definition: PassiveAI.h:53
Creature *const me
Definition: CreatureAI.h:72
InstanceScript * GetInstanceScript() const
Definition: Object.cpp:1192
bool IsAIEnabled
Definition: Unit.h:2348
InstanceScript * pInstance
Definition: halls_of_reflection.cpp:1392
SummonList summons
Definition: halls_of_reflection.cpp:1394

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.

1408 {
1410 events.ScheduleEvent(EVENT_LK_START_FOLLOWING, 1500);
1412 {
1413 if ((a == ACTION_CHECK_TRASH_DIED && reqKillCount == 0) || (a == ACTION_INFORM_TRASH_DIED && (--reqKillCount) == 0))
1414 {
1415 events.CancelEvent(EVENT_DECREASE_REQ_COUNT_BY_100); // just in case, magic happens sometimes
1416 ++currentWall;
1418 if (currentWall <= 3)
1419 {
1420 events.ScheduleEvent(EVENT_LK_SUMMON_NEXT_ICE_WALL, 1000);
1421 events.ScheduleEvent(EVENT_LK_SUMMON, currentWall == 3 ? 11000 : 7500);
1422 }
1423 else
1425
1427 c->AI()->DoAction(ACTION_INFORM_WALL_DESTROYED);
1428 }
1429 }
1430 }
events
Definition: boss_sartura.cpp:43
@ NPC_SYLVANAS_PART2
Definition: forge_of_souls.h:39
@ EVENT_LK_START_FOLLOWING
Definition: halls_of_reflection.cpp:1359
@ EVENT_DECREASE_REQ_COUNT_BY_100
Definition: halls_of_reflection.cpp:1370
@ EVENT_LK_SUMMON_NEXT_ICE_WALL
Definition: halls_of_reflection.cpp:1368
@ EVENT_LK_SUMMON
Definition: halls_of_reflection.cpp:1364
@ ACTION_INFORM_WALL_DESTROYED
Definition: halls_of_reflection.h:222
@ ACTION_INFORM_TRASH_DIED
Definition: halls_of_reflection.h:220
@ SPELL_REMORSELESS_WINTER
Definition: halls_of_reflection.h:252
@ ACTION_CHECK_TRASH_DIED
Definition: halls_of_reflection.h:221
@ ACTION_START_LK_FIGHT_REAL
Definition: halls_of_reflection.h:219
@ ACTION_DELETE_ICE_WALL
Definition: halls_of_reflection.h:49
Definition: Creature.h:46
void RemoveAura(AuraApplicationMap::iterator &i, AuraRemoveMode mode=AURA_REMOVE_BY_DEFAULT)
Definition: Unit.cpp:4696
ObjectGuid GetGuidData(uint32 type) const override
Definition: InstanceScript.cpp:93
Map * instance
Definition: InstanceScript.h:146
Creature * GetCreature(ObjectGuid const guid)
Definition: Map.cpp:3290
virtual void SetData(uint32, uint32)
Definition: ZoneScript.h:53
uint8 currentWall
Definition: halls_of_reflection.cpp:1395
uint8 reqKillCount
Definition: halls_of_reflection.cpp:1396

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.

1457 {
1458 ++reqKillCount;
1459 if (events.GetNextEventTime(EVENT_DECREASE_REQ_COUNT_BY_100))
1460 events.RescheduleEvent(EVENT_DECREASE_REQ_COUNT_BY_100, 10000);
1461 summons.Summon(s);
1465 if (Unit* target = s->SelectNearestPlayer(350.0f))
1466 {
1467 s->AddThreat(target, 1000.0f);
1468 s->AI()->AttackStart(target);
1469 }
1471 }
const Position PathWaypoints[PATH_WP_COUNT]
Definition: halls_of_reflection.h:301
const uint8 WP_STOP[6]
Definition: halls_of_reflection.h:299
virtual void AttackStart(Unit *)
Definition: UnitAI.cpp:28
void Summon(Creature const *summon)
Definition: ScriptedCreature.h:89
void SetInCombatWithZone()
Definition: Creature.cpp:2705
void SetHomePosition(float x, float y, float z, float o)
Definition: Creature.h:320
CreatureAI * AI() const
Definition: Creature.h:134
Player * SelectNearestPlayer(float distance=0) const
Definition: Object.cpp:2422
Definition: Unit.h:1290
void AddThreat(Unit *victim, float fThreat, SpellSchoolMask schoolMask=SPELL_SCHOOL_MASK_NORMAL, SpellInfo const *threatSpell=nullptr)
Definition: Unit.cpp:14523
MotionMaster * GetMotionMaster()
Definition: Unit.h:2260
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.

1433 {
1434 // Xinef: dont use 0, it is no longer the last point
1435 // Xinef: if type is escort and spline is finalized, it means that we reached last point from the path
1436 if (type == ESCORT_MOTION_TYPE && me->movespline->Finalized())
1437 {
1438 if (currentWall == 0)
1439 {
1441 me->SetOrientation(4.15f);
1443 {
1445 events.ScheduleEvent(EVENT_LK_REMORSELESS_WINTER, 4000);
1446 }
1447 }
1448 else if (currentWall == 4)
1449 {
1452 }
1453 }
1454 }
@ DONE
Definition: InstanceScript.h:59
@ ESCORT_MOTION_TYPE
Definition: MotionMaster.h:55
@ EVENT_LK_REMORSELESS_WINTER
Definition: halls_of_reflection.cpp:1361
@ NPC_ICE_WALL_TARGET
Definition: halls_of_reflection.h:78
@ SPELL_SUMMON_ICE_WALL
Definition: halls_of_reflection.h:256
@ SAY_LK_NOWHERE_TO_RUN
Definition: halls_of_reflection.h:190
@ SAY_LK_IW_1
Definition: halls_of_reflection.h:179
@ DATA_LICH_KING
Definition: halls_of_reflection.h:40
Talk
Definition: boss_fathomlord_karathress.cpp:23
void SetOrientation(float orientation)
Definition: Position.h:112
Movement::MoveSpline * movespline
Definition: Unit.h:2438
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 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.

1400 {
1401 currentWall = 0;
1402 reqKillCount = 0;
1403 events.Reset();
1404 events.RescheduleEvent(EVENT_LK_CHECK_COMBAT, 1000);
1405 }
@ EVENT_LK_CHECK_COMBAT
Definition: halls_of_reflection.cpp:1362

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.

1479 {
1480 if (target && target->IsAlive() && spell->Id == SPELL_LICH_KING_ZAP_PLAYER)
1481 Unit::DealDamage(me, target, 10000);
1482 }
@ SPELL_LICH_KING_ZAP_PLAYER
Definition: halls_of_reflection.h:253
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:814

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.

1474 {
1475 summons.Despawn(s);
1476 }
void Despawn(Creature const *summon)
Definition: ScriptedCreature.h:90

References SummonList::Despawn(), and summons.

◆ UpdateAI()

void npc_hor_lich_king::npc_hor_lich_kingAI::UpdateAI ( uint32  diff)
inlineoverridevirtual

Reimplemented from NullCreatureAI.

1485 {
1486 if (me->HealthBelowPct(70))
1487 me->SetHealth(me->GetMaxHealth() * 3 / 4);
1488
1489 events.Update(diff);
1490
1491 if (me->IsNonMeleeSpellCast(false, true, true))
1492 return;
1493
1494 switch(events.ExecuteEvent())
1495 {
1497 if (me->isActiveObject()) // during fight
1498 {
1500 if (leader->IsAlive() && leader->GetPositionX() < 5575.0f && me->GetExactDist2d(leader) <= 12.5f && !leader->HasAura(SPELL_HARVEST_SOUL) && me->HasAura(SPELL_REMORSELESS_WINTER))
1501 {
1503 me->StopMoving();
1504 reqKillCount = 255;
1505 leader->InterruptNonMeleeSpells(true);
1506 me->CastSpell(leader, SPELL_HARVEST_SOUL, false);
1507 events.ScheduleEvent(EVENT_LK_KILL_LEADER, 3000);
1508 events.ScheduleEvent(EVENT_LK_CHECK_COMBAT, 1000);
1509 break;
1510 }
1512 {
1514 ++div2;
1515 if (div2 > 1)
1516 {
1517 div2 = 0;
1518 if (me->HasAura(SPELL_REMORSELESS_WINTER)) // prevent going behind him during fight
1519 {
1521 for (Map::PlayerList::const_iterator itr = pl.begin(); itr != pl.end(); ++itr)
1522 if (Player* p = itr->GetSource())
1523 if (!p->IsGameMaster() && p->IsAlive() && (p->GetPositionX() - me->GetPositionX() + p->GetPositionY() - me->GetPositionY()) > 20.0f)
1525 }
1526 }
1527 }
1528 else
1529 {
1532 }
1533 }
1534 events.ScheduleEvent(EVENT_LK_CHECK_COMBAT, 1000);
1535 break;
1538 {
1539 leader->CastSpell(leader, SPELL_HOR_SUICIDE, true);
1540 Unit::Kill(me, leader);
1542 me->CastSpell((Unit*)nullptr, SPELL_FURY_OF_FROSTMOURNE, false);
1543 }
1544 break;
1546 {
1547 me->SetSpeed(MOVE_RUN, 9.0f / 7.0f);
1549 path.push_back(G3D::Vector3(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ()));
1550 for (uint8 i = 0; i <= 2; ++i)
1551 path.push_back(G3D::Vector3(PathWaypoints[i].GetPositionX(), PathWaypoints[i].GetPositionY(), PathWaypoints[i].GetPositionZ()));
1553 }
1554 break;
1556 {
1561 path.push_back(G3D::Vector3(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ()));
1562 for (uint8 i = 3; i < PATH_WP_COUNT - 1; ++i)
1563 path.push_back(G3D::Vector3(PathWaypoints[i].GetPositionX(), PathWaypoints[i].GetPositionY(), PathWaypoints[i].GetPositionZ()));
1566 events.ScheduleEvent(EVENT_LK_SUMMON, 1000);
1567 }
1568 break;
1569 case EVENT_LK_SUMMON:
1570 switch (currentWall)
1571 {
1572 case 0:
1573 events.ScheduleEvent(EVENT_LK_SUMMON_GHOULS, 0);
1574 events.ScheduleEvent(EVENT_LK_SUMMON_RWD, 4000);
1575 break;
1576 case 1:
1577 events.ScheduleEvent(EVENT_LK_SUMMON_LA, 0);
1578 events.ScheduleEvent(EVENT_LK_SUMMON_GHOULS, 100);
1579 events.ScheduleEvent(EVENT_LK_SUMMON_RWD, 4000);
1580 events.ScheduleEvent(EVENT_LK_SUMMON_RWD, 5100);
1581 break;
1582 case 2:
1583 events.ScheduleEvent(EVENT_LK_SUMMON_LA, 0);
1584 events.ScheduleEvent(EVENT_LK_SUMMON_GHOULS, 100);
1585 events.ScheduleEvent(EVENT_LK_SUMMON_LA, 4000);
1586 events.ScheduleEvent(EVENT_LK_SUMMON_RWD, 4100);
1587 events.ScheduleEvent(EVENT_LK_SUMMON_RWD, 5200);
1588 break;
1589 case 3:
1590 events.ScheduleEvent(EVENT_LK_SUMMON_LA, 0);
1591 events.ScheduleEvent(EVENT_LK_SUMMON_RWD, 100);
1592 events.ScheduleEvent(EVENT_LK_SUMMON_GHOULS, 1200);
1593 events.ScheduleEvent(EVENT_LK_SUMMON_RWD, 5300);
1594 events.ScheduleEvent(EVENT_LK_SUMMON_RWD, 6400);
1595 events.ScheduleEvent(EVENT_LK_SUMMON_GHOULS, 12500);
1596 events.ScheduleEvent(EVENT_LK_SUMMON_LA, 16500);
1597 events.ScheduleEvent(EVENT_LK_SUMMON_RWD, 16600);
1598 events.ScheduleEvent(EVENT_LK_SUMMON_LA, 17700);
1599 break;
1600 }
1601 if (currentWall <= 3)
1602 {
1603 reqKillCount = 100;
1604 events.RescheduleEvent(EVENT_DECREASE_REQ_COUNT_BY_100, 10000);
1605 }
1606 break;
1608 reqKillCount = (reqKillCount <= 100 ? 0 : reqKillCount - 100);
1610 break;
1612 me->CastSpell((Unit*)nullptr, SPELL_SUMMON_RAGING_GHOULS, false);
1613 break;
1616 break;
1617 case EVENT_LK_SUMMON_LA:
1619 break;
1624 break;
1625 }
1626 }
std::uint8_t uint8
Definition: Define.h:110
@ MOVE_RUN
Definition: Unit.h:379
@ EVENT_LK_KILL_LEADER
Definition: halls_of_reflection.cpp:1363
@ EVENT_LK_SUMMON_GHOULS
Definition: halls_of_reflection.cpp:1365
@ EVENT_LK_SUMMON_RWD
Definition: halls_of_reflection.cpp:1366
@ EVENT_LK_SUMMON_LA
Definition: halls_of_reflection.cpp:1367
@ SPELL_SUMMON_RAGING_GHOULS
Definition: halls_of_reflection.h:260
@ SPELL_SUMMON_LUMBERING_ABOMINATION
Definition: halls_of_reflection.h:262
@ SPELL_SUMMON_RISEN_WITCH_DOCTOR
Definition: halls_of_reflection.h:261
@ SPELL_HARVEST_SOUL
Definition: halls_of_reflection.h:258
@ SPELL_HOR_SUICIDE
Definition: halls_of_reflection.h:259
@ SPELL_FURY_OF_FROSTMOURNE
Definition: halls_of_reflection.h:257
@ SAY_LK_IW_1_SUMMON
Definition: halls_of_reflection.h:183
#define PATH_WP_COUNT
Definition: halls_of_reflection.h:298
@ ACTION_STOP_LK_FIGHT
Definition: halls_of_reflection.h:48
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:196
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:4057
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:17770
bool IsNonMeleeSpellCast(bool withDelayed, bool skipChanneled=false, bool skipAutorepeat=false, bool isAutoshoot=false, bool skipInstant=true) const
Definition: Unit.cpp:4027
uint32 GetMaxHealth() const
Definition: Unit.h:1442
void StopMoving()
Definition: Unit.cpp:16754
void SetHealth(uint32 val)
Definition: Unit.cpp:15335
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint8 reqEffMask=0) const
Definition: Unit.cpp:5598
bool HealthBelowPct(int32 pct) const
Definition: Unit.h:1445
void SetSpeed(UnitMoveType mtype, float rate, bool forced=false)
Definition: Unit.cpp:14301
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:1397
void DoAction(int32 a) override
Definition: halls_of_reflection.cpp:1407

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_IW_1_SUMMON, 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