Exemple #1
0
        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 + ")");
        }
Exemple #2
0
        public void UnloadRoom(Room Room)
        {
            if (Room == null)
            {
                return;
            }

            Room room = null;

            if (this._rooms.TryRemove(Room.Id, out room))
            {
                Room.Destroy();
            }
        }
Exemple #3
0
        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 + ")");
        }
Exemple #4
0
        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 + ")");
        }