This commit is contained in:
aozhiwei 2024-04-18 15:17:38 +08:00
parent 8a1c0aff08
commit e27bd6299f
4 changed files with 6 additions and 0 deletions

View File

@ -46,6 +46,7 @@ void CustomBattle::ParseResult(a8::XObject& obj)
room_uuid_ = obj.Get("room_uuid").GetString(); room_uuid_ = obj.Get("room_uuid").GetString();
zone_id_ = obj.Get("zone_id"); zone_id_ = obj.Get("zone_id");
node_id_ = obj.Get("node_id"); node_id_ = obj.Get("node_id");
map_mode_ = obj.Get("map_mode");
map_id_ = obj.Get("map_id"); map_id_ = obj.Get("map_id");
start_time_ = obj.Get("start_time"); start_time_ = obj.Get("start_time");
sign_ = obj.Get("sign").GetString(); sign_ = obj.Get("sign").GetString();

View File

@ -25,6 +25,7 @@ class CustomBattle : public std::enable_shared_from_this<CustomBattle>
const std::shared_ptr<a8::XObject>& GetRawData() { return raw_data_; } const std::shared_ptr<a8::XObject>& GetRawData() { return raw_data_; }
int GetZoneId() { return zone_id_; } int GetZoneId() { return zone_id_; }
int GetNodeId() { return zone_id_; } int GetNodeId() { return zone_id_; }
int GetMapMode() { return map_mode_; }
int GetMapId() { return map_id_; } int GetMapId() { return map_id_; }
RoomType_e GetRoomType(); RoomType_e GetRoomType();
RoomMode_e GetRoomMode(); RoomMode_e GetRoomMode();
@ -68,6 +69,7 @@ private:
std::string room_uuid_; std::string room_uuid_;
int zone_id_ = 0; int zone_id_ = 0;
int node_id_ = 0; int node_id_ = 0;
int map_mode_ = 0;
int map_id_ = 0; int map_id_ = 0;
int start_time_ = 0; int start_time_ = 0;
int team1_average_hero_lv_ = 0; int team1_average_hero_lv_ = 0;

View File

@ -121,6 +121,7 @@ public:
RoomMode_e GetRoomMode() { return room_mode_; } RoomMode_e GetRoomMode() { return room_mode_; }
std::string GetRoomUuid() { return room_uuid_; } std::string GetRoomUuid() { return room_uuid_; }
int GetRoomIdx() { return room_idx_; } int GetRoomIdx() { return room_idx_; }
const mt::MapMode* GetMapModeMeta() { return map_mode_; }
const mt::Map* GetMapMeta() { return map_meta_; } const mt::Map* GetMapMeta() { return map_meta_; }
bool IsBattleStarting() { return battle_starting_; }; bool IsBattleStarting() { return battle_starting_; };
std::shared_ptr<CustomBattle> GetCustomBattle() { return custom_battle_; } std::shared_ptr<CustomBattle> GetCustomBattle() { return custom_battle_; }
@ -386,6 +387,7 @@ private:
int room_idx_ = 0; int room_idx_ = 0;
RoomMode_e room_mode_ = kPvpMode; RoomMode_e room_mode_ = kPvpMode;
std::string room_uuid_; std::string room_uuid_;
const mt::MapMode* map_mode_ = nullptr;
const mt::Map* map_meta_ = nullptr; const mt::Map* map_meta_ = nullptr;
std::string map_tpl_name_; std::string map_tpl_name_;
RoomType_e room_type_ = RoomType_NewBrid; RoomType_e room_type_ = RoomType_NewBrid;

View File

@ -35,6 +35,7 @@ struct RoomInitInfo
int pve_instance_id = 0; int pve_instance_id = 0;
int pve_human_num = 0; int pve_human_num = 0;
const mt::MapMode* map_mode = nullptr;
const mt::Map* map_meta = nullptr; const mt::Map* map_meta = nullptr;
std::shared_ptr<GridService> grid_service; std::shared_ptr<GridService> grid_service;
std::shared_ptr<MapService> map_service; std::shared_ptr<MapService> map_service;