From e6b81c45a8042e1f47afd673dc399a756b042454 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Wed, 8 Jul 2020 21:05:04 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=88=BF=E9=97=B4=E5=8C=B9?= =?UTF-8?q?=E9=85=8D=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/gameserver/roommgr.cc | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/server/gameserver/roommgr.cc b/server/gameserver/roommgr.cc index 67c7758..acd75b5 100644 --- a/server/gameserver/roommgr.cc +++ b/server/gameserver/roommgr.cc @@ -44,7 +44,11 @@ static RoomType_e GetHumanRoomType(const cs::CMJoin& msg, int& game_times) #endif if (msg.force_entry_newbie_room()) { - return RT_NewBrid; + if (msg.team_uuid().empty()) { + return RT_NewBrid; + } else { + return RT_MidBrid; + } } if (game_times <= 0) { @@ -83,7 +87,7 @@ static RoomType_e GetHumanRoomType(const cs::CMJoin& msg, int& game_times) } } - if (rank >= 5 && rank <= 10) { + if (rank >= 0 && rank <= 10) { return RT_OldBrid1; } else if (rank >= 11 && rank <= 17) { return RT_OldBrid2; @@ -188,7 +192,9 @@ Room* RoomMgr::GetJoinableRoom(const cs::CMJoin& msg, const RoomType_e self_room } for (int i = 0; i < RT_Max; ++i) { for (Room* room : group_rooms[i]) { - return room; + if (room->GetRoomType() == self_room_type) { + return room; + } } } return CreateRoom(self_room_type, game_times);