This commit is contained in:
aozhiwei 2023-05-25 16:15:41 +08:00
parent 554cb3f9bc
commit ce5e033a98
3 changed files with 19 additions and 1 deletions

View File

@ -9,6 +9,20 @@ namespace mt
void MapThingGroup::Init1()
{
{
std::vector<std::string> strings;
a8::Split(mapThings(), strings, '|');
for (auto& str : strings) {
items_.push_back(std::make_tuple(1, a8::XValue(str).GetInt()));
}
}
{
std::vector<std::string> strings;
a8::Split(heroes(), strings, '|');
for (auto& str : strings) {
items_.push_back(std::make_tuple(2, a8::XValue(str).GetInt()));
}
}
}
}

View File

@ -13,6 +13,10 @@ namespace mt
void Init1();
std::vector<std::tuple<int, int>>* GetItems() { return &items_; };
private:
std::vector<std::tuple<int, int>> items_;
};
}

View File

@ -13,7 +13,7 @@ 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_; };
const std::string heroes() const { return heroes_; };
bool has_mtGroupId() const { return __flags__.test(0);};
bool has_rule() const { return __flags__.test(1);};