This commit is contained in:
aozhiwei 2023-05-25 16:02:15 +08:00
parent ebd05face0
commit 554cb3f9bc
4 changed files with 10 additions and 1 deletions

View File

@ -13,19 +13,22 @@ namespace mtb
int mtGroupId() const { return mtGroupId_; };
const std::string rule() const { return rule_; };
const std::string mapThings() const { return mapThings_; };
const std::string heores() const { return heroes_; };
bool has_mtGroupId() const { return __flags__.test(0);};
bool has_rule() const { return __flags__.test(1);};
bool has_mapThings() const { return __flags__.test(2);};
bool has_heroes() const { return __flags__.test(3);};
protected:
int mtGroupId_ = 0;
std::string rule_;
std::string mapThings_;
std::string heroes_;
public:
std::bitset<3> __flags__;
std::bitset<4> __flags__;
};
};

View File

@ -842,6 +842,7 @@ namespace mtb
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_));
meta_class->SetSimpleField(3, "heroes", a8::reflect::ET_STRING, my_offsetof2(MapThingGroup, heroes_));
}
return meta_class;
}

View File

@ -3671,6 +3671,10 @@ void Room::CreateWorldObjects()
int ikey = itr.first;
auto objects = itr.second;
std::shuffle(objects.begin(), objects.end(), std::default_random_engine(a8::XGetTickCount()));
const mt::MapThingGroup* group_meta = mt::MapThingGroup::GetById(ikey);
if (group_meta) {
}
}
if (born_point_hash_.size() < 10) {
abort();

View File

@ -625,4 +625,5 @@ message MapThingGroup
optional int32 mtGroupId = 1;
optional string rule = 2;
optional string mapThings = 3;
optional string heroes = 4;
}