From 89ee9cac4a9ee39bb13872bcb11736b8b8a153a7 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Tue, 3 Oct 2023 21:27:52 +0800 Subject: [PATCH] 1 --- server/gameserver/mtb/Map.h | 5 ++++- server/gameserver/mtb/mtb.all.cc | 3 ++- server/tools/protobuild/mt.proto | 1 + 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/server/gameserver/mtb/Map.h b/server/gameserver/mtb/Map.h index 22298d2c..e26709e9 100644 --- a/server/gameserver/mtb/Map.h +++ b/server/gameserver/mtb/Map.h @@ -37,6 +37,7 @@ namespace mtb int is_open() const { return is_open_; }; const std::string ground_sampling_pos() const { return ground_sampling_pos_; }; const std::string navmesh_file() const { return navmesh_file_; }; + int moba_time() const { return moba_time_; }; bool has_map_id() const { return __flags__.test(0);}; bool has_template_list() const { return __flags__.test(1);}; @@ -65,6 +66,7 @@ namespace mtb bool has_is_opon() const { return __flags__.test(24);}; bool has_ground_sampling_pos() const { return __flags__.test(25);}; bool has_navmesh_file() const { return __flags__.test(26);}; + bool has_moba_time() const { return __flags__.test(27);}; protected: @@ -95,9 +97,10 @@ namespace mtb int is_open_ = 0; std::string ground_sampling_pos_; std::string navmesh_file_; + int moba_time_ = 0; public: - std::bitset<27> __flags__; + std::bitset<28> __flags__; }; }; diff --git a/server/gameserver/mtb/mtb.all.cc b/server/gameserver/mtb/mtb.all.cc index 5cf5dff8..fcfac1b4 100644 --- a/server/gameserver/mtb/mtb.all.cc +++ b/server/gameserver/mtb/mtb.all.cc @@ -71,7 +71,7 @@ namespace mtb { a8::reflect::Class* meta_class = nullptr; if (!meta_class) { - meta_class = new a8::reflect::Class("Map", 27, 0); + meta_class = new a8::reflect::Class("Map", 28, 0); meta_class->SetSimpleField(0, "map_id", a8::reflect::ET_INT32, my_offsetof2(Map, map_id_)); meta_class->SetSimpleField(1, "template_list", a8::reflect::ET_STRING, my_offsetof2(Map, template_list_)); meta_class->SetSimpleField(2, "map_name", a8::reflect::ET_STRING, my_offsetof2(Map, map_name_)); @@ -99,6 +99,7 @@ namespace mtb meta_class->SetSimpleField(24, "is_open", a8::reflect::ET_INT32, my_offsetof2(Map, is_open_)); meta_class->SetSimpleField(25, "ground_sampling_pos", a8::reflect::ET_STRING, my_offsetof2(Map, ground_sampling_pos_)); meta_class->SetSimpleField(26, "navmesh_file", a8::reflect::ET_STRING, my_offsetof2(Map, navmesh_file_)); + meta_class->SetSimpleField(27, "moba_time", a8::reflect::ET_INT32, my_offsetof2(Map, moba_time_)); } return meta_class; } diff --git a/server/tools/protobuild/mt.proto b/server/tools/protobuild/mt.proto index 505418dd..4c30ae0b 100755 --- a/server/tools/protobuild/mt.proto +++ b/server/tools/protobuild/mt.proto @@ -42,6 +42,7 @@ message Map optional int32 is_open = 25; optional string ground_sampling_pos = 26; optional string navmesh_file = 27; + optional int32 moba_time = 28; } message MapArea