public void RemoveFromWorld() { if (!IsInWorld()) { return; } Region.RemoveObject(this); }
public bool Run(long Tick) { if (!Running) { return(false); } int i = 0; lock (_Objects) { UpdateAnnounces(Tick); Object Obj; for (; i < _Objects.Count; ++i) { Obj = _Objects[i]; if (Obj != null && Obj.Zone == this) { try { if (!Obj.IsLoad()) { Obj.Load(); } else { if (Obj.IsDisposed) { Region.RemoveObject(Obj); } else { Obj.Update(Tick); } } } catch (Exception e) { Log.Error("Zone", e.ToString()); if (!Obj.IsPlayer()) { RemoveObject(Obj); } } } } } return(true); }