summaryrefslogtreecommitdiff
path: root/src/resources/db
diff options
context:
space:
mode:
Diffstat (limited to 'src/resources/db')
-rw-r--r--src/resources/db/itemdb.cpp6
-rw-r--r--src/resources/db/monsterdb.cpp7
-rw-r--r--src/resources/db/npcdb.cpp7
3 files changed, 20 insertions, 0 deletions
diff --git a/src/resources/db/itemdb.cpp b/src/resources/db/itemdb.cpp
index 81feaea47..4c47658e6 100644
--- a/src/resources/db/itemdb.cpp
+++ b/src/resources/db/itemdb.cpp
@@ -25,6 +25,7 @@
#include "configuration.h"
#include "logger.h"
+#include "resources/beingcommon.h"
#include "resources/iteminfo.h"
#include "utils/dtor.h"
@@ -211,6 +212,11 @@ void ItemDB::load()
mUnknown->addTag(mTags["All"]);
loadXmlFile(paths.getStringValue("itemsFile"), tagNum);
loadXmlFile(paths.getStringValue("itemsPatchFile"), tagNum);
+
+ StringVect list;
+ BeingCommon::getIncludeFiles(paths.getStringValue("itemsPatchDir"), list);
+ FOR_EACH (StringVectCIter, it, list)
+ loadXmlFile(*it, tagNum);
}
void ItemDB::loadXmlFile(const std::string &fileName, int &tagNum)
diff --git a/src/resources/db/monsterdb.cpp b/src/resources/db/monsterdb.cpp
index f04743507..d5e36f443 100644
--- a/src/resources/db/monsterdb.cpp
+++ b/src/resources/db/monsterdb.cpp
@@ -50,6 +50,13 @@ void MonsterDB::load()
logger->log1("Initializing monster database...");
loadXmlFile(paths.getStringValue("monstersFile"));
loadXmlFile(paths.getStringValue("monstersPatchFile"));
+
+ StringVect list;
+ BeingCommon::getIncludeFiles(paths.getStringValue(
+ "monstersPatchDir"), list);
+ FOR_EACH (StringVectCIter, it, list)
+ loadXmlFile(*it);
+
mLoaded = true;
}
diff --git a/src/resources/db/npcdb.cpp b/src/resources/db/npcdb.cpp
index 7c983160c..c8b29c9da 100644
--- a/src/resources/db/npcdb.cpp
+++ b/src/resources/db/npcdb.cpp
@@ -49,6 +49,13 @@ void NPCDB::load()
loadXmlFile(paths.getStringValue("npcsFile"));
loadXmlFile(paths.getStringValue("npcsPatchFile"));
+
+ StringVect list;
+ BeingCommon::getIncludeFiles(paths.getStringValue(
+ "npcsPatchDir"), list);
+ FOR_EACH (StringVectCIter, it, list)
+ loadXmlFile(*it);
+
mLoaded = true;
}