diff --git a/server/gameserver/mt/MapThingGroup.cc b/server/gameserver/mt/MapThingGroup.cc index 50263632..3624ef42 100644 --- a/server/gameserver/mt/MapThingGroup.cc +++ b/server/gameserver/mt/MapThingGroup.cc @@ -9,6 +9,20 @@ namespace mt void MapThingGroup::Init1() { + { + std::vector strings; + a8::Split(mapThings(), strings, '|'); + for (auto& str : strings) { + items_.push_back(std::make_tuple(1, a8::XValue(str).GetInt())); + } + } + { + std::vector strings; + a8::Split(heroes(), strings, '|'); + for (auto& str : strings) { + items_.push_back(std::make_tuple(2, a8::XValue(str).GetInt())); + } + } } } diff --git a/server/gameserver/mt/MapThingGroup.h b/server/gameserver/mt/MapThingGroup.h index 09dbdcd5..1f8c8144 100644 --- a/server/gameserver/mt/MapThingGroup.h +++ b/server/gameserver/mt/MapThingGroup.h @@ -13,6 +13,10 @@ namespace mt void Init1(); + std::vector>* GetItems() { return &items_; }; + + private: + std::vector> items_; }; } diff --git a/server/gameserver/mtb/MapThingGroup.h b/server/gameserver/mtb/MapThingGroup.h index 059c205a..38aa450d 100644 --- a/server/gameserver/mtb/MapThingGroup.h +++ b/server/gameserver/mtb/MapThingGroup.h @@ -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);};