summaryrefslogtreecommitdiff
path: root/src/resources/db/chardb.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-01-09 20:44:02 +0300
committerAndrei Karas <akaras@inbox.ru>2015-01-09 20:44:02 +0300
commit7c6f3d5a9cc4e83520dc8c2ac75ec987e730d381 (patch)
treeb98490a46cb376fe4ae2237489be13619451ef1a /src/resources/db/chardb.cpp
parent0255911fce07d79d29684f9837f96a4c824f4040 (diff)
downloadplus-7c6f3d5a9cc4e83520dc8c2ac75ec987e730d381.tar.gz
plus-7c6f3d5a9cc4e83520dc8c2ac75ec987e730d381.tar.bz2
plus-7c6f3d5a9cc4e83520dc8c2ac75ec987e730d381.tar.xz
plus-7c6f3d5a9cc4e83520dc8c2ac75ec987e730d381.zip
Add min/max race into charcreation.xml.
Diffstat (limited to 'src/resources/db/chardb.cpp')
-rw-r--r--src/resources/db/chardb.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/resources/db/chardb.cpp b/src/resources/db/chardb.cpp
index b000a21fc..2fab004ad 100644
--- a/src/resources/db/chardb.cpp
+++ b/src/resources/db/chardb.cpp
@@ -38,6 +38,8 @@ namespace
unsigned mSumStat = 0;
unsigned mMinLook = 0;
unsigned mMaxLook = 0;
+ unsigned mMinRace = 0;
+ unsigned mMaxRace = 30;
std::vector<int> mDefaultItems;
} // namespace
@@ -83,6 +85,10 @@ void CharDB::load()
if (id > 0)
mDefaultItems.push_back(id);
}
+ else if (xmlNameEqual(node, "race"))
+ {
+ loadMinMax(node, &mMinRace, &mMaxRace);
+ }
}
delete doc;
@@ -150,6 +156,16 @@ unsigned CharDB::getMaxLook()
return mMaxLook;
}
+unsigned CharDB::getMinRace()
+{
+ return mMinRace;
+}
+
+unsigned CharDB::getMaxRace()
+{
+ return mMaxRace;
+}
+
const std::vector<int> &CharDB::getDefaultItems()
{
return mDefaultItems;