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)
This commit is contained in:
@@ -3315,11 +3315,10 @@ namespace Game.Entities
|
|||||||
|
|
||||||
// last case when creature must not go to evade mode:
|
// 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
|
// 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
|
// Note: creature does not have targeted movement generator but has attacker in this case
|
||||||
foreach (var unit in attackerList)
|
foreach (var unit in attackerList)
|
||||||
{
|
{
|
||||||
if (!CanCreatureAttack(unit) && !unit.IsTypeId(TypeId.Player)
|
if (CanCreatureAttack(unit) && !unit.IsTypeId(TypeId.Player)
|
||||||
&& !unit.ToCreature().HasUnitTypeMask(UnitTypeMask.ControlableGuardian))
|
&& !unit.ToCreature().HasUnitTypeMask(UnitTypeMask.ControlableGuardian))
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user