internal void UnloadRoom(Room Room) { if (Room == null) { return; } lock (roomsToRemoveQueue.SyncRoot) { roomsToRemoveQueue.Enqueue(Room.RoomId); } if (OtanixEnvironment.GetGame().GetRoomManager().loadedBallRooms.Contains(Room)) { OtanixEnvironment.GetGame().GetRoomManager().QueueBallRemove(Room); } if (Room.HasOngoingEvent) { eventManager.QueueRemoveEvent(Room.RoomData); } if (OtanixEnvironment.GetGame().RoomIdEvent == Room.Id) { OtanixEnvironment.GetGame().RoomIdEvent = 0; } Room.Destroy(); Logging.WriteLine("[RoomMgr] Unloaded room: \"" + Room.RoomData.Name + "\" (ID: " + Room.RoomId + ")"); }
public void UnloadRoom(Room Room) { if (Room == null) { return; } Room room = null; if (this._rooms.TryRemove(Room.Id, out room)) { Room.Destroy(); } }
internal void UnloadRoom(Room Room) { if (Room == null) { return; } lock (roomsToRemoveQueue.SyncRoot) { roomsToRemoveQueue.Enqueue(Room.RoomId); } Room.Destroy(); Logging.WriteLine("[RoomMgr] Unloaded room: \"" + Room.Name + "\" (ID: " + Room.RoomId + ")"); }
internal void UnloadRoom(Room Room) { if (Room == null) { return; } lock (roomsToRemoveQueue.SyncRoot) { roomsToRemoveQueue.Enqueue(Room.RoomId); } Room.Destroy(); Logging.WriteLine("[RoomMgr] Unloaded room: \"" + Room.Name + "\" (ID: " + Room.RoomId + ")"); }