summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-01-06 18:28:58 +0300
committerAndrei Karas <akaras@inbox.ru>2014-01-06 18:28:58 +0300
commitc79af51bea401a358764791b0e2e1d7c75a4adc1 (patch)
tree2c1ba06b80e2822fb21d19b20e9ddc02cc595a41 /src
parentf55d6f7c27db71b7327d4de4ee294bcaf7b82f6b (diff)
downloadmv-c79af51bea401a358764791b0e2e1d7c75a4adc1.tar.gz
mv-c79af51bea401a358764791b0e2e1d7c75a4adc1.tar.bz2
mv-c79af51bea401a358764791b0e2e1d7c75a4adc1.tar.xz
mv-c79af51bea401a358764791b0e2e1d7c75a4adc1.zip
add patch files loading for most dbs.
Diffstat (limited to 'src')
-rw-r--r--src/defaults.cpp8
-rw-r--r--src/resources/db/avatardb.cpp1
-rw-r--r--src/resources/db/colordb.cpp4
-rw-r--r--src/resources/db/deaddb.cpp1
-rw-r--r--src/resources/db/emotedb.cpp1
-rw-r--r--src/resources/db/mapdb.cpp1
-rw-r--r--src/resources/db/petdb.cpp1
-rw-r--r--src/resources/db/sounddb.cpp1
8 files changed, 18 insertions, 0 deletions
diff --git a/src/defaults.cpp b/src/defaults.cpp
index 89ecae779..a88a030b7 100644
--- a/src/defaults.cpp
+++ b/src/defaults.cpp
@@ -483,24 +483,32 @@ DefaultsData* getPathsDefaults()
AddDEF("skillsFile2", "skills.xml");
AddDEF("equipmentWindowFile", "equipmentwindow.xml");
AddDEF("emotesFile", "emotes.xml");
+ AddDEF("emotesPatchFile", "emotes_patch.xml");
AddDEF("hairColorFile", "hair.xml");
+ AddDEF("hairColorPatchFile", "hair_patch.xml");
AddDEF("itemColorsFile", "itemcolors.xml");
+ AddDEF("itemColorsPatchFile", "itemcolors_patch.xml");
AddDEF("charCreationFile", "charcreation.xml");
AddDEF("soundsFile", "sounds.xml");
+ AddDEF("soundsPatchFile", "sounds_patch.xml");
AddDEF("itemsFile", "items.xml");
AddDEF("itemsPatchFile", "items_patch.xml");
AddDEF("itemsPatchDir", "items.d");
AddDEF("avatarsFile", "avatars.xml");
+ AddDEF("avatarsPatchFile", "avatars_patch.xml");
AddDEF("npcsFile", "npcs.xml");
AddDEF("npcsPatchFile", "npcs_patch.xml");
AddDEF("npcsPatchDir", "npcs.d");
AddDEF("petsFile", "pets.xml");
+ AddDEF("petsPatchFile", "pets_patch.xml");
AddDEF("monstersFile", "monsters.xml");
AddDEF("monstersPatchFile", "monsters_patch.xml");
AddDEF("monstersPatchDir", "monsters.d");
AddDEF("mapsRemapFile", "maps/remap.xml");
AddDEF("mapsFile", "maps.xml");
+ AddDEF("mapsPatchFile", "maps_patch.xml");
AddDEF("deadMessagesFile", "deadmessages.xml");
+ AddDEF("deadMessagesPatchFile", "deadmessages_patch.xml");
return configData;
}
diff --git a/src/resources/db/avatardb.cpp b/src/resources/db/avatardb.cpp
index 100803a2a..92f590cf7 100644
--- a/src/resources/db/avatardb.cpp
+++ b/src/resources/db/avatardb.cpp
@@ -44,6 +44,7 @@ void AvatarDB::load()
if (mLoaded)
unload();
loadXmlFile(paths.getStringValue("avatarsFile"));
+ loadXmlFile(paths.getStringValue("avatarsPatchFile"));
}
void AvatarDB::loadXmlFile(const std::string &fileName)
diff --git a/src/resources/db/colordb.cpp b/src/resources/db/colordb.cpp
index d94ac8bce..276b7e77a 100644
--- a/src/resources/db/colordb.cpp
+++ b/src/resources/db/colordb.cpp
@@ -48,10 +48,14 @@ void ColorDB::load()
if (it != mColorLists.end())
colors = it->second;
loadHair(paths.getStringValue("hairColorFile"), colors);
+ loadHair(paths.getStringValue("hairColorPatchFile"), colors);
mColorLists["hair"] = colors;
if (serverVersion >= 1)
+ {
loadColorLists(paths.getStringValue("itemColorsFile"));
+ loadColorLists(paths.getStringValue("itemColorsPatchFile"));
+ }
it = mColorLists.find("hair");
if (it != mColorLists.end())
diff --git a/src/resources/db/deaddb.cpp b/src/resources/db/deaddb.cpp
index be7c9cade..6bf5c4719 100644
--- a/src/resources/db/deaddb.cpp
+++ b/src/resources/db/deaddb.cpp
@@ -36,6 +36,7 @@ namespace
void DeadDB::load()
{
loadXmlFile(paths.getStringValue("deadMessagesFile"));
+ loadXmlFile(paths.getStringValue("deadMessagesPatchFile"));
}
void DeadDB::loadXmlFile(const std::string &fileName)
diff --git a/src/resources/db/emotedb.cpp b/src/resources/db/emotedb.cpp
index 3086ff4c5..eee6ec388 100644
--- a/src/resources/db/emotedb.cpp
+++ b/src/resources/db/emotedb.cpp
@@ -53,6 +53,7 @@ void EmoteDB::load()
mLastEmote = 0;
loadXmlFile(paths.getStringValue("emotesFile"));
+ loadXmlFile(paths.getStringValue("emotesPatchFile"));
loadSpecialXmlFile("graphics/sprites/manaplus_emotes.xml");
mLoaded = true;
diff --git a/src/resources/db/mapdb.cpp b/src/resources/db/mapdb.cpp
index 13f671ff4..2ff5d1fee 100644
--- a/src/resources/db/mapdb.cpp
+++ b/src/resources/db/mapdb.cpp
@@ -47,6 +47,7 @@ void MapDB::load()
loadRemap();
loadInfo(paths.getStringValue("mapsFile"));
+ loadInfo(paths.getStringValue("mapsPatchFile"));
mLoaded = true;
}
diff --git a/src/resources/db/petdb.cpp b/src/resources/db/petdb.cpp
index 7dcfd63e3..1d8e22d51 100644
--- a/src/resources/db/petdb.cpp
+++ b/src/resources/db/petdb.cpp
@@ -48,6 +48,7 @@ void PETDB::load()
logger->log1("Initializing PET database...");
loadXmlFile(paths.getStringValue("petsFile"));
+ loadXmlFile(paths.getStringValue("petsPatchFile"));
mLoaded = true;
}
diff --git a/src/resources/db/sounddb.cpp b/src/resources/db/sounddb.cpp
index ca7d0d654..a179eb2ff 100644
--- a/src/resources/db/sounddb.cpp
+++ b/src/resources/db/sounddb.cpp
@@ -38,6 +38,7 @@ void SoundDB::load()
{
unload();
loadXmlFile(paths.getStringValue("soundsFile"));
+ loadXmlFile(paths.getStringValue("soundsPatchFile"));
}
void SoundDB::loadXmlFile(const std::string &fileName)