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

@ -39,8 +39,7 @@ namespace Server.Engines.Help
string playerAccount = player.Account is Account ? player.Account.Username : "???";
AddHtml(10, 10, 280, 20,
$"<basefont color=#A0A0FF><center>SPEECH LOG - {playerName} (<i>{Utility.FixHtml(playerAccount)}</i>)</center></basefont>",
false, false);
$"<basefont color=#A0A0FF><center>SPEECH LOG - {playerName} (<i>{Utility.FixHtml(playerAccount)}</i>)</center></basefont>");
int lastPage = (log.Count - 1) / MaxEntriesPerPage;
@ -80,12 +79,12 @@ namespace Server.Engines.Help
AddHtml(10, 40, 280, 350, sLog, false, true);
if (page > 0)
AddButton(10, 395, 0xFAE, 0xFB0, 1, GumpButtonType.Reply, 0); // Previous page
AddButton(10, 395, 0xFAE, 0xFB0, 1); // Previous page
AddLabel(45, 395, 0x481, $"Current page: {page + 1}/{lastPage + 1}");
if (page < lastPage)
AddButton(261, 395, 0xFA5, 0xFA7, 2, GumpButtonType.Reply, 0); // Next page
AddButton(261, 395, 0xFA5, 0xFA7, 2); // Next page
}
public override void OnResponse(NetState sender, RelayInfo info)
@ -111,4 +110,4 @@ namespace Server.Engines.Help
}
}
}
}
}