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

@ -23,7 +23,7 @@ namespace Server.Items
public virtual void Flip(Mobile from, Item addon)
{
if (Directions != null && Directions.Length > 1)
if (Directions?.Length > 1)
try
{
MethodInfo flipMethod = addon.GetType().GetMethod(m_MethodName, m_Params);
@ -44,7 +44,7 @@ namespace Server.Items
ClearComponents(addon);
flipMethod.Invoke(addon, new object[2] { from, Directions[index] });
flipMethod.Invoke(addon, new object[] { from, Directions[index] });
BaseHouse house = null;
AddonFitResult result = AddonFitResult.Valid;
@ -86,6 +86,7 @@ namespace Server.Items
}
catch
{
// ignored
}
}
@ -113,4 +114,4 @@ namespace Server.Items
}
}
}
}
}