This commit is contained in:
aozhiwei 2023-09-20 14:10:03 +08:00
parent b49c99f768
commit 7d94a6af73

View File

@ -921,6 +921,14 @@ void RoomMgr::SendGetCustomBattleData(std::shared_ptr<cs::CMJoin> join_msg,
{ {
rsp_obj->ToJsonStr() rsp_obj->ToJsonStr()
}); });
if (rsp_obj->GetType() != a8::XOT_OBJECT ||
!rsp_obj->HasKey("errcode")) {
cb(1, "", nullptr);
return;
}
int errcode = rsp_obj->Get("errcode", "").GetInt();
std::string errmsg = rsp_obj->Get("errmsg", "").GetString();
auto custom_battle = std::make_shared<CustomBattle>(); auto custom_battle = std::make_shared<CustomBattle>();
if (rsp_obj->GetType() == a8::XOT_OBJECT) { if (rsp_obj->GetType() == a8::XOT_OBJECT) {
#if 0 #if 0