Clean up: Bugs, LINQ, constructors, default values, and null checks (#18)

This commit is contained in:
Kamron Batman 2019-03-11 14:29:59 -07:00 • committed by GitHub
parent e748af4430
commit 513e54f70e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
1094 changed files with 15913 additions and 21892 deletions

View file

@ -29,7 +29,7 @@ namespace Server.Items
{
get
{
if (m_House != null && m_House.Deleted)
if (m_House?.Deleted == true)
House = null;
return m_House;
@ -90,7 +90,7 @@ namespace Server.Items
{
base.Serialize(writer);
if (m_House != null && !m_House.Deleted)
if (m_House?.Deleted == false)
{
writer.Write(1); // version
@ -184,7 +184,7 @@ namespace Server.Items
Map map = m_House.Map;
if (map != null && !map.CanFit(x, y, z, 16, false, false))
if (map?.CanFit(x, y, z, 16, false, false) == false)
z = map.GetAverageZ(x, y);
Target = new Point3D(x, y, z);
@ -305,4 +305,4 @@ namespace Server.Items
}
}
}
}
}