From 15f0aebb234be203793e0b0b6ee396de00258bb2 Mon Sep 17 00:00:00 2001 From: hondacrx Date: Mon, 24 Aug 2020 19:20:38 -0400 Subject: [PATCH] Core/Creature: Fix an oversight in Creature::SelectVictim that was causing creatures to evade when chased by another creature from outside their own aggro range. Port From (https://github.com/TrinityCore/TrinityCore/commit/f97b601d9381196a4cfa352bff2d0826f211eda1) --- Source/Game/Entities/Creature/Creature.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Source/Game/Entities/Creature/Creature.cs b/Source/Game/Entities/Creature/Creature.cs index 4d5dfe969..397de7fd6 100644 --- a/Source/Game/Entities/Creature/Creature.cs +++ b/Source/Game/Entities/Creature/Creature.cs @@ -3315,11 +3315,10 @@ namespace Game.Entities // last case when creature must not go to evade mode: // it in combat but attacker not make any damage and not enter to aggro radius to have record in threat list - // for example at owner command to pet attack some far away creature // Note: creature does not have targeted movement generator but has attacker in this case foreach (var unit in attackerList) { - if (!CanCreatureAttack(unit) && !unit.IsTypeId(TypeId.Player) + if (CanCreatureAttack(unit) && !unit.IsTypeId(TypeId.Player) && !unit.ToCreature().HasUnitTypeMask(UnitTypeMask.ControlableGuardian)) return null; }