Cleanup & Fixes for .NET 5 (#309)

- [X] Fixes several bugs
- [X] Updates more ordinal issues
- [X] Cleans up the code a bit
- [X] Turns classes static that should have been
- [X] Changes TcpServer.Instances to a HashSet

Bumps release version
This commit is contained in:
Kamron Batman 2020-11-15 10:03:50 -08:00 • committed by GitHub
parent 4ad8811df2
commit 525cda5413
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
266 changed files with 1348 additions and 1800 deletions

View file

@ -1,10 +1,11 @@
using System;
using System.Collections.Generic;
using System.IO;
using Server.Items;
namespace Server.Commands
{
public class SignParser
public static class SignParser
{
private static readonly Queue<Item> m_ToDelete = new Queue<Item>();
@ -13,8 +14,7 @@ namespace Server.Commands
CommandSystem.Register("SignGen", AccessLevel.Administrator, SignGen_OnCommand);
}
[Usage("SignGen")]
[Description("Generates world/shop signs on all facets.")]
[Usage("SignGen"), Description("Generates world/shop signs on all facets.")]
public static void SignGen_OnCommand(CommandEventArgs c)
{
Parse(c.Mobile);
@ -108,14 +108,13 @@ namespace Server.Commands
Item sign;
if (name.StartsWith("#"))
if (name.StartsWith("#", StringComparison.Ordinal))
{
sign = new LocalizedSign(itemID, Utility.ToInt32(name.Substring(1)));
}
else
{
sign = new Sign(itemID);
sign.Name = name;
sign = new Sign(itemID) { Name = name };
}
if (map == Map.Malas)