private IEnumerable<int> GetRemovedEntities()
{
foreach (var i in _clientEntities.Where(i => i is Player))
{
if ((i as Player).vanished && i != this)
{
yield return i.Id;
}
}
foreach (var i in _clientEntities.Where(i => !(i is Player) || i.Owner == null))
{
if (MathsUtils.DistSqr(i.X, i.Y, X, Y) > SightRadius * SightRadius &&
!(i is StaticObject && (i as StaticObject).Static) &&
i != questEntity)
yield return i.Id;
else if (i.Owner == null)
yield return i.Id;
if (i is Player)
{
if ((i as Player).vanished && i != this)
{
yield return i.Id;
}
}
}
}