This commit is contained in:
aozhiwei 2023-10-03 21:27:52 +08:00
parent aa7be551cd
commit 89ee9cac4a
3 changed files with 7 additions and 2 deletions

View File

@ -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__;
};
};

View File

@ -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;
}

View File

@ -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