Merges crash bugs into master (#12)

This commit is contained in:
Kamron Batman 2019-03-03 14:28:24 -08:00 • committed by GitHub
parent 916d404c51
commit 39dfe86e10
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 33 additions and 85 deletions

View file

@ -1789,18 +1789,7 @@ namespace Server
[CommandProperty(AccessLevel.Counselor, AccessLevel.GameMaster)]
public Map LogoutMap{ get; set; }
public Region Region
{
get
{
if (m_Region == null)
if (Map == null)
return Map.Internal.DefaultRegion;
else
return Map.DefaultRegion;
return m_Region;
}
}
public Region Region => m_Region ?? (Map == null ? Map.Internal.DefaultRegion : Map.DefaultRegion);
public Packet RemovePacket
{

View file

@ -416,7 +416,7 @@ namespace Server
return false;
}
// TODO: Memoize this
public T GetRegion<T>() where T : Region
{
@ -468,7 +468,7 @@ namespace Server
return null;
}
public bool IsPartOf<T>() where T : Region
{
return GetRegion<T>() != null;
@ -840,7 +840,7 @@ namespace Server
Console.WriteLine("Could not find root element 'ServerRegions' in Regions.xml");
return;
}
foreach (XmlElement facet in root.SelectNodes("Facet"))
{
Map map = null;
@ -1172,4 +1172,4 @@ namespace Server
return true;
}
}
}
}

View file

@ -7,7 +7,7 @@
<!-- Automatically check for missing packages during build in Visual Studio -->
<add key="automatic" value="True" />
</packageRestore>
</configuration>
<packages>
<package id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="2.0.1" targetFramework="net47" />
</packages>
<packages>
<package id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="2.0.1" targetFramework="net47" />
</packages>
</configuration>