feat(Core): port aggro distance from vMaNGOS (#6214)
Read detection_range values from creature_template
This commit is contained in:
parent
6fa2ad4e33
commit
f8c8e98a0a
15 changed files with 89 additions and 72 deletions
|
|
@ -216,10 +216,10 @@ bool npc_escortAI::IsPlayerOrGroupInRange()
|
|||
{
|
||||
for (GroupReference* groupRef = group->GetFirstMember(); groupRef != nullptr; groupRef = groupRef->next())
|
||||
if (Player* member = groupRef->GetSource())
|
||||
if (me->IsWithinDistInMap(member, GetMaxPlayerDistance()))
|
||||
if (me->IsWithinDistInMap(member, GetMaxPlayerDistance(), true, false))
|
||||
return true;
|
||||
}
|
||||
else if (me->IsWithinDistInMap(player, GetMaxPlayerDistance()))
|
||||
else if (me->IsWithinDistInMap(player, GetMaxPlayerDistance(), true, false))
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue