refactor(Core/UnitAI): Update target selector (#13169)

* refactor(Core/UnitAI): Update TargetSelector.

Cherry-pick:
*https://github.com/TrinityCore/TrinityCore/pull/19930

Co-authored-by: Treeston <treeston@users.noreply.github.com>

* fix GGC/CLang errors in scripts

* .

* missing a file and fix a script error

* .

* fix path changes dude to a miss click in the second commit

* .

Co-authored-by: Maelthyrr <lynethris@protonmail.ch>
Co-authored-by: Treeston <treeston@users.noreply.github.com>
This commit is contained in:
Maelthyr
2022-12-06 13:27:13 +01:00
committed by GitHub
parent 9fd5b39065
commit 3024bee3ba
27 changed files with 140 additions and 89 deletions

View File

@@ -1505,7 +1505,7 @@ public:
{
uint8 i = 0;
std::list<Unit*> drakes;
c->AI()->SelectTargetList(drakes, (c->GetMap()->GetSpawnMode() == 0 ? 1 : 3), SelectTargetMethod::Random, 0.0f, false, 57403 /*only drakes have this aura*/);
c->AI()->SelectTargetList(drakes, (c->GetMap()->GetSpawnMode() == 0 ? 1 : 3), SelectTargetMethod::Random, 0, 0.0f, false, true, 57403 /*only drakes have this aura*/);
for (std::list<Unit*>::iterator itr = drakes.begin(); itr != drakes.end() && i < 3; ++itr)
{
DrakeGUID[i++] = (*itr)->GetGUID();