aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/server/game/DataStores/DB2Stores.cpp9
-rw-r--r--src/server/game/DataStores/DB2Stores.h2
-rw-r--r--src/server/game/World/World.cpp2
3 files changed, 9 insertions, 4 deletions
diff --git a/src/server/game/DataStores/DB2Stores.cpp b/src/server/game/DataStores/DB2Stores.cpp
index 877f45ff2e9..cf258e0b3fa 100644
--- a/src/server/game/DataStores/DB2Stores.cpp
+++ b/src/server/game/DataStores/DB2Stores.cpp
@@ -521,7 +521,8 @@ void LoadDB2(std::bitset<TOTAL_LOCALES>& availableDb2Locales, std::vector<std::s
}
for (LocaleConstant i = LOCALE_koKR; i < TOTAL_LOCALES; i = LocaleConstant(i + 1))
- storage->LoadStringsFromDB(i);
+ if (availableDb2Locales[i])
+ storage->LoadStringsFromDB(i);
stores[storage->GetTableHash()] = storage;
}
@@ -1443,7 +1444,7 @@ void DB2Manager::LoadHotfixData()
TC_LOG_INFO("server.loading", ">> Loaded " SZFMTD " hotfix records in %u ms", _hotfixData.size(), GetMSTimeDiffToNow(oldMSTime));
}
-void DB2Manager::LoadHotfixBlob()
+void DB2Manager::LoadHotfixBlob(uint32 localeMask)
{
uint32 oldMSTime = getMSTime();
@@ -1455,6 +1456,7 @@ void DB2Manager::LoadHotfixBlob()
return;
}
+ std::bitset<TOTAL_LOCALES> availableDb2Locales = localeMask;
uint32 hotfixBlobCount = 0;
do
{
@@ -1479,6 +1481,9 @@ void DB2Manager::LoadHotfixBlob()
continue;
}
+ if (!availableDb2Locales[locale])
+ continue;
+
_hotfixBlob[locale][std::make_pair(tableHash, recordId)] = fields[3].GetBinary();
hotfixBlobCount++;
} while (result->NextRow());
diff --git a/src/server/game/DataStores/DB2Stores.h b/src/server/game/DataStores/DB2Stores.h
index 75003244072..665b56e178f 100644
--- a/src/server/game/DataStores/DB2Stores.h
+++ b/src/server/game/DataStores/DB2Stores.h
@@ -279,7 +279,7 @@ public:
DB2StorageBase const* GetStorage(uint32 type) const;
void LoadHotfixData();
- void LoadHotfixBlob();
+ void LoadHotfixBlob(uint32 localeMask);
uint32 GetHotfixCount() const;
HotfixContainer const& GetHotfixData() const;
std::vector<uint8> const* GetHotfixBlobData(uint32 tableHash, int32 recordId, LocaleConstant locale);
diff --git a/src/server/game/World/World.cpp b/src/server/game/World/World.cpp
index 3aa3fcde40b..f397743689a 100644
--- a/src/server/game/World/World.cpp
+++ b/src/server/game/World/World.cpp
@@ -1579,7 +1579,7 @@ void World::SetInitialWorldSettings()
}
TC_LOG_INFO("misc", "Loading hotfix blobs...");
- sDB2Manager.LoadHotfixBlob();
+ sDB2Manager.LoadHotfixBlob(m_availableDbcLocaleMask);
TC_LOG_INFO("misc", "Loading hotfix info...");
sDB2Manager.LoadHotfixData();
///- Close hotfix database - it is only used during DB2 loading