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
@@ -74,7 +74,7 @@ public:
{
if (urand(0, 1))
{
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1, 0.0f, true))
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true, false))
{
DoCast(target, SPELL_SHADOW_BOLT_RANDOM);
}
@@ -353,7 +353,7 @@ public:
}
case EVENT_TELEPORT_RANDOM:
{
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1, 0.0f, true))
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true, false))
{
DoCastSelf(SPELL_HATE_TO_ZERO, true);
DoCast(target, SPELL_TELEPORT_RANDOM);