1
This commit is contained in:
parent
9da86d6e8f
commit
a3b084a924
@ -874,5 +874,24 @@ void RoomMgr::SendGetCustomBattleData(std::shared_ptr<cs::CMJoin> join_msg,
|
||||
head = join_msg->custom_room_payload().substr(0, pos - 1);
|
||||
body = join_msg->custom_room_payload().substr(pos);
|
||||
auto data = std::make_shared<a8::XObject>();
|
||||
data->ReadFromJsonString(body);
|
||||
if (!data->ReadFromJsonString(body) ||
|
||||
!data->IsObject()) {
|
||||
cb(1, "custom battle data error", nullptr);
|
||||
return;
|
||||
}
|
||||
std::string room_uuid = data->Get("team_uuid", "").GetString();
|
||||
int start_time = data->Get("start_time", "").GetInt();
|
||||
if (room_uuid.empty()) {
|
||||
cb(1, "custom battle data error", nullptr);
|
||||
return;
|
||||
}
|
||||
auto his_room = GetHisCustomRoom(room_uuid);
|
||||
if (his_room) {
|
||||
cb(2, "custom battle is dissolution", nullptr);
|
||||
return;
|
||||
}
|
||||
auto cur_room = GetCustomRoom(room_uuid);
|
||||
if (cur_room) {
|
||||
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user