From 4af16d1b24bd6bc8f6cde6b926525c0f9756ccd5 Mon Sep 17 00:00:00 2001 From: Shauren Date: Sat, 17 Sep 2016 11:00:58 +0200 Subject: Core/DataStores: Fixed loading hotfix locales when default locale set in worldserver.conf is not enUS --- src/server/game/DataStores/DB2Stores.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/server/game/DataStores/DB2Stores.cpp b/src/server/game/DataStores/DB2Stores.cpp index b00d0ad6aa3..675320317da 100644 --- a/src/server/game/DataStores/DB2Stores.cpp +++ b/src/server/game/DataStores/DB2Stores.cpp @@ -250,6 +250,10 @@ inline void LoadDB2(uint32& availableDb2Locales, DB2StoreProblemList& errlist, D if (storage->Load(db2Path + localeNames[defaultLocale] + '/', defaultLocale)) { storage->LoadFromDB(); + // LoadFromDB() always loads strings into enUS locale, other locales are expected to have data in corresponding _locale tables + // so we need to make additional call to load that data in case said locale is set as default by worldserver.conf (and we do not want to load all this data from .db2 file again) + if (defaultLocale != LOCALE_enUS) + storage->LoadStringsFromDB(defaultLocale); for (uint32 i = 0; i < TOTAL_LOCALES; ++i) { -- cgit v1.2.3