Core/Realms: Realmlist refactors

* Removed global realm variable from World and use RealmList everywhere
* Match auth build key with client version
* Restored allowedSecurityLevel checks for realmlist packet building
* Restored updating population field
Port From (https://github.com/TrinityCore/TrinityCore/commit/c4b710446d62c95eb8124175203fa5f394912594)
This commit is contained in:
Hondacrx
2024-09-26 12:53:15 -04:00
parent 8341244e4d
commit d70529bc19
36 changed files with 393 additions and 298 deletions
+7 -3
View File
@@ -60,9 +60,13 @@ namespace Game
static CfgCategoriesCharsets GetRealmLanguageType(bool create)
{
Cfg_CategoriesRecord category = CliDB.CfgCategoriesStorage.LookupByKey(Global.WorldMgr.GetRealm().Timezone);
if (category != null)
return create ? category.GetCreateCharsetMask() : category.GetExistingCharsetMask();
var currentRealm = Global.RealmMgr.GetCurrentRealm();
if (currentRealm != null)
{
Cfg_CategoriesRecord category = CliDB.CfgCategoriesStorage.LookupByKey(currentRealm.Timezone);
if (category != null)
return create ? category.GetCreateCharsetMask() : category.GetExistingCharsetMask();
}
return create ? CfgCategoriesCharsets.English : CfgCategoriesCharsets.Any; // basic-Latin at create, any at login
}