1
This commit is contained in:
parent
b4a722af61
commit
ab1d208aa9
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -54,6 +54,8 @@ struct BattleDataContext
|
||||
std::string payload;
|
||||
int errcode = 0;
|
||||
std::string errmsg;
|
||||
|
||||
void ParseResult(a8::XObject& obj);
|
||||
};
|
||||
|
||||
class Room;
|
||||
|
Loading…
x
Reference in New Issue
Block a user