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

@@ -307,7 +307,7 @@ public:
if (victim && (target->GetGUID() == victim->GetGUID()))
{
me->AddThreat(victim, -1000000); // drop current player, add a ton to second. This should guarantee that we don't end up with both 1 and 2 in a cage...
if (Unit* newTarget = SelectTarget(SelectTargetMethod::MaxThreat, 1, 200.0f)) // search in whole room
if (Unit* newTarget = SelectTarget(SelectTargetMethod::MaxThreat, 0, 200.0f, false, false)) // search in whole room
{
me->AddThreat(newTarget, 1000000);
}

View File

@@ -208,7 +208,7 @@ public:
events.ScheduleEvent(EVENT_CURSE_OF_TONGUES, 20s);
break;
case EVENT_DOMINATE_MIND:
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1, 20.0f, true))
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 20.0f, true, false))
{
me->CastSpell(target, SPELL_DOMINATE_MIND, false);
}