diff --git a/server/gameserver/roommgr.cc b/server/gameserver/roommgr.cc index cbd2b25..220af01 100644 --- a/server/gameserver/roommgr.cc +++ b/server/gameserver/roommgr.cc @@ -149,6 +149,14 @@ int RoomMgr::OverRoomNum() Room* RoomMgr::GetJoinableRoom(const cs::CMJoin& msg, const RoomType_e self_room_type) { + #if 1 + for (auto& pair : inactive_room_hash_) { + if (pair.second->CanJoin(msg.account_id())) { + return pair.second; + } + } + return nullptr; + #else std::vector> group_rooms; for (int i = 0; i < RT_Max; ++i) { group_rooms.push_back(std::vector()); @@ -187,6 +195,7 @@ Room* RoomMgr::GetJoinableRoom(const cs::CMJoin& msg, const RoomType_e self_room } } return nullptr; + #endif } Room* RoomMgr::GetRoomByUuid(long long room_uuid)