private void SpawnTeleporter() { if (Teleporter != null) { Teleporter.Delete(); } if (this.Map == null || this.Map == Map.Internal) { return; } IPooledEnumerable eable = this.Map.GetItemsInRange(TeleporterLocation, 0); foreach (Item item in eable) { if (item is ShameTeleporter) { item.Delete(); } } eable.Free(); Teleporter = new ShameTeleporter(this, TeleporterDestination, this.Map); Teleporter.MoveToWorld(TeleporterLocation, this.Map); }
private void SpawnTeleporter() { if (Teleporter != null) Teleporter.Delete(); if (this.Map == null || this.Map == Map.Internal) return; IPooledEnumerable eable = this.Map.GetItemsInRange(TeleporterLocation, 0); foreach (Item item in eable) { if (item is ShameTeleporter) item.Delete(); } eable.Free(); Teleporter = new ShameTeleporter(this, TeleporterDestination, this.Map); Teleporter.MoveToWorld(TeleporterLocation, this.Map); }