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

View File

@@ -852,7 +852,7 @@ struct boss_sartharion_dragonAI : public BossAI
if (isCalledBySartharion)
{
if (Unit* target = SelectTarget(SelectTargetMethod::MaxThreat, 1, 500, true))
if (Unit* target = SelectTarget(SelectTargetMethod::MaxThreat, 0, 500, true, false))
{
AttackStart(target);
}

View File

@@ -396,7 +396,7 @@ public:
events.ScheduleEvent(EVENT_METEOR_STRIKE, 40s);
break;
case EVENT_FIERY_COMBUSTION:
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1, 100.0f, true, true, -SPELL_TWILIGHT_REALM))
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 100.0f, true, false, -SPELL_TWILIGHT_REALM))
me->CastSpell(target, SPELL_FIERY_COMBUSTION, false);
events.ScheduleEvent(EVENT_FIERY_COMBUSTION, 25s);
break;
@@ -539,7 +539,7 @@ public:
_events.ScheduleEvent(EVENT_BREATH, 10s, 12s);
break;
case EVENT_SOUL_CONSUMPTION:
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1, 100.0f, true, true, SPELL_TWILIGHT_REALM))
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 100.0f, true, false, SPELL_TWILIGHT_REALM))
me->CastSpell(target, SPELL_SOUL_CONSUMPTION, false);
_events.ScheduleEvent(EVENT_SOUL_CONSUMPTION, 20s);
break;