From 286e2b7edc988f93e347b6ccfd51da2a56d18d73 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 6 Jan 2014 19:45:57 +0300 Subject: add patch files support for other xml dbs. --- src/defaults.cpp | 9 +++++++-- src/effectmanager.cpp | 1 + src/gui/windows/questswindow.cpp | 1 + src/gui/windows/skilldialog.cpp | 1 + src/statuseffect.cpp | 1 + src/units.cpp | 1 + 6 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/defaults.cpp b/src/defaults.cpp index a88a030b7..0ef44d8e2 100644 --- a/src/defaults.cpp +++ b/src/defaults.cpp @@ -475,12 +475,17 @@ DefaultsData* getPathsDefaults() AddDEF("help", "help/"); AddDEF("statusEffectsFile", "status-effects.xml"); + AddDEF("statusEffectsPatchFile", "status-effects_patch.xml"); AddDEF("effectsFile", "effects.xml"); + AddDEF("effectsPatchFile", "effects_patch.xml"); AddDEF("unitsFile", "units.xml"); + AddDEF("unitsPatchFile", "units_patch.xml"); AddDEF("featuresFile", "features.xml"); AddDEF("questsFile", "quests.xml"); - AddDEF("skillsFile", "ea-skills.xml"); - AddDEF("skillsFile2", "skills.xml"); + AddDEF("questsPatchFile", "quests_patch.xml"); + AddDEF("skillsFile", "skills.xml"); + AddDEF("skillsPatchFile", "skills_patch.xml"); + AddDEF("skillsFile2", "ea-skills.xml"); AddDEF("equipmentWindowFile", "equipmentwindow.xml"); AddDEF("emotesFile", "emotes.xml"); AddDEF("emotesPatchFile", "emotes_patch.xml"); diff --git a/src/effectmanager.cpp b/src/effectmanager.cpp index 17ef70508..ad333d1c4 100644 --- a/src/effectmanager.cpp +++ b/src/effectmanager.cpp @@ -37,6 +37,7 @@ EffectManager::EffectManager() : { logger->log1("Effects are now loading"); loadXmlFile(paths.getStringValue("effectsFile")); + loadXmlFile(paths.getStringValue("effectsPatchFile")); } void EffectManager::loadXmlFile(const std::string &fileName) diff --git a/src/gui/windows/questswindow.cpp b/src/gui/windows/questswindow.cpp index ec40f759f..e039b8ba4 100644 --- a/src/gui/windows/questswindow.cpp +++ b/src/gui/windows/questswindow.cpp @@ -182,6 +182,7 @@ QuestsWindow::QuestsWindow() : loadWindowState(); enableVisibleSound(true); loadXmlFile(paths.getStringValue("questsFile")); + loadXmlFile(paths.getStringValue("questsPatchFile")); } QuestsWindow::~QuestsWindow() diff --git a/src/gui/windows/skilldialog.cpp b/src/gui/windows/skilldialog.cpp index b11faedf5..989d5a96d 100644 --- a/src/gui/windows/skilldialog.cpp +++ b/src/gui/windows/skilldialog.cpp @@ -432,6 +432,7 @@ void SkillDialog::loadSkills() loadXmlFile(paths.getStringValue("skillsFile")); if (mSkills.empty()) loadXmlFile(paths.getStringValue("skillsFile2")); + loadXmlFile(paths.getStringValue("skillsPatchFile")); update(); } diff --git a/src/statuseffect.cpp b/src/statuseffect.cpp index be173b023..7a0020579 100644 --- a/src/statuseffect.cpp +++ b/src/statuseffect.cpp @@ -128,6 +128,7 @@ void StatusEffect::load() unload(); loadXmlFile(paths.getStringValue("statusEffectsFile")); + loadXmlFile(paths.getStringValue("statusEffectsPatchFile")); mLoaded = true; } diff --git a/src/units.cpp b/src/units.cpp index 7593f564f..0c31e1553 100644 --- a/src/units.cpp +++ b/src/units.cpp @@ -103,6 +103,7 @@ void Units::loadUnits() } loadXmlFile(paths.getStringValue("unitsFile")); + loadXmlFile(paths.getStringValue("unitsPatchFile")); } void Units::loadXmlFile(const std::string &fileName) -- cgit v1.2.3-70-g09d2