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
|
|
@ -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
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue