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

@ -133,13 +133,13 @@ namespace Server.Engines.Quests.Haven
public override void OnLocationChange(Point3D oldLoc)
{
if (m_Lantern != null && !m_Lantern.Deleted)
if (m_Lantern?.Deleted == false)
m_Lantern.Location = new Point3D(X, Y + 1, Z);
}
public override void OnMapChange()
{
if (m_Lantern != null && !m_Lantern.Deleted)
if (m_Lantern?.Deleted == false)
m_Lantern.Map = Map;
}
@ -147,13 +147,13 @@ namespace Server.Engines.Quests.Haven
{
base.OnAfterDelete();
if (m_Lantern != null && !m_Lantern.Deleted)
if (m_Lantern?.Deleted == false)
m_Lantern.Delete();
}
public override void Serialize(GenericWriter writer)
{
if (m_Lantern != null && m_Lantern.Deleted)
if (m_Lantern?.Deleted == true)
m_Lantern = null;
base.Serialize(writer);
@ -172,4 +172,4 @@ namespace Server.Engines.Quests.Haven
m_Lantern = (Lantern)reader.ReadItem();
}
}
}
}