C# 9 Cleanup (#325)

- [X] Removes EventArgs - not needed
- [X] Merges sequential checks
- [X] Removes redundant type declarations
This commit is contained in:
Kamron Batman 2020-11-27 00:29:21 -08:00 • committed by GitHub
parent 351611a23a
commit 3551d962f7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
417 changed files with 2209 additions and 2213 deletions

View file

@ -12,7 +12,7 @@ namespace Server.SkillHandlers
{
public static class AnimalTaming
{
private static readonly HashSet<Mobile> m_BeingTamed = new HashSet<Mobile>();
private static readonly HashSet<Mobile> m_BeingTamed = new();
public static bool DisableMessage { get; set; }

View file

@ -8,7 +8,7 @@ namespace Server.SkillHandlers
{
public static class Discordance
{
private static readonly Dictionary<Mobile, DiscordanceInfo> m_Table = new Dictionary<Mobile, DiscordanceInfo>();
private static readonly Dictionary<Mobile, DiscordanceInfo> m_Table = new();
public static void Initialize()
{

View file

@ -8,7 +8,7 @@ namespace Server.SkillHandlers
{
public static class Inscribe
{
private static readonly Dictionary<BaseBook, Mobile> m_UseTable = new Dictionary<BaseBook, Mobile>();
private static readonly Dictionary<BaseBook, Mobile> m_UseTable = new();
public static void Initialize()
{

View file

@ -79,7 +79,7 @@ namespace Server.SkillHandlers
private class SpiritSpeakSpell : Spell
{
private static readonly SpellInfo m_Info = new SpellInfo("Spirit Speak", "", 269);
private static readonly SpellInfo m_Info = new("Spirit Speak", "", 269);
public SpiritSpeakSpell(Mobile caster) : base(caster, null, m_Info)
{

View file

@ -421,7 +421,7 @@ namespace Server.SkillHandlers
{
public static readonly TimeSpan StealTime = TimeSpan.FromMinutes(2.0);
private static readonly Queue<StolenItem> m_Queue = new Queue<StolenItem>();
private static readonly Queue<StolenItem> m_Queue = new();
public StolenItem(Item stolen, Mobile thief, Mobile victim)
{

View file

@ -11,7 +11,7 @@ namespace Server.SkillHandlers
{
public static class Tracking
{
private static readonly Dictionary<Mobile, TrackingInfo> m_Table = new Dictionary<Mobile, TrackingInfo>();
private static readonly Dictionary<Mobile, TrackingInfo> m_Table = new();
public static void Configure()
{