mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-14 17:49:10 +00:00
fix(Core/Formations): Implemented new creature formation flag: GROUP_… (#14537)
fix(Core/Formations): Implemented new creature formation flag: GROUP_AI_FLAG_ACQUIRE_NEW_TARGET_ON_EVADE. Fixes #14494
This commit is contained in:
@@ -14687,6 +14687,16 @@ Unit* Creature::SelectVictim()
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// Last chance: creature group
|
||||
if (CreatureGroup* group = GetFormation())
|
||||
{
|
||||
if (Unit* groupTarget = group->GetNewTargetForMember(this))
|
||||
{
|
||||
SetInFront(groupTarget);
|
||||
return groupTarget;
|
||||
}
|
||||
}
|
||||
|
||||
// enter in evade mode in other case
|
||||
AI()->EnterEvadeMode();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user