This commit is contained in:
aozhiwei 2023-09-20 09:50:55 +08:00
parent bb7a5b9cab
commit 18e209dd71
2 changed files with 9 additions and 0 deletions

View File

@ -113,6 +113,9 @@ void RoomMgr::_CMJoin(f8::MsgHdr& hdr, const cs::CMJoin& msg)
JoinErrorHandle(msg, 3, hdr.socket_handle);
return;
}
if (!msg.custom_room_payload().empty()) {
_CMJoinCustomBattle(hdr, msg);
}
std::shared_ptr<cs::CMJoin> join_msg = std::make_shared<cs::CMJoin>();
*join_msg = msg;
std::vector<std::shared_ptr<cs::CMJoin>> join_msgs{join_msg};
@ -841,6 +844,11 @@ std::shared_ptr<CustomBattle> RoomMgr::GetHisCustomRoom(const std::string& room_
return itr != his_custom_room_hash_.end() ? itr->second : nullptr;
}
void RoomMgr::_CMJoinCustomBattle(f8::MsgHdr& hdr, const cs::CMJoin& msg)
{
}
void RoomMgr::SendGetCustomBattleData(std::shared_ptr<cs::CMJoin> join_msg,
std::function<void(int, const std::string, std::shared_ptr<CustomBattle>)> cb)
{

View File

@ -118,6 +118,7 @@ class RoomMgr : public a8::Singleton<RoomMgr>
void AdjustCMJoin(cs::CMJoin* msg);
std::shared_ptr<CustomBattle> GetCustomRoom(const std::string& room_uuid);
std::shared_ptr<CustomBattle> GetHisCustomRoom(const std::string& room_uuid);
void _CMJoinCustomBattle(f8::MsgHdr& hdr, const cs::CMJoin& msg);
void SendGetCustomBattleData(std::shared_ptr<cs::CMJoin> join_msg,
std::function<void(int, const std::string, std::shared_ptr<CustomBattle>)> cb);