mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 01:15:35 +01:00
Fix the broken logic in NearestHostileUnitInAttackDistanceCheck
This commit is contained in:
@@ -1025,11 +1025,12 @@ namespace Trinity
|
||||
return false;
|
||||
|
||||
if (m_force)
|
||||
{
|
||||
if (!me->IsValidAttackTarget(u))
|
||||
return false;
|
||||
else
|
||||
if (!me->canStartAttack(u, false))
|
||||
return false;
|
||||
}
|
||||
else if (!me->canStartAttack(u, false))
|
||||
return false;
|
||||
|
||||
m_range = me->GetDistance(u); // use found unit range as new range limit for next check
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user