Core/Creature: Ignore combat reach when looking for assisting creatures

Port From (https://github.com/TrinityCore/TrinityCore/commit/df94ce0f6853e62b9eb591cba38fa36917314c6d)
This commit is contained in:
hondacrx
2022-05-24 10:13:19 -04:00
parent 52b9e6cb31
commit b0ac02546a
+7 -3
View File
@@ -924,7 +924,8 @@ namespace Game.Maps
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
@@ -2321,7 +2322,8 @@ namespace Game.Maps
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
@@ -2349,10 +2351,12 @@ namespace Game.Maps
{
if (u == i_obj)
return false;
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))