refactor(Core/AI) don't add currentTarget to the front of the SelectTargetList for MaxThreat/Random (#21965)

This commit is contained in:
Tereneckla
2025-05-05 19:17:10 +00:00
committed by GitHub
parent 2772da9bf2
commit a8b982dca8
46 changed files with 71 additions and 77 deletions
@@ -214,7 +214,7 @@ struct boss_netherspite : public BossAI
context.Repeat(90s);
}).Schedule(15s, PORTAL_PHASE, [this](TaskContext context)
{
DoCastRandomTarget(SPELL_VOIDZONE, 1, 45.0f, true, true);
DoCastRandomTarget(SPELL_VOIDZONE, 0, 45.0f, true, true, false);
context.Repeat(15s);
});
}
@@ -127,7 +127,7 @@ struct boss_malchezaar : public BossAI
scheduler.Schedule(20s, 30s, [this](TaskContext context)
{
DoCastRandomTarget(SPELL_AMPLIFY_DAMAGE, 1);
DoCastRandomTarget(SPELL_AMPLIFY_DAMAGE, 0, 0.0f, true, false, false);
context.Repeat();
}).Schedule(20s, [this](TaskContext context)
{
@@ -1210,7 +1210,7 @@ struct boss_romulo : public ScriptedAI
_scheduler.Schedule(15s, GROUP_COMBAT, [this](TaskContext context)
{
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1, 100, true))
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 100, true, false))
{
if (target && !me->HasInArc(M_PI, target))
{