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

@ -12,13 +12,13 @@ namespace Server.Gumps
protected override void Design()
{
AddHtmlLocalized(20, 10, 400, 35, 1013075, false, false); // Accept or Refuse candidates for membership
AddHtmlLocalized(20, 10, 400, 35, 1013075); // Accept or Refuse candidates for membership
AddButton(20, 400, 4005, 4007, 1, GumpButtonType.Reply, 0);
AddHtmlLocalized(55, 400, 245, 30, 1013076, false, false); // Accept
AddButton(20, 400, 4005, 4007, 1);
AddHtmlLocalized(55, 400, 245, 30, 1013076); // Accept
AddButton(300, 400, 4005, 4007, 2, GumpButtonType.Reply, 0);
AddHtmlLocalized(335, 400, 100, 35, 1013077, false, false); // Refuse
AddButton(300, 400, 4005, 4007, 2);
AddHtmlLocalized(335, 400, 100, 35, 1013077); // Refuse
}
public override void OnResponse(NetState state, RelayInfo info)
@ -47,7 +47,7 @@ namespace Server.Gumps
{
Mobile m = m_List[index];
if (m != null && !m.Deleted)
if (m?.Deleted == false)
{
#region Factions
@ -72,7 +72,7 @@ namespace Server.Gumps
break;
}
if (targetState != null && targetState.IsLeaving)
if (targetState?.IsLeaving == true)
{
// OSI does this quite strangely, so we'll just do it this way
m_Mobile.SendMessage(
@ -109,7 +109,7 @@ namespace Server.Gumps
{
Mobile m = m_List[index];
if (m != null && !m.Deleted)
if (m?.Deleted == false)
{
m_Guild.Candidates.Remove(m);
@ -128,4 +128,4 @@ namespace Server.Gumps
}
}
}
}
}