1
This commit is contained in:
parent
7d94a6af73
commit
21616022a0
@ -928,6 +928,20 @@ void RoomMgr::SendGetCustomBattleData(std::shared_ptr<cs::CMJoin> join_msg,
|
||||
}
|
||||
int errcode = rsp_obj->Get("errcode", "").GetInt();
|
||||
std::string errmsg = rsp_obj->Get("errmsg", "").GetString();
|
||||
if (!errcode) {
|
||||
cb(1, "", nullptr);
|
||||
return;
|
||||
}
|
||||
std::string room_uuid = rsp_obj->Get("team_uuid", "").GetString();
|
||||
if (room_uuid.empty()) {
|
||||
cb(1, "custom battle data error", nullptr);
|
||||
return;
|
||||
}
|
||||
auto cur_room = RoomMgr::Instance()->GetCustomRoom(room_uuid);
|
||||
if (cur_room) {
|
||||
cb(0, "", cur_room);
|
||||
return;
|
||||
}
|
||||
|
||||
auto custom_battle = std::make_shared<CustomBattle>();
|
||||
if (rsp_obj->GetType() == a8::XOT_OBJECT) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user