From 1cebd025fe5aeaaade2f1318d5868ca98c865a6f Mon Sep 17 00:00:00 2001 From: hondacrx Date: Wed, 23 Jun 2021 12:03:39 -0400 Subject: [PATCH] Core/CombatAI: Npcs with TurretAI will be able to attack again Port From (https://github.com/TrinityCore/TrinityCore/commit/3ff61beafa9f028e582c4d810b93352aa85b18a7) --- Source/Game/AI/CoreAI/CombatAI.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; }