This commit is contained in:
aozhiwei 2019-07-25 21:51:15 +08:00
parent abfe1e71d8
commit 8c0bc41e93

View File

@ -102,12 +102,16 @@ int RoomMgr::OverRoomNum()
Room* RoomMgr::GetJoinableRoom(const cs::CMJoin& msg)
{
for (auto& pair : inactive_room_hash_) {
if (pair.second->CanJoin(msg)) {
return pair.second;
}
}
auto itr = room_unionid_hash_.find(msg.team_uuid());
if (itr != room_unionid_hash_.end()) {
if (itr->second->CanJoin(msg)) {
return itr->second;
} else {
return nullptr;
}
} else {
return nullptr;
}
}
Room* RoomMgr::GetRoomByUuid(long long room_uuid)