From 78c57835ab3e3e077cc6f7284e0202083087aadc Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Tue, 7 Mar 2023 11:05:25 +0800 Subject: [PATCH] 1 --- server/gameserver/mtb/Map.h | 5 ++++- server/gameserver/mtb/mtb.all.cc | 3 ++- server/tools/protobuild/cs_proto.proto | 3 ++- server/tools/protobuild/mt.proto | 1 + 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/server/gameserver/mtb/Map.h b/server/gameserver/mtb/Map.h index 8e659e02..bcd0a917 100644 --- a/server/gameserver/mtb/Map.h +++ b/server/gameserver/mtb/Map.h @@ -29,6 +29,7 @@ namespace mtb const std::string car_num_limit() const { return car_num_limit_; }; float scale() const { return scale_; }; const std::string map_collider() const { return map_collider_; }; + const std::string world_object_file() const { return world_object_file_; }; bool has_map_id() const { return __flags__.test(0);}; bool has_template_list() const { return __flags__.test(1);}; @@ -49,6 +50,7 @@ namespace mtb bool has_car_num_limit() const { return __flags__.test(16);}; bool has_scale() const { return __flags__.test(17);}; bool has_map_collider() const { return __flags__.test(18);}; + bool has_world_object_file() const { return __flags__.test(19);}; protected: @@ -71,9 +73,10 @@ namespace mtb std::string car_num_limit_; float scale_ = 0.0f; std::string map_collider_; + std::string world_object_file_; public: - std::bitset<19> __flags__; + std::bitset<20> __flags__; }; }; diff --git a/server/gameserver/mtb/mtb.all.cc b/server/gameserver/mtb/mtb.all.cc index 2c5adc35..5dad23f3 100644 --- a/server/gameserver/mtb/mtb.all.cc +++ b/server/gameserver/mtb/mtb.all.cc @@ -67,7 +67,7 @@ namespace mtb { a8::reflect::Class* meta_class = nullptr; if (!meta_class) { - meta_class = new a8::reflect::Class("Map", 19, 0); + meta_class = new a8::reflect::Class("Map", 20, 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_)); @@ -87,6 +87,7 @@ namespace mtb meta_class->SetSimpleField(16, "car_num_limit", a8::reflect::ET_STRING, my_offsetof2(Map, car_num_limit_)); meta_class->SetSimpleField(17, "scale", a8::reflect::ET_FLOAT, my_offsetof2(Map, scale_)); meta_class->SetSimpleField(18, "map_collider", a8::reflect::ET_STRING, my_offsetof2(Map, map_collider_)); + meta_class->SetSimpleField(19, "world_object_file", a8::reflect::ET_STRING, my_offsetof2(Map, world_object_file_)); } return meta_class; } diff --git a/server/tools/protobuild/cs_proto.proto b/server/tools/protobuild/cs_proto.proto index 461c5df8..7ad9e5d9 100755 --- a/server/tools/protobuild/cs_proto.proto +++ b/server/tools/protobuild/cs_proto.proto @@ -113,7 +113,8 @@ message MFVec3 property_type: 2 最大血量 property_type: 3 背包 property_subtype: 索引 - valule: 數量 + valule: 當前數量 + value2:數量上限 property_type: 4 技能cd时间(剩余时间) property_type: 5 技能cd时间(总时间) property_type: 6 载具剩余子弹数 diff --git a/server/tools/protobuild/mt.proto b/server/tools/protobuild/mt.proto index 563deee9..501fac76 100755 --- a/server/tools/protobuild/mt.proto +++ b/server/tools/protobuild/mt.proto @@ -34,6 +34,7 @@ message Map optional string car_num_limit = 17; optional float scale = 18; optional string map_collider = 19; + optional string world_object_file = 20; } message MapArea