1
This commit is contained in:
parent
ca511bd151
commit
ad975c9f5c
@ -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<std::vector<Room*>> group_rooms;
|
||||
for (int i = 0; i < RT_Max; ++i) {
|
||||
group_rooms.push_back(std::vector<Room*>());
|
||||
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user