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

@ -181,8 +181,7 @@ namespace Server.Items
[CommandProperty(AccessLevel.GameMaster)]
public Point3D Offset { get; set; }
[Hue]
[CommandProperty(AccessLevel.GameMaster)]
[Hue, CommandProperty(AccessLevel.GameMaster)]
public override int Hue
{
get => base.Hue;

View file

@ -26,8 +26,7 @@ namespace Server.Items
[CommandProperty(AccessLevel.GameMaster)]
public Point3D Offset { get; set; }
[Hue]
[CommandProperty(AccessLevel.GameMaster)]
[Hue, CommandProperty(AccessLevel.GameMaster)]
public override int Hue
{
get => base.Hue;

View file

@ -78,10 +78,7 @@ namespace Server.Items
private ScoreEntry GetEntryFor(Mobile from)
{
if (m_Entries == null)
{
m_Entries = new Dictionary<Mobile, ScoreEntry>();
}
m_Entries ??= new Dictionary<Mobile, ScoreEntry>();
if (!m_Entries.TryGetValue(from, out var e))
{

View file

@ -44,8 +44,7 @@ namespace Server.Items
public virtual bool ShareHue => true;
[Hue]
[CommandProperty(AccessLevel.GameMaster)]
[Hue, CommandProperty(AccessLevel.GameMaster)]
public override int Hue
{
get => base.Hue;

View file

@ -20,8 +20,7 @@ namespace Server.Items
public override bool DisplayWeight => false;
[Hue]
[CommandProperty(AccessLevel.GameMaster)]
[Hue, CommandProperty(AccessLevel.GameMaster)]
public override int Hue
{
get => base.Hue;
@ -33,8 +32,6 @@ namespace Server.Items
if (!Deleted && ShareHue && Components != null)
{
Hue = value;
foreach (var c in Components)
{
c.Hue = value;

View file

@ -140,14 +140,9 @@ namespace Server.Items
{
var components = Components;
var stageTable = m_StageTable;
for (var i = 0; i < components.Count; ++i)
{
if (!(components[i] is AddonComponent component))
{
continue;
}
var component = components[i];
var itemTable = FindItemTable(component.ItemID);

View file

@ -129,14 +129,9 @@ namespace Server.Items
{
var components = Components;
var stageTable = m_StageTable;
for (var i = 0; i < components.Count; ++i)
{
if (!(components[i] is AddonComponent component))
{
continue;
}
var component = components[i];
var itemTable = FindItemTable(component.ItemID);

View file

@ -187,8 +187,7 @@ namespace Server.Items
CommandSystem.Register("SHTelGen", AccessLevel.Administrator, SHTelGen_OnCommand);
}
[Usage("SHTelGen")]
[Description("Generates solen hives teleporters.")]
[Usage("SHTelGen"), Description("Generates solen hives teleporters.")]
public static void SHTelGen_OnCommand(CommandEventArgs e)
{
World.Broadcast(0x35, true, "Solen hives teleporters are being generated, please wait.");