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

@ -6,7 +6,7 @@ namespace Server.Spells.Chivalry
{
public class CleanseByFireSpell : PaladinSpell, ISpellTargetingMobile
{
private static readonly SpellInfo m_Info = new SpellInfo(
private static readonly SpellInfo m_Info = new(
"Cleanse By Fire",
"Expor Flamus",
-1,

View file

@ -9,7 +9,7 @@ namespace Server.Spells.Chivalry
{
public class CloseWoundsSpell : PaladinSpell, ISpellTargetingMobile
{
private static readonly SpellInfo m_Info = new SpellInfo(
private static readonly SpellInfo m_Info = new(
"Close Wounds",
"Obsu Vulni",
-1,

View file

@ -6,14 +6,14 @@ namespace Server.Spells.Chivalry
{
public class ConsecrateWeaponSpell : PaladinSpell
{
private static readonly SpellInfo m_Info = new SpellInfo(
private static readonly SpellInfo m_Info = new(
"Consecrate Weapon",
"Consecrus Arma",
-1,
9002
);
private static readonly Dictionary<BaseWeapon, ExpireTimer> m_Table = new Dictionary<BaseWeapon, ExpireTimer>();
private static readonly Dictionary<BaseWeapon, ExpireTimer> m_Table = new();
public ConsecrateWeaponSpell(Mobile caster, Item scroll = null) : base(caster, scroll, m_Info)
{

View file

@ -8,7 +8,7 @@ namespace Server.Spells.Chivalry
{
public class DispelEvilSpell : PaladinSpell
{
private static readonly SpellInfo m_Info = new SpellInfo(
private static readonly SpellInfo m_Info = new(
"Dispel Evil",
"Dispiro Malas",
-1,

View file

@ -5,14 +5,14 @@ namespace Server.Spells.Chivalry
{
public class DivineFurySpell : PaladinSpell
{
private static readonly SpellInfo m_Info = new SpellInfo(
private static readonly SpellInfo m_Info = new(
"Divine Fury",
"Divinum Furis",
-1,
9002
);
private static readonly Dictionary<Mobile, Timer> m_Table = new Dictionary<Mobile, Timer>();
private static readonly Dictionary<Mobile, Timer> m_Table = new();
public DivineFurySpell(Mobile caster, Item scroll = null) : base(caster, scroll, m_Info)
{

View file

@ -6,14 +6,14 @@ namespace Server.Spells.Chivalry
{
public class EnemyOfOneSpell : PaladinSpell
{
private static readonly SpellInfo m_Info = new SpellInfo(
private static readonly SpellInfo m_Info = new(
"Enemy of One",
"Forul Solum",
-1,
9002
);
private static readonly Dictionary<Mobile, Timer> m_Table = new Dictionary<Mobile, Timer>();
private static readonly Dictionary<Mobile, Timer> m_Table = new();
public EnemyOfOneSpell(Mobile caster, Item scroll = null) : base(caster, scroll, m_Info)
{

View file

@ -6,7 +6,7 @@ namespace Server.Spells.Chivalry
{
public class HolyLightSpell : PaladinSpell
{
private static readonly SpellInfo m_Info = new SpellInfo(
private static readonly SpellInfo m_Info = new(
"Holy Light",
"Augus Luminos",
-1,

View file

@ -8,7 +8,7 @@ namespace Server.Spells.Chivalry
{
public class NobleSacrificeSpell : PaladinSpell
{
private static readonly SpellInfo m_Info = new SpellInfo(
private static readonly SpellInfo m_Info = new(
"Noble Sacrifice",
"Dium Prostra",
-1,

View file

@ -9,7 +9,7 @@ namespace Server.Spells.Chivalry
{
public class RemoveCurseSpell : PaladinSpell, ISpellTargetingMobile
{
private static readonly SpellInfo m_Info = new SpellInfo(
private static readonly SpellInfo m_Info = new(
"Remove Curse",
"Extermo Vomica",
-1,

View file

@ -8,7 +8,7 @@ namespace Server.Spells.Chivalry
{
public class SacredJourneySpell : PaladinSpell, IRecallSpell
{
private static readonly SpellInfo m_Info = new SpellInfo(
private static readonly SpellInfo m_Info = new(
"Sacred Journey",
"Sanctum Viatas",
-1,
@ -79,7 +79,7 @@ namespace Server.Spells.Chivalry
{
Caster.SendLocalizedMessage(501942); // That location is blocked.
}
else if (m_Book != null && m_Book.CurCharges <= 0)
else if (m_Book?.CurCharges <= 0)
{
Caster.SendLocalizedMessage(502412); // There are no charges left on that item.
}