Clean up: Bugs, LINQ, constructors, default values, and null checks (#18)

This commit is contained in:
Kamron Batman 2019-03-11 14:29:59 -07:00 • committed by GitHub
parent e748af4430
commit 513e54f70e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
1094 changed files with 15913 additions and 21892 deletions

View file

@ -15,7 +15,7 @@ namespace Server.Spells.Chivalry
9002
);
public RemoveCurseSpell(Mobile caster, Item scroll) : base(caster, scroll, m_Info)
public RemoveCurseSpell(Mobile caster, Item scroll = null) : base(caster, scroll, m_Info)
{
}
@ -77,15 +77,15 @@ namespace Server.Spells.Chivalry
0x100);
StatMod mod = m.GetStatMod("[Magic] Str Offset");
if (mod != null && mod.Offset < 0)
if (mod?.Offset < 0)
m.RemoveStatMod("[Magic] Str Offset");
mod = m.GetStatMod("[Magic] Dex Offset");
if (mod != null && mod.Offset < 0)
if (mod?.Offset < 0)
m.RemoveStatMod("[Magic] Dex Offset");
mod = m.GetStatMod("[Magic] Int Offset");
if (mod != null && mod.Offset < 0)
if (mod?.Offset < 0)
m.RemoveStatMod("[Magic] Int Offset");
m.Paralyzed = false;
@ -138,4 +138,4 @@ namespace Server.Spells.Chivalry
}
}
}
}
}