This commit is contained in:
aozhiwei 2023-09-20 14:28:49 +08:00
parent 9cc1da5fc5
commit 8c90c5c147

View File

@ -944,22 +944,7 @@ void RoomMgr::SendGetCustomBattleData(std::shared_ptr<cs::CMJoin> join_msg,
} }
auto custom_battle = std::make_shared<CustomBattle>(); auto custom_battle = std::make_shared<CustomBattle>();
#if 0 custom_battle->ParseResult(*rsp_obj);
int match_mode = rsp_obj->Get("match_mode");
RoomMgr::Instance()->SetMatchMode(match_mode ? 1 : 0);
if (rsp_obj->HasKey("members")) {
auto members = rsp_obj->At("members");
if (members->GetType() == a8::XOT_ARRAY && members->Size() == result->size()) {
for (int i = 0; i < members->Size(); ++i) {
auto& ctx = result->at(i);
auto member = members->At(i);
if (member->GetType() == a8::XOT_OBJECT) {
ctx->ParseResult(*member);
}
}
}
}
#endif
cb(0, "", custom_battle); cb(0, "", custom_battle);
} else { } else {
f8::UdpLog::Instance()->Warning f8::UdpLog::Instance()->Warning