Clean up: Bugs, LINQ, constructors, default values, and null checks (#18)
This commit is contained in:
parent
e748af4430
commit
513e54f70e
1094 changed files with 15913 additions and 21892 deletions
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue