This commit is contained in:
aozhiwei 2023-09-20 10:43:02 +08:00
parent 424e84b1da
commit 9da86d6e8f
2 changed files with 6 additions and 2 deletions

View File

@ -12,7 +12,8 @@ class CustomBattle
Room* GetRoom() { return room_; }
const std::string& GetRoomId() { return room_id_; }
const std::string& GetRoomUuid() { return room_uuid_; }
const std::string& GetRawData() { return raw_data_; }
const std::string& GetSign() { return sign_; }
const std::shared_ptr<a8::XObject>& GetRawData() { return raw_data_; }
int GetZoneId() { return zone_id_; }
int GetNodeId() { return zone_id_; }
int GetStartTime() { return start_time_; }
@ -24,6 +25,7 @@ class CustomBattle
int zone_id_ = 0;
int node_id_ = 0;
int start_time_ = 0;
std::string raw_data_;
std::string sign_;
std::shared_ptr<a8::XObject> raw_data_;
std::map<std::string, std::shared_ptr<CustomTeam>> team_hash_;
};

View File

@ -873,4 +873,6 @@ void RoomMgr::SendGetCustomBattleData(std::shared_ptr<cs::CMJoin> join_msg,
}
head = join_msg->custom_room_payload().substr(0, pos - 1);
body = join_msg->custom_room_payload().substr(pos);
auto data = std::make_shared<a8::XObject>();
data->ReadFromJsonString(body);
}