fix(Scripts/Mechanar): Fix Ranging Flames should choose a new target … (#18586)

fix(Scripts/Mechanar): Fix Ranging Flames should choose a new target on evade
This commit is contained in:
Andrew
2024-03-20 13:36:58 -03:00
committed by GitHub
parent b0a7f19f34
commit f567283f2b

View File

@@ -148,8 +148,12 @@ struct npc_raging_flames : public ScriptedAI
if (TempSummon* summon = me->ToTempSummon())
if (Creature* summoner = summon->GetSummonerCreatureBase())
if (summoner->IsAIEnabled)
{
if (Unit* target = summoner->AI()->SelectTarget(SelectTargetMethod::Random, 0, 100.0f, true, false))
me->AddThreat(target, 1000000.0f);
else
me->KillSelf();
}
}
void IsSummonedBy(WorldObject* /*summoner*/) override
@@ -176,7 +180,7 @@ struct npc_raging_flames : public ScriptedAI
void EnterEvadeMode(EvadeReason /*why*/) override
{
me->KillSelf();
FixateRandomTarget();
}
void UpdateAI(uint32 diff) override