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
This commit is contained in:
Grimdhex
2024-10-05 11:02:06 +02:00
committed by GitHub
parent 01b86ec7a6
commit 508b7369c7

View File

@@ -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, [&] {