This commit is contained in:
aozhiwei 2023-05-25 13:47:45 +08:00
parent 417796a65f
commit 44e2e4373d
3 changed files with 51 additions and 0 deletions

View File

@ -0,0 +1,31 @@
#pragma once
#include <bitset>
namespace mtb
{
class MapThingGroup
{
public:
a8::reflect::Class* GetClass() const;
int mtGroupId() const { return mtGroupId_; };
const std::string rule() const { return rule_; };
const std::string mapThings() const { return mapThings_; };
bool has_mtGroupId() const { return __flags__.test(0);};
bool has_rule() const { return __flags__.test(1);};
bool has_mapThings() const { return __flags__.test(2);};
protected:
int mtGroupId_ = 0;
std::string rule_;
std::string mapThings_;
public:
std::bitset<3> __flags__;
};
};

View File

@ -39,6 +39,7 @@
#include "mtb/GuideStep.h"
#include "mtb/WorldObject.h"
#include "mtb/MergeItem.h"
#include "mtb/MapThingGroup.h"
namespace mtb
{
@ -833,4 +834,16 @@ namespace mtb
return meta_class;
}
a8::reflect::Class* MapThingGroup::GetClass() const
{
a8::reflect::Class* meta_class = nullptr;
if (!meta_class) {
meta_class = new a8::reflect::Class("MapThingGroup", 3, 0);
meta_class->SetSimpleField(0, "mtGroupId", a8::reflect::ET_INT32, my_offsetof2(MapThingGroup, mtGroupId_));
meta_class->SetSimpleField(1, "rule", a8::reflect::ET_STRING, my_offsetof2(MapThingGroup, rule_));
meta_class->SetSimpleField(2, "mapThings", a8::reflect::ET_STRING, my_offsetof2(MapThingGroup, mapThings_));
}
return meta_class;
}
}

View File

@ -618,4 +618,11 @@ message MergeItem
optional string pickup3 = 3;
optional string pickup6 = 4;
optional string pickup9 = 5;
}
message MapThingGroup
{
optional int32 mtGroupId = 1;
optional string rule = 2;
optional string mapThings = 3;
}