Core/Misc: Added Loading.Locales to enable/disable the load of locales

Port From (https://github.com/TrinityCore/TrinityCore/commit/3fd967754388b7b859dbd8b954ec68a844e172f0)
This commit is contained in:
Hondacrx
2024-08-25 21:03:45 -04:00
parent 9ad961e64a
commit c98e58a7e1
8 changed files with 76 additions and 22 deletions
+1 -1
View File
@@ -23,7 +23,7 @@ namespace Game.DataStorage
foreach (var dir in Directory.GetDirectories(db2Path))
{
Locale locale = Path.GetFileName(dir).ToEnum<Locale>();
if (SharedConst.IsValidLocale(locale))
if (SharedConst.IsValidLocale(locale) && (WorldConfig.GetBoolValue(WorldCfg.LoadLocales) || locale == defaultLocale))
availableDb2Locales[(int)locale] = true;
}