Core/Objects: Refactor private object checks into separate function
Port From (https://github.com/TrinityCore/TrinityCore/commit/f21270b987211041b95d6befa7192d313692920d)
This commit is contained in:
@@ -2300,7 +2300,7 @@ namespace Game.Maps
|
||||
|
||||
public bool Invoke(Creature u)
|
||||
{
|
||||
if (u.GetDeathState() != DeathState.Dead && u.GetEntry() == i_entry && u.IsAlive() == i_alive && i_obj.IsWithinDistInMap(u, i_range) && u.CanSeeOrDetect(i_obj))
|
||||
if (u.GetDeathState() != DeathState.Dead && u.GetEntry() == i_entry && u.IsAlive() == i_alive && i_obj.IsWithinDistInMap(u, i_range) && u.CheckPrivateObjectOwnerVisibility(i_obj))
|
||||
{
|
||||
i_range = i_obj.GetDistance(u); // use found unit range as new range limit for next check
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user