diff --git a/server/gameserver/custom_battle.cc b/server/gameserver/custom_battle.cc index 300e0f52..070396a0 100644 --- a/server/gameserver/custom_battle.cc +++ b/server/gameserver/custom_battle.cc @@ -46,6 +46,7 @@ void CustomBattle::ParseResult(a8::XObject& obj) room_uuid_ = obj.Get("room_uuid").GetString(); zone_id_ = obj.Get("zone_id"); node_id_ = obj.Get("node_id"); + map_mode_ = obj.Get("map_mode"); map_id_ = obj.Get("map_id"); start_time_ = obj.Get("start_time"); sign_ = obj.Get("sign").GetString(); diff --git a/server/gameserver/custom_battle.h b/server/gameserver/custom_battle.h index c3511757..3bff05dd 100644 --- a/server/gameserver/custom_battle.h +++ b/server/gameserver/custom_battle.h @@ -25,6 +25,7 @@ class CustomBattle : public std::enable_shared_from_this const std::shared_ptr& GetRawData() { return raw_data_; } int GetZoneId() { return zone_id_; } int GetNodeId() { return zone_id_; } + int GetMapMode() { return map_mode_; } int GetMapId() { return map_id_; } RoomType_e GetRoomType(); RoomMode_e GetRoomMode(); @@ -68,6 +69,7 @@ private: std::string room_uuid_; int zone_id_ = 0; int node_id_ = 0; + int map_mode_ = 0; int map_id_ = 0; int start_time_ = 0; int team1_average_hero_lv_ = 0; diff --git a/server/gameserver/room.h b/server/gameserver/room.h index 17569637..ae78d834 100644 --- a/server/gameserver/room.h +++ b/server/gameserver/room.h @@ -121,6 +121,7 @@ public: RoomMode_e GetRoomMode() { return room_mode_; } std::string GetRoomUuid() { return room_uuid_; } int GetRoomIdx() { return room_idx_; } + const mt::MapMode* GetMapModeMeta() { return map_mode_; } const mt::Map* GetMapMeta() { return map_meta_; } bool IsBattleStarting() { return battle_starting_; }; std::shared_ptr GetCustomBattle() { return custom_battle_; } @@ -386,6 +387,7 @@ private: int room_idx_ = 0; RoomMode_e room_mode_ = kPvpMode; std::string room_uuid_; + const mt::MapMode* map_mode_ = nullptr; const mt::Map* map_meta_ = nullptr; std::string map_tpl_name_; RoomType_e room_type_ = RoomType_NewBrid; diff --git a/server/gameserver/roommgr.h b/server/gameserver/roommgr.h index c356ddeb..6aef776b 100644 --- a/server/gameserver/roommgr.h +++ b/server/gameserver/roommgr.h @@ -35,6 +35,7 @@ struct RoomInitInfo int pve_instance_id = 0; int pve_human_num = 0; + const mt::MapMode* map_mode = nullptr; const mt::Map* map_meta = nullptr; std::shared_ptr grid_service; std::shared_ptr map_service;