From 508b7369c708112e7434863f9c5cf6d1a7a24bd7 Mon Sep 17 00:00:00 2001 From: Grimdhex <176165533+Grimdhex@users.noreply.github.com> Date: Sat, 5 Oct 2024 11:02:06 +0200 Subject: [PATCH] fix(Scripts/BlackTemple): exclude off tank of the Azzinoth Flame's charge (#20133) * fix(Scripts/BlackTemple): exclude off tank of the Azzinoth Flame's charge * remove an unecessary elseif * Update boss_illidan.cpp --- .../scripts/Outland/BlackTemple/boss_illidan.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp b/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp index 067970420..80a152a4f 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp @@ -1317,8 +1317,18 @@ struct npc_flame_of_azzinoth : public ScriptedAI { ScheduleTimedEvent(10s, [&] { if (Creature* _blade = ObjectAccessor::GetCreature(*me, _bladeGUID)) + { + Unit* offTank = nullptr; + + if (Creature* secondBlaze = me->FindNearestCreature(NPC_BLAZE, 100.0f, true)) + offTank = secondBlaze->GetVictim(); + if (Unit* target = _blade->AI()->SelectTarget(SelectTargetMethod::Random, 0, -40.0f, true)) - DoCast(target, SPELL_CHARGE); + { + if (!offTank || offTank != target) + DoCast(target, SPELL_CHARGE); + } + } }, 5s, 20s); ScheduleTimedEvent(10s, 20s, [&] {