*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
This commit is contained in:
@@ -941,11 +941,11 @@ namespace Trinity
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
// too far
|
// too far
|
||||||
if (!i_funit->IsWithinDistInMap(u, i_range))
|
if (!u->IsWithinDistInMap(i_enemy, i_range))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// only if see assisted creature
|
// only if see assisted creature's enemy
|
||||||
if (!i_funit->IsWithinLOSInMap(u))
|
if (!u->IsWithinLOSInMap(i_enemy))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (u->AI())
|
if (u->AI())
|
||||||
|
|||||||
Reference in New Issue
Block a user