diff --git a/server/gameserver/roommgr.cc b/server/gameserver/roommgr.cc index 7e4d9799..751d3de4 100644 --- a/server/gameserver/roommgr.cc +++ b/server/gameserver/roommgr.cc @@ -140,7 +140,7 @@ void RoomMgr::_CMJoin(f8::MsgHdr* hdr, const cs::CMJoin& msg) JoinErrorHandle(msg, 3, hdr->socket_handle); return; } - if (!msg.custom_room_payload().empty()) { + if (!msg.payload_data().empty()) { _CMJoinCustomBattle(hdr, msg); return; } @@ -907,7 +907,7 @@ void RoomMgr::AdjustCMJoin(cs::CMJoin* msg) #ifdef MYDEBUG a8::XPrintf("custom_room_payload %s\n", { - msg->custom_room_payload() + msg->payload_data() }); #endif #if 0 @@ -949,7 +949,7 @@ std::shared_ptr RoomMgr::GetHisCustomRoom(const std::string& room_ void RoomMgr::_CMJoinCustomBattle(f8::MsgHdr* hdr, const cs::CMJoin& msg) { - if (msg.custom_room_payload().empty()) { + if (msg.payload_data().empty()) { return; } std::shared_ptr join_msg = std::make_shared(); @@ -1045,15 +1045,15 @@ void RoomMgr::_CMJoinCustomBattle(f8::MsgHdr* hdr, const cs::CMJoin& msg) void RoomMgr::SendGetCustomBattleData(std::shared_ptr join_msg, std::function)> cb) { - auto pos = join_msg->custom_room_payload().find('|'); + auto pos = join_msg->payload_data().find('|'); std::string head; std::string body; if (pos == std::string::npos) { cb(1, "custom battle data error", nullptr); return; } - head = join_msg->custom_room_payload().substr(0, pos); - body = join_msg->custom_room_payload().substr(pos + 1); + head = join_msg->payload_data().substr(0, pos); + body = join_msg->payload_data().substr(pos + 1); auto data = std::make_shared(); if (!data->ReadFromJsonString(body) || !data->IsObject()) { @@ -1091,7 +1091,7 @@ void RoomMgr::SendGetCustomBattleData(std::shared_ptr join_msg, auto url_params = a8::MutableXObject::CreateObject(); url_params->SetVal("account_id", join_msg->account_id()); url_params->SetVal("session_id", join_msg->session_id()); - url_params->SetVal("__POST", join_msg->custom_room_payload()); + url_params->SetVal("__POST", join_msg->payload_data()); HttpProxy::Instance()->HttpGet ( [cb] diff --git a/server/tools/protobuild/cs_proto.proto b/server/tools/protobuild/cs_proto.proto index a170d24a..ff84aaa8 100755 --- a/server/tools/protobuild/cs_proto.proto +++ b/server/tools/protobuild/cs_proto.proto @@ -1415,7 +1415,7 @@ message CMJoin optional int32 pve_instance_id = 72; //pve副本id optional int32 team_slot_num = 73; //队伍槽位数1-4 optional int32 force_enter_newbie_room = 74; //强制进新手房 - optional string custom_room_payload = 75; //自定义房间透传数据 + optional string payload_data = 75; //透传数据 } //断线重连