summaryrefslogtreecommitdiff
path: root/src/resources/db/npcdb.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/resources/db/npcdb.cpp')
-rw-r--r--src/resources/db/npcdb.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/resources/db/npcdb.cpp b/src/resources/db/npcdb.cpp
index 1827cd859..6c63ee57f 100644
--- a/src/resources/db/npcdb.cpp
+++ b/src/resources/db/npcdb.cpp
@@ -48,16 +48,17 @@ void NPCDB::load()
logger->log1("Initializing NPC database...");
- loadXmlFile(paths.getStringValue("npcsFile"));
- loadXmlFile(paths.getStringValue("npcsPatchFile"));
+ loadXmlFile(paths.getStringValue("npcsFile"), SkipError_false);
+ loadXmlFile(paths.getStringValue("npcsPatchFile"), SkipError_true);
loadXmlDir("npcsPatchDir", loadXmlFile);
mLoaded = true;
}
-void NPCDB::loadXmlFile(const std::string &fileName)
+void NPCDB::loadXmlFile(const std::string &fileName,
+ const SkipError skipError)
{
- XML::Document doc(fileName, UseResman_true, SkipError_false);
+ XML::Document doc(fileName, UseResman_true, skipError);
const XmlNodePtrConst rootNode = doc.rootNode();
if (!rootNode || !xmlNameEqual(rootNode, "npcs"))
@@ -75,7 +76,7 @@ void NPCDB::loadXmlFile(const std::string &fileName)
{
const std::string name = XML::getProperty(npcNode, "name", "");
if (!name.empty())
- loadXmlFile(name);
+ loadXmlFile(name, skipError);
continue;
}