mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-24 14:16:31 +00:00
feat(Core): port aggro distance from vMaNGOS (#6214)
Read detection_range values from creature_template
This commit is contained in:
@@ -1060,7 +1060,7 @@ namespace Acore
|
||||
}
|
||||
bool operator()(Unit* u)
|
||||
{
|
||||
if (!me->IsWithinDistInMap(u, m_range))
|
||||
if (!me->IsWithinDistInMap(u, m_range, true, false))
|
||||
return false;
|
||||
|
||||
if (!me->IsValidAttackTarget(u))
|
||||
@@ -1086,7 +1086,7 @@ namespace Acore
|
||||
explicit NearestHostileUnitInAttackDistanceCheck(Creature const* creature, float dist) : me(creature), m_range(dist) {}
|
||||
bool operator()(Unit* u)
|
||||
{
|
||||
if (!me->IsWithinDistInMap(u, m_range))
|
||||
if (!me->IsWithinDistInMap(u, m_range, true, false))
|
||||
return false;
|
||||
|
||||
if (!me->CanStartAttack(u))
|
||||
|
||||
Reference in New Issue
Block a user