fix: Fixes loading map and static files (#1177)

This commit is contained in:
Kamron Batman 2022-09-29 16:02:41 -07:00 committed by GitHub
parent cd5541ec74
commit 4946afee51
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 727 additions and 712 deletions

View file

@ -264,35 +264,10 @@ public static class ServerConfiguration
m_Settings.Listeners.AddRange(ServerConfigurationPrompts.GetListeners());
}
bool? isPre60000 = null;
if (m_Settings.Expansion == null)
{
var expansion = GetSetting<Expansion>("currentExpansion");
var hasExpansion = expansion != null;
expansion ??= ServerConfigurationPrompts.GetExpansion();
if (expansion <= Expansion.ML && !hasExpansion)
{
isPre60000 = ServerConfigurationPrompts.GetIsClientPre6000();
if (isPre60000 == true)
{
SetSetting("maps.enablePre6000Trammel", true);
}
}
m_Settings.Expansion = GetSetting<Expansion>("currentExpansion") ?? ServerConfigurationPrompts.GetExpansion();
updated = true;
m_Settings.Expansion = expansion;
}
if (isPre60000 != true)
{
if (ServerConfigurationPrompts.GetIsClient7090())
{
updated = true;
SetSetting("maps.enablePostHSMultiComponentFormat", true);
}
}
Core.Expansion = m_Settings.Expansion.Value;