summaryrefslogtreecommitdiff
path: root/src/resources
diff options
context:
space:
mode:
Diffstat (limited to 'src/resources')
-rw-r--r--src/resources/db/chardb.cpp16
-rw-r--r--src/resources/db/chardb.h4
2 files changed, 20 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;
diff --git a/src/resources/db/chardb.h b/src/resources/db/chardb.h
index 02a07c723..653b5ff83 100644
--- a/src/resources/db/chardb.h
+++ b/src/resources/db/chardb.h
@@ -63,6 +63,10 @@ namespace CharDB
unsigned getMaxLook() A_WARN_UNUSED;
+ unsigned getMinRace() A_WARN_UNUSED;
+
+ unsigned getMaxRace() A_WARN_UNUSED;
+
const std::vector<int> &getDefaultItems() A_WARN_UNUSED;
} // namespace CharDB