Core/CombatAI: Npcs with TurretAI will be able to attack again
Port From (https://github.com/TrinityCore/TrinityCore/commit/3ff61beafa9f028e582c4d810b93352aa85b18a7)
This commit is contained in:
@@ -255,8 +255,8 @@ namespace Game.AI
|
|||||||
public override bool CanAIAttack(Unit victim)
|
public override bool CanAIAttack(Unit victim)
|
||||||
{
|
{
|
||||||
// todo use one function to replace it
|
// todo use one function to replace it
|
||||||
if (!me.IsWithinCombatRange(me.GetVictim(), me.m_CombatDistance)
|
if (!me.IsWithinCombatRange(victim, me.m_CombatDistance)
|
||||||
|| (_minRange != 0 && me.IsWithinCombatRange(me.GetVictim(), _minRange)))
|
|| (_minRange != 0 && me.IsWithinCombatRange(victim, _minRange)))
|
||||||
return false;
|
return false;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user