This commit is contained in:
aozhiwei 2023-09-20 19:23:58 +08:00
parent 48e506aa91
commit da1c077ff9

View File

@ -881,14 +881,19 @@ void RoomMgr::_CMJoinCustomBattle(f8::MsgHdr& hdr, const cs::CMJoin& msg)
return;
}
if (!p->GetRoom()) {
int game_times = 0;
RoomType_e self_room_type = GetHumanRoomType(member->GetNetData());
time_t register_time = f8::ExtractRegisterTimeFromSessionId(msg.session_id());
int proto_version = msg.proto_version();
int channel = f8::ExtractChannelIdFromAccountId(msg.account_id());
Room* room = RoomMgr::Instance()->CreateRoom
(*join_msg,
RoomType_OldBrid1, //self_room_type,
0, //game_times,
0, //creator_register_time,
self_room_type,
game_times,
register_time,
join_msg->proto_version(),
0, //channel,
0, //msg.mapid());
channel,
msg.mapid(),
p);
}
Player* hum = p->GetRoom()->NewPlayer();