Skip to content

Commit

Permalink
fix(Scripts/TheEye): Fix Capernian chase distance (azerothcore#18372)
Browse files Browse the repository at this point in the history
* fix(Scripts/TheEye): Fix Capernian chase distance

* Update boss_kaelthas.cpp
  • Loading branch information
Nyeriah authored Feb 21, 2024
1 parent e311bac commit d76ca96
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -824,14 +824,36 @@ struct npc_capernian : public ScriptedAI
me->SetReactState(REACT_PASSIVE);
}

void AttackStart(Unit* who) override
{
if (who && who->isTargetableForAttack() && me->GetReactState() != REACT_PASSIVE)
{
if (me->Attack(who, false))
{
me->GetMotionMaster()->MoveChase(who, 45.0f, 0);
me->AddThreat(who, 0.0f);
}
}
}

void JustEngagedWith(Unit* /*who*/) override
{
if (!_hasDied)
{
Talk(SAY_CAPERNIAN_AGGRO);
}
ScheduleTimedEvent(0ms, [&]{
DoCastVictim(SPELL_CAPERNIAN_FIREBALL);

if (!me->CanCastSpell(SPELL_CAPERNIAN_FIREBALL))
{
me->ResumeChasingVictim();
}
else
{
me->GetMotionMaster()->MoveChase(me->GetVictim(), 45.0f);
DoCastVictim(SPELL_CAPERNIAN_FIREBALL);
}

}, 2500ms);
ScheduleTimedEvent(7000ms, 10000ms, [&]{
DoCastRandomTarget(SPELL_CONFLAGRATION, 0, 30.0f);
Expand Down

0 comments on commit d76ca96

Please sign in to comment.