summaryrefslogtreecommitdiff
path: root/src/resources/db
diff options
context:
space:
mode:
Diffstat (limited to 'src/resources/db')
-rw-r--r--src/resources/db/chardb.cpp15
-rw-r--r--src/resources/db/chardb.h4
2 files changed, 19 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;
+}
diff --git a/src/resources/db/chardb.h b/src/resources/db/chardb.h
index 88cea5173..cc60bd954 100644
--- a/src/resources/db/chardb.h
+++ b/src/resources/db/chardb.h
@@ -47,6 +47,8 @@ namespace CharDB
unsigned *restrict const min,
unsigned *restrict const max);
+ void loadFlags(XmlNodeConstPtr node);
+
unsigned getMinHairColor() A_WARN_UNUSED;
unsigned getMaxHairColor() A_WARN_UNUSED;
@@ -70,6 +72,8 @@ namespace CharDB
unsigned getMaxRace() A_WARN_UNUSED;
const STD_VECTOR<BeingSlot> &getDefaultItems() A_WARN_UNUSED;
+
+ bool getShowHiddenGender();
} // namespace CharDB
#endif // RESOURCES_DB_CHARDB_H