mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/DataStores: Skip loading hotfixes for locales that are not loaded from files first
This commit is contained in:
@@ -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());
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user