Code cleanup (#195)

This commit is contained in:
Kamron Batman 2020-08-16 21:46:54 -07:00 • committed by GitHub
parent b476bcfd24
commit 0926b5abaa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
86 changed files with 740 additions and 1635 deletions

View file

@ -25,19 +25,11 @@ namespace Server.Gumps
if (leader != null)
{
string leadTitle;
string leadTitle = leader.GuildTitle?.Trim();
string leadName = leader.Name?.Trim().IsNullOrDefault("(empty)");
string text = leadTitle?.Length > 0 ? $"{leadTitle}: {leadName}" : leadName;
if ((leadTitle = leader.GuildTitle) != null && (leadTitle = leadTitle.Trim()).Length > 0)
leadTitle += ": ";
else
leadTitle = "";
string leadName;
if ((leadName = leader.Name) == null || (leadName = leadName.Trim()).Length <= 0)
leadName = "(empty)";
AddHtml(220, 15, 250, 35, leadTitle + leadName);
AddHtml(220, 15, 250, 35, text);
}
AddButton(20, 50, 4005, 4007, 1);
@ -50,9 +42,7 @@ namespace Server.Gumps
fealty ??= beholder;
string fealtyName = fealty.Name?.Trim();
if (string.IsNullOrWhiteSpace(fealtyName))
fealtyName = "(empty)";
string fealtyName = fealty.Name?.Trim().IsNullOrDefault("(empty)");
if (beholder == fealty)
AddHtmlLocalized(55, 70, 470, 20, 1018002); // yourself

View file

@ -78,7 +78,7 @@ namespace Server.Guilds
{
base.OnResponse(sender, info);
PlayerMobile pm = sender.Mobile as PlayerMobile;
PlayerMobile pm = (PlayerMobile)sender.Mobile;
if (!IsMember(pm, guild))
return;