private IEnumerable<Entity> GetNewEntities()
{
foreach (var i in Owner.Players.Where(i => _clientEntities.Add(i.Value)))
{
if (!i.Value.vanished || i.Value == this)
{
yield return i.Value;
}
}
foreach (var i in Owner.PlayersCollision.HitTest(X, Y, SightRadius).OfType<Decoy>().Where(i => _clientEntities.Add(i)))
{
yield return i;
}
foreach (var i in Owner.EnemiesCollision.HitTest(X, Y, SightRadius))
{
if (i is Container)
{
var owner = (i as Container).BagOwner;
if (owner != null && owner != AccountId) continue;
}
if (MathsUtils.DistSqr(i.X, i.Y, X, Y) <= SightRadius * SightRadius)
{
if (_clientEntities.Add(i))
yield return i;
}
}
if (questEntity != null && _clientEntities.Add(questEntity))
yield return questEntity;
}