diff options
Diffstat (limited to 'src/resources')
-rw-r--r-- | src/resources/chardb.cpp | 12 | ||||
-rw-r--r-- | src/resources/chardb.h | 4 |
2 files changed, 16 insertions, 0 deletions
diff --git a/src/resources/chardb.cpp b/src/resources/chardb.cpp index f38f13224..6ee5f964f 100644 --- a/src/resources/chardb.cpp +++ b/src/resources/chardb.cpp @@ -36,6 +36,7 @@ namespace unsigned mMinStat = 0; unsigned mMaxStat = 0; unsigned mSumStat = 0; + std::vector<int> mDefaultItems; } void CharDB::load() @@ -69,6 +70,12 @@ void CharDB::load() loadMinMax(node, &mMinStat, &mMaxStat); mSumStat = XML::getProperty(node, "sum", 0); } + else if (xmlNameEqual(node, "item")) + { + int id = XML::getProperty(node, "id", 0); + if (id > 0) + mDefaultItems.push_back(id); + } } delete doc; @@ -123,3 +130,8 @@ unsigned CharDB::getSumStat() { return mSumStat; } + +const std::vector<int> &CharDB::getDefaultItems() +{ + return mDefaultItems; +} diff --git a/src/resources/chardb.h b/src/resources/chardb.h index 60ff31084..d0628fbdf 100644 --- a/src/resources/chardb.h +++ b/src/resources/chardb.h @@ -27,6 +27,8 @@ #include "utils/xml.h" +#include <vector> + /** * Char information database. */ @@ -57,6 +59,8 @@ namespace CharDB unsigned getMaxStat(); unsigned getSumStat(); + + const std::vector<int> &getDefaultItems(); } #endif |