diff options
author | Shiroe <krejza9@gmail.com> | 2021-07-08 18:01:27 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-08 18:01:27 +0200 |
commit | f8c8e98a0afacc765675f52f65c0f7cd37bc2220 (patch) | |
tree | 5131140535e8344e183d5b45d9d6b3d2bef639c9 /src/server/game/AI/CreatureAI.cpp | |
parent | 6fa2ad4e33ccd1b577367d41aa8e322c8930dbde (diff) |
feat(Core): port aggro distance from vMaNGOS (#6214)
Read detection_range values from creature_template
Diffstat (limited to 'src/server/game/AI/CreatureAI.cpp')
-rw-r--r-- | src/server/game/AI/CreatureAI.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/server/game/AI/CreatureAI.cpp b/src/server/game/AI/CreatureAI.cpp index aa460d654a..2957153dfb 100644 --- a/src/server/game/AI/CreatureAI.cpp +++ b/src/server/game/AI/CreatureAI.cpp @@ -120,7 +120,7 @@ void CreatureAI::MoveInLineOfSight(Unit* who) if (me->IsMoveInLineOfSightDisabled()) if (me->GetCreatureType() == CREATURE_TYPE_NON_COMBAT_PET || // nothing more to do, return !who->IsInCombat() || // if not in combat, nothing more to do - !me->IsWithinDist(who, ATTACK_DISTANCE)) // if in combat and in dist - neutral to all can actually assist other creatures + !me->IsWithinDist(who, ATTACK_DISTANCE, true, false)) // if in combat and in dist - neutral to all can actually assist other creatures return; if (me->CanStartAttack(who)) |