diff options
author | Andrew <47818697+Nyeriah@users.noreply.github.com> | 2024-11-10 14:54:05 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-10 14:54:05 -0300 |
commit | e8366f69350fd09ed9d8b37474a7b3274b761559 (patch) | |
tree | ec2791e3c96f74e2a1d8aa8715a3e6890facedc8 /src | |
parent | 4da49dd63ada801af308818eb6908cc3782255db (diff) |
fix(Scripts/SSC): Fix Leotheras running in melee range in demon phase (#20507)
* fix(Scripts/SSC): Fix Leotheras running in melee range in demon phase
* Update boss_leotheras_the_blind.cpp
Diffstat (limited to 'src')
-rw-r--r-- | src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp index aef75b3592..621ecbc2bc 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp @@ -128,6 +128,14 @@ struct boss_leotheras_the_blind : public BossAI }); } + void AttackStart(Unit* who) override + { + if (me->HasAura(SPELL_METAMORPHOSIS)) + AttackStartCaster(who, 40.0f); + else + ScriptedAI::AttackStart(who); + } + void DoAction(int32 actionId) override { if (actionId == ACTION_CHECK_SPELLBINDERS) @@ -172,15 +180,13 @@ struct boss_leotheras_the_blind : public BossAI void MoveToTargetIfOutOfRange(Unit* target) { - if (me->GetDistance2d(target) > 40.0f) + if (!me->IsWithinDistInMap(target, 40.0f)) { - me->GetMotionMaster()->MoveChase(target, 5.0f, 0); + me->GetMotionMaster()->MoveChase(target, 40.0f, 0); me->AddThreat(target, 0.0f); } else - { me->GetMotionMaster()->Clear(); - } } void DemonTime() @@ -204,7 +210,7 @@ struct boss_leotheras_the_blind : public BossAI { DoResetThreatList(); me->LoadEquipment(); - me->GetMotionMaster()->MoveChase(me->GetVictim(), 0.0f); + me->ResumeChasingVictim(); me->RemoveAurasDueToSpell(SPELL_METAMORPHOSIS); scheduler.CancelGroup(GROUP_DEMON); ElfTime(); @@ -223,9 +229,7 @@ struct boss_leotheras_the_blind : public BossAI if (me->GetDisplayId() == me->GetNativeDisplayId()) { if (me->GetReactState() != REACT_PASSIVE) - { DoMeleeAttackIfReady(); - } } else if (me->isAttackReady(BASE_ATTACK)) { @@ -235,9 +239,7 @@ struct boss_leotheras_the_blind : public BossAI DoMeleeAttackIfReady(); } else - { me->setAttackTimer(BASE_ATTACK, 2000); - } } } private: |