diff --git a/Source/Game/AI/CoreAI/CombatAI.cs b/Source/Game/AI/CoreAI/CombatAI.cs index d15f9a306..684a89134 100644 --- a/Source/Game/AI/CoreAI/CombatAI.cs +++ b/Source/Game/AI/CoreAI/CombatAI.cs @@ -255,8 +255,8 @@ namespace Game.AI public override bool CanAIAttack(Unit victim) { // todo use one function to replace it - if (!me.IsWithinCombatRange(me.GetVictim(), me.m_CombatDistance) - || (_minRange != 0 && me.IsWithinCombatRange(me.GetVictim(), _minRange))) + if (!me.IsWithinCombatRange(victim, me.m_CombatDistance) + || (_minRange != 0 && me.IsWithinCombatRange(victim, _minRange))) return false; return true; }