mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2025-11-29 17:38:24 +08:00
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:
@@ -148,8 +148,12 @@ struct npc_raging_flames : public ScriptedAI
|
|||||||
if (TempSummon* summon = me->ToTempSummon())
|
if (TempSummon* summon = me->ToTempSummon())
|
||||||
if (Creature* summoner = summon->GetSummonerCreatureBase())
|
if (Creature* summoner = summon->GetSummonerCreatureBase())
|
||||||
if (summoner->IsAIEnabled)
|
if (summoner->IsAIEnabled)
|
||||||
|
{
|
||||||
if (Unit* target = summoner->AI()->SelectTarget(SelectTargetMethod::Random, 0, 100.0f, true, false))
|
if (Unit* target = summoner->AI()->SelectTarget(SelectTargetMethod::Random, 0, 100.0f, true, false))
|
||||||
me->AddThreat(target, 1000000.0f);
|
me->AddThreat(target, 1000000.0f);
|
||||||
|
else
|
||||||
|
me->KillSelf();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void IsSummonedBy(WorldObject* /*summoner*/) override
|
void IsSummonedBy(WorldObject* /*summoner*/) override
|
||||||
@@ -176,7 +180,7 @@ struct npc_raging_flames : public ScriptedAI
|
|||||||
|
|
||||||
void EnterEvadeMode(EvadeReason /*why*/) override
|
void EnterEvadeMode(EvadeReason /*why*/) override
|
||||||
{
|
{
|
||||||
me->KillSelf();
|
FixateRandomTarget();
|
||||||
}
|
}
|
||||||
|
|
||||||
void UpdateAI(uint32 diff) override
|
void UpdateAI(uint32 diff) override
|
||||||
|
|||||||
Reference in New Issue
Block a user