1
This commit is contained in:
parent
10ebbf85d4
commit
aa9f1fc53a
@ -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<CustomBattle> 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<cs::CMJoin> join_msg = std::make_shared<cs::CMJoin>();
|
||||
@ -1045,15 +1045,15 @@ 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)
|
||||
{
|
||||
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<a8::XObject>();
|
||||
if (!data->ReadFromJsonString(body) ||
|
||||
!data->IsObject()) {
|
||||
@ -1091,7 +1091,7 @@ void RoomMgr::SendGetCustomBattleData(std::shared_ptr<cs::CMJoin> 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]
|
||||
|
@ -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; //透传数据
|
||||
}
|
||||
|
||||
//断线重连
|
||||
|
Loading…
x
Reference in New Issue
Block a user