From 335a3529c1414b2af0895e84575a36d6ef906eba Mon Sep 17 00:00:00 2001 From: maximius Date: Tue, 13 Oct 2009 21:17:01 -0700 Subject: [PATCH] *Check distance and LOS based on i_enemy, not i_funit, to hopefully avoid some aggro chaining. Also determine LOS based on assisting unit's position, instead of (assisted unit/assisted unit's victim)'s position. --HG-- branch : trunk --- src/game/GridNotifiers.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/game/GridNotifiers.h b/src/game/GridNotifiers.h index d66b595dce..b76bbb2725 100644 --- a/src/game/GridNotifiers.h +++ b/src/game/GridNotifiers.h @@ -941,11 +941,11 @@ namespace Trinity return; // too far - if (!i_funit->IsWithinDistInMap(u, i_range)) + if (!u->IsWithinDistInMap(i_enemy, i_range)) return; - // only if see assisted creature - if (!i_funit->IsWithinLOSInMap(u)) + // only if see assisted creature's enemy + if (!u->IsWithinLOSInMap(i_enemy)) return; if (u->AI())