cleanup: Fixes bugs and cleans up code (#660)

This commit is contained in:
Kamron Batman 2021-07-19 20:49:59 -07:00 • committed by GitHub
parent 1de0b656a9
commit 679e8100f4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
99 changed files with 160 additions and 346 deletions

View file

@ -34,7 +34,7 @@ namespace Server.Commands
public CAGCategory Parent { get; set; }
public override string Title => Type == null ? "bad type" : Type.Name;
public override string Title => Type?.Name ?? "bad type";
public override void OnClick(Mobile from, int page)
{

View file

@ -1,5 +1,4 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using Server.Engines.Quests.Haven;
@ -73,7 +72,7 @@ namespace Server.Commands
private static readonly Type typeofCannon = typeof(Cannon);
private static readonly Type typeofSerpentPillar = typeof(SerpentPillar);
private static readonly Queue m_DeleteQueue = new();
private static readonly Queue<Item> m_DeleteQueue = new();
private static readonly string[] m_EmptyParams = Array.Empty<string>();
private List<DecorationEntryMag> m_Entries;
@ -1143,7 +1142,7 @@ namespace Server.Commands
while (m_DeleteQueue.Count > 0)
{
((Item)m_DeleteQueue.Dequeue())?.Delete();
m_DeleteQueue.Dequeue()?.Delete();
}
return res;