diff options
| author | sirikfoll <sirikfoll@hotmail.com> | 2018-01-17 19:01:09 -0200 |
|---|---|---|
| committer | sirikfoll <sirikfoll@hotmail.com> | 2018-01-17 19:01:09 -0200 |
| commit | e12e0ad5827d7e794baa630724069680d7e07cfb (patch) | |
| tree | 7dcc50fa49dc62fa4168995406c17cb92fdf0628 | |
| parent | ed9e220991e2aa3fa2d50359608fd27057cafbbc (diff) | |
Core/CombatAI: Npcs with TurretAI will be able to attack again
Needed after the new Threat system
| -rw-r--r-- | src/server/game/AI/CoreAI/CombatAI.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/server/game/AI/CoreAI/CombatAI.cpp b/src/server/game/AI/CoreAI/CombatAI.cpp index b25d499fbc6..680b5ebb7c3 100644 --- a/src/server/game/AI/CoreAI/CombatAI.cpp +++ b/src/server/game/AI/CoreAI/CombatAI.cpp @@ -237,11 +237,11 @@ TurretAI::TurretAI(Creature* c) : CreatureAI(c) me->m_SightDistance = me->m_CombatDistance; } -bool TurretAI::CanAIAttack(Unit const* /*who*/) const +bool TurretAI::CanAIAttack(Unit const* who) const { /// @todo use one function to replace it - if (!me->IsWithinCombatRange(me->GetVictim(), me->m_CombatDistance) - || (m_minRange && me->IsWithinCombatRange(me->GetVictim(), m_minRange))) + if (!me->IsWithinCombatRange(who, me->m_CombatDistance) + || (m_minRange && me->IsWithinCombatRange(who, m_minRange))) return false; return true; } |
