Search in sources :

Example 1 with IfaceRoom

use of com.code.server.game.room.IfaceRoom in project summer by foxsugar.

the class RoomManager method removeRoom.

public static void removeRoom(String roomId) {
    // 本地内存删除room
    IfaceRoom room = getInstance().rooms.get(roomId);
    getInstance().rooms.remove(roomId);
    RedisManager.removeRoomAllInfo(roomId);
    // 删除代开房
    if (room != null && room instanceof Room) {
        Room rm = (Room) room;
        if (!rm.isCreaterJoin()) {
            RedisManager.getUserRedisService().removePerpareRoom(rm.getCreateUser(), rm.getRoomId());
        // if (prepareRoom.containsKey(rm.getCreateUser())) {
        // prepareRoom.get(rm.getCreateUser()).remove(rm.getRoomId());
        // }
        }
    }
    robotRoom.remove(room);
}
Also used : IfaceRoom(com.code.server.game.room.IfaceRoom) Room(com.code.server.game.room.Room) IfaceRoom(com.code.server.game.room.IfaceRoom)

Aggregations

IfaceRoom (com.code.server.game.room.IfaceRoom)1 Room (com.code.server.game.room.Room)1