[WIP] Core/AI: Pets musn't attack civilian NPC in aggressive mode

Port From (https://github.com/TrinityCore/TrinityCore/commit/1e932109996a0ce2117f3d5268064ee882267e84)
This commit is contained in:
hondacrx
2022-01-07 09:36:23 -05:00
parent c6186f17bd
commit 63fa8636f4
3 changed files with 15 additions and 4 deletions
+1 -1
View File
@@ -336,7 +336,7 @@ namespace Game.AI
{
if (!me.GetCharmInfo().IsReturning() || me.GetCharmInfo().IsFollowing() || me.GetCharmInfo().IsAtStay())
{
Unit nearTarget = me.SelectNearestHostileUnitInAggroRange(true);
Unit nearTarget = me.SelectNearestHostileUnitInAggroRange(true, true);
if (nearTarget)
return nearTarget;
}