This commit is contained in:
aozhiwei 2023-06-30 13:50:20 +08:00
parent e59d206cd5
commit ee7bdd5f93
3 changed files with 6 additions and 1 deletions

View File

@ -20,6 +20,7 @@ namespace mtb
int x1() const { return x1_; };
int y1() const { return y1_; };
std::string boss() const { return boss_; };
int rebirth() const { return rebirth_; };
bool has_id() const { return __flags__.test(0);};
bool has_level() const { return __flags__.test(1);};
@ -31,6 +32,7 @@ namespace mtb
bool has_x1() const { return __flags__.test(7);};
bool has_y1() const { return __flags__.test(8);};
bool has_boss() const { return __flags__.test(9);};
bool has_rebirth() const { return __flags__.test(10);};
protected:
@ -44,6 +46,7 @@ namespace mtb
int x1_ = 0;
int y1_ = 0;
std::string boss_;
int rebirth_ = 0;
public:
std::bitset<10> __flags__;

View File

@ -162,7 +162,7 @@ namespace mtb
{
a8::reflect::Class* meta_class = nullptr;
if (!meta_class) {
meta_class = new a8::reflect::Class("SafeArea", 10, 0);
meta_class = new a8::reflect::Class("SafeArea", 11, 0);
meta_class->SetSimpleField(0, "id", a8::reflect::ET_INT32, my_offsetof2(SafeArea, id_));
meta_class->SetSimpleField(1, "level", a8::reflect::ET_INT32, my_offsetof2(SafeArea, level_));
meta_class->SetSimpleField(2, "rad", a8::reflect::ET_INT32, my_offsetof2(SafeArea, rad_));
@ -173,6 +173,7 @@ namespace mtb
meta_class->SetSimpleField(7, "x1", a8::reflect::ET_INT32, my_offsetof2(SafeArea, x1_));
meta_class->SetSimpleField(8, "y1", a8::reflect::ET_INT32, my_offsetof2(SafeArea, y1_));
meta_class->SetSimpleField(9, "boss", a8::reflect::ET_STRING, my_offsetof2(SafeArea, boss_));
meta_class->SetSimpleField(10, "rebirth", a8::reflect::ET_INT32, my_offsetof2(SafeArea, rebirth_));
}
return meta_class;
}

View File

@ -101,6 +101,7 @@ message SafeArea
optional int32 x1 = 8;
optional int32 y1 = 9;
optional string boss = 10;
optional int32 rebirth = 11;
}
message SafeAreaSafePoint