From 18e209dd715740a8d372bc015b4f603acc4fbcb2 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Wed, 20 Sep 2023 09:50:55 +0800 Subject: [PATCH] 1 --- server/gameserver/roommgr.cc | 8 ++++++++ server/gameserver/roommgr.h | 1 + 2 files changed, 9 insertions(+) diff --git a/server/gameserver/roommgr.cc b/server/gameserver/roommgr.cc index fbb2d9a3..bbf8d043 100644 --- a/server/gameserver/roommgr.cc +++ b/server/gameserver/roommgr.cc @@ -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 join_msg = std::make_shared(); *join_msg = msg; std::vector> join_msgs{join_msg}; @@ -841,6 +844,11 @@ std::shared_ptr 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 join_msg, std::function)> cb) { diff --git a/server/gameserver/roommgr.h b/server/gameserver/roommgr.h index 6146a5bf..184e4251 100644 --- a/server/gameserver/roommgr.h +++ b/server/gameserver/roommgr.h @@ -118,6 +118,7 @@ class RoomMgr : public a8::Singleton void AdjustCMJoin(cs::CMJoin* msg); std::shared_ptr GetCustomRoom(const std::string& room_uuid); std::shared_ptr GetHisCustomRoom(const std::string& room_uuid); + void _CMJoinCustomBattle(f8::MsgHdr& hdr, const cs::CMJoin& msg); void SendGetCustomBattleData(std::shared_ptr join_msg, std::function)> cb);