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,5 +1,4 @@
using System.Collections.Generic;
using System.Globalization;
using Server.Commands.Generic;
using Server.Items;
using Server.Targeting;
@ -43,9 +42,7 @@ namespace Server.Commands
graphics = new List<int>();
foreach (var arg in e.Arguments)
{
var numberStyles = arg.ToLower().StartsWith("0x") ? NumberStyles.HexNumber : NumberStyles.Integer;
if (int.TryParse(arg, numberStyles, CultureInfo.InvariantCulture, out var result))
if (Utility.ToInt32(arg, out var result))
{
graphics.Add(result);
}