This commit is contained in:
aozhiwei 2024-04-17 16:32:59 +08:00
parent c27f4796cb
commit 32f2441a22
3 changed files with 7 additions and 2 deletions

View File

@ -39,6 +39,7 @@ namespace mtb
const std::string navmesh_file() const { return navmesh_file_; }; const std::string navmesh_file() const { return navmesh_file_; };
int moba_time() const { return moba_time_; }; int moba_time() const { return moba_time_; };
int is_moba() const { return is_moba_; }; int is_moba() const { return is_moba_; };
int support_sandtable() const { return support_sandtable_; };
bool has_map_id() const { return __flags__.test(0);}; bool has_map_id() const { return __flags__.test(0);};
bool has_template_list() const { return __flags__.test(1);}; bool has_template_list() const { return __flags__.test(1);};
@ -69,6 +70,7 @@ namespace mtb
bool has_navmesh_file() const { return __flags__.test(26);}; bool has_navmesh_file() const { return __flags__.test(26);};
bool has_moba_time() const { return __flags__.test(27);}; bool has_moba_time() const { return __flags__.test(27);};
bool has_is_moba() const { return __flags__.test(28);}; bool has_is_moba() const { return __flags__.test(28);};
bool has_support_sandtable() const { return __flags__.test(29);};
protected: protected:
@ -101,9 +103,10 @@ namespace mtb
std::string navmesh_file_; std::string navmesh_file_;
int moba_time_ = 0; int moba_time_ = 0;
int is_moba_ = 0; int is_moba_ = 0;
int support_sandtable_ = 0;
public: public:
std::bitset<29> __flags__; std::bitset<30> __flags__;
}; };
}; };

View File

@ -79,7 +79,7 @@ namespace mtb
{ {
std::shared_ptr<a8::reflect::Class> meta_class = nullptr; std::shared_ptr<a8::reflect::Class> meta_class = nullptr;
if (!meta_class) { if (!meta_class) {
meta_class = std::make_shared<a8::reflect::Class>("Map", 29, 0); meta_class = std::make_shared<a8::reflect::Class>("Map", 30, 0);
meta_class->SetSimpleField(0, "map_id", a8::reflect::ET_INT32, my_offsetof2(Map, map_id_)); 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(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_)); meta_class->SetSimpleField(2, "map_name", a8::reflect::ET_STRING, my_offsetof2(Map, map_name_));
@ -109,6 +109,7 @@ namespace mtb
meta_class->SetSimpleField(26, "navmesh_file", a8::reflect::ET_STRING, my_offsetof2(Map, navmesh_file_)); 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_)); meta_class->SetSimpleField(27, "moba_time", a8::reflect::ET_INT32, my_offsetof2(Map, moba_time_));
meta_class->SetSimpleField(28, "is_moba", a8::reflect::ET_INT32, my_offsetof2(Map, is_moba_)); meta_class->SetSimpleField(28, "is_moba", a8::reflect::ET_INT32, my_offsetof2(Map, is_moba_));
meta_class->SetSimpleField(29, "support_sandtable", a8::reflect::ET_INT32, my_offsetof2(Map, support_sandtable_));
} }
return meta_class; return meta_class;
} }

View File

@ -44,6 +44,7 @@ message Map
optional string navmesh_file = 27; optional string navmesh_file = 27;
optional int32 moba_time = 28; optional int32 moba_time = 28;
optional int32 is_moba = 29; optional int32 is_moba = 29;
optional int32 support_sandtable = 30;
} }
message MapMode message MapMode