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

@@ -123,7 +123,7 @@ public:
events.ScheduleEvent(EVENT_ECK_SPIT, 10s);
break;
case EVENT_ECK_SPRING:
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1, 30.0f, true))
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 30.0f, true, false))
{
me->GetThreatMgr().ResetAllThreat();
me->AddThreat(target, 500.0f);

View File

@@ -207,7 +207,7 @@ public:
return;
}
events.ScheduleEvent(EVENT_IMPALING_CHARGE, 21s);
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1, 100.0f, true))
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 100.0f, true, false))
{
me->CastSpell(target, SPELL_IMPALING_CHARGE, false);
impaledList.insert(target->GetGUID());