summaryrefslogtreecommitdiff
path: root/src/resources/chardb.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-07-07 23:53:20 +0300
committerAndrei Karas <akaras@inbox.ru>2012-07-07 23:53:20 +0300
commitdcc18eba1769a46aeaee2ff441706cf14f3ada4c (patch)
tree70a8eba874484f3764f8d0d8991b920afba318c9 /src/resources/chardb.cpp
parent281644be03765c7fdb038fe0480d974f3526766f (diff)
downloadManaVerse-dcc18eba1769a46aeaee2ff441706cf14f3ada4c.tar.gz
ManaVerse-dcc18eba1769a46aeaee2ff441706cf14f3ada4c.tar.bz2
ManaVerse-dcc18eba1769a46aeaee2ff441706cf14f3ada4c.tar.xz
ManaVerse-dcc18eba1769a46aeaee2ff441706cf14f3ada4c.zip
Add support for default equipment in char creation dialog.v1.2.7.8
Diffstat (limited to 'src/resources/chardb.cpp')
-rw-r--r--src/resources/chardb.cpp12
1 files changed, 12 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;
+}