summaryrefslogtreecommitdiff
path: root/src/resources/db/chardb.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2020-05-07 11:11:08 +0300
committerAndrei Karas <akaras@inbox.ru>2020-05-07 11:15:38 +0300
commitf033f4f0fb66cac4a995e6a421135c514f039a77 (patch)
tree53323c2f67870ff6ff265e9ce620e7998d4cd0eb /src/resources/db/chardb.cpp
parent403d28fffdec3b369f8f2ae86eff5d4634317b1a (diff)
downloadmanaverse-f033f4f0fb66cac4a995e6a421135c514f039a77.tar.gz
manaverse-f033f4f0fb66cac4a995e6a421135c514f039a77.tar.bz2
manaverse-f033f4f0fb66cac4a995e6a421135c514f039a77.tar.xz
manaverse-f033f4f0fb66cac4a995e6a421135c514f039a77.zip
Add option for show/hide hidden gender
By default hidden gender is hidden.
Diffstat (limited to 'src/resources/db/chardb.cpp')
-rw-r--r--src/resources/db/chardb.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/resources/db/chardb.cpp b/src/resources/db/chardb.cpp
index 3eddf1c27..ca256e4f3 100644
--- a/src/resources/db/chardb.cpp
+++ b/src/resources/db/chardb.cpp
@@ -29,6 +29,7 @@
namespace
{
bool mLoaded = false;
+ bool showHiddenGender = false;
unsigned mMinHairColor = 0;
unsigned mMaxHairColor = 0;
unsigned mMinHairStyle = 0;
@@ -104,6 +105,10 @@ void CharDB::load()
{
loadMinMax(node, &mMinRace, &mMaxRace);
}
+ else if (xmlNameEqual(node, "flags"))
+ {
+ loadFlags(node);
+ }
}
delete doc;
@@ -121,6 +126,11 @@ void CharDB::loadMinMax(XmlNodeConstPtr node,
*max = XML::getProperty(node, "max", 10);
}
+void CharDB::loadFlags(XmlNodeConstPtr node)
+{
+ showHiddenGender = XML::getBoolProperty(node, "showHiddeGender", false);
+}
+
void CharDB::unload()
{
logger->log1("Unloading char database...");
@@ -187,3 +197,8 @@ const STD_VECTOR<BeingSlot> &CharDB::getDefaultItems()
{
return mDefaultItems;
}
+
+bool CharDB::getShowHiddenGender()
+{
+ return showHiddenGender;
+}