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

@ -24,21 +24,8 @@ namespace Server.Engines.MLQuests.Items
public override bool Nontransferable => true;
public List<MLQuest> MLQuests
{
get
{
if (m_MLQuests == null)
{
m_MLQuests = MLQuestSystem.FindQuestList(GetType());
if (m_MLQuests == null)
m_MLQuests = MLQuestSystem.EmptyList;
}
return m_MLQuests;
}
}
public List<MLQuest> MLQuests => m_MLQuests ??
(m_MLQuests = MLQuestSystem.FindQuestList(GetType()) ?? MLQuestSystem.EmptyList);
public override void AddNameProperties(ObjectPropertyList list)
{
@ -101,21 +88,8 @@ namespace Server.Engines.MLQuests.Items
public override bool Nontransferable => true;
public List<MLQuest> MLQuests
{
get
{
if (m_MLQuests == null)
{
m_MLQuests = MLQuestSystem.FindQuestList(GetType());
if (m_MLQuests == null)
m_MLQuests = MLQuestSystem.EmptyList;
}
return m_MLQuests;
}
}
public List<MLQuest> MLQuests => m_MLQuests ??
(m_MLQuests = MLQuestSystem.FindQuestList(GetType()) ?? MLQuestSystem.EmptyList);
public override void HandleInvalidTransfer(Mobile from)
{
@ -163,4 +137,4 @@ namespace Server.Engines.MLQuests.Items
int version = reader.ReadInt();
}
}
}
}