aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjackpoz <giacomopoz@gmail.com>2020-09-23 20:17:35 +0200
committerShauren <shauren.trinity@gmail.com>2022-02-27 23:26:54 +0100
commitdf94ce0f6853e62b9eb591cba38fa36917314c6d (patch)
treec0d0a4bad76d3bcd831bc2db6481a03e5fa35f37 /src
parenta788e0c3e185dedcd87fe9d85a9f81e2e8ff1738 (diff)
Core/Creature: Ignore combat reach when looking for assisting creatures
Fixes #25487 (cherry picked from commit 24018b7a74ec8e68e43895e0e57f6397f59ea890)
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Grids/Notifiers/GridNotifiers.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/server/game/Grids/Notifiers/GridNotifiers.h b/src/server/game/Grids/Notifiers/GridNotifiers.h
index 6ae52d3cb63..bd02f9c7cce 100644
--- a/src/server/game/Grids/Notifiers/GridNotifiers.h
+++ b/src/server/game/Grids/Notifiers/GridNotifiers.h
@@ -1199,7 +1199,8 @@ namespace Trinity
return;
// too far
- if (!u->IsWithinDistInMap(i_funit, i_range))
+ // Don't use combat reach distance, range must be an absolute value, otherwise the chain aggro range will be too big
+ if (!u->IsWithinDistInMap(i_funit, i_range, true, false, false))
return;
// only if see assisted creature's enemy
@@ -1340,7 +1341,8 @@ namespace Trinity
return false;
// too far
- if (!i_funit->IsWithinDistInMap(u, i_range))
+ // Don't use combat reach distance, range must be an absolute value, otherwise the chain aggro range will be too big
+ if (!i_funit->IsWithinDistInMap(u, i_range, true, false, false))
return false;
// only if see assisted creature
@@ -1369,7 +1371,8 @@ namespace Trinity
if (!u->CanAssistTo(i_obj, i_enemy))
return false;
- if (!i_obj->IsWithinDistInMap(u, i_range))
+ // Don't use combat reach distance, range must be an absolute value, otherwise the chain aggro range will be too big
+ if (!i_obj->IsWithinDistInMap(u, i_range, true, false, false))
return false;
if (!i_obj->IsWithinLOSInMap(u))