This commit is contained in:
aozhiwei 2022-04-06 08:21:25 +08:00
parent b4a722af61
commit ab1d208aa9
2 changed files with 13 additions and 4 deletions

View File

@ -95,6 +95,16 @@ static RoomType_e GetHumanRoomType(const cs::CMJoin& msg, int& game_times)
}
}
void BattleDataContext::ParseResult(a8::XObject& obj)
{
#if 0
ctx.is_valid_battle = member->At("is_valid_battle")->AsXValue();
ctx.payload = member->At("payload")->AsXValue().GetString();
ctx.errcode = member->At("errcode")->AsXValue();
ctx.errmsg = member->At("errmsg")->AsXValue().GetString();
#endif
}
void RoomMgr::Init()
{
InstallReportStateTimer();
@ -809,10 +819,7 @@ void RoomMgr::SendGetBattleData(int mode,
auto& ctx = (*result->get()).at(i);
auto member = members->At(i);
if (member->GetType() == a8::XOT_OBJECT) {
ctx.is_valid_battle = member->At("is_valid_battle")->AsXValue();
ctx.payload = member->At("payload")->AsXValue().GetString();
ctx.errcode = member->At("errcode")->AsXValue();
ctx.errmsg = member->At("errmsg")->AsXValue().GetString();
ctx.ParseResult(*member);
}
}
}

View File

@ -54,6 +54,8 @@ struct BattleDataContext
std::string payload;
int errcode = 0;
std::string errmsg;
void ParseResult(a8::XObject& obj);
};
class Room;