Adds style cop (#109)

This commit is contained in:
Kamron Batman 2020-04-26 00:16:02 -07:00 committed by GitHub
parent 3e715bcb60
commit 556a17aba8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
1725 changed files with 33831 additions and 38046 deletions

View file

@ -8,14 +8,13 @@ namespace Server.Spells.Fourth
{
public class ArchCureSpell : MagerySpell, ISpellTargetingPoint3D
{
private static SpellInfo m_Info = new SpellInfo(
private static readonly SpellInfo m_Info = new SpellInfo(
"Arch Cure", "Vas An Nox",
215,
9061,
Reagent.Garlic,
Reagent.Ginseng,
Reagent.MandrakeRoot
);
Reagent.MandrakeRoot);
public ArchCureSpell(Mobile caster, Item scroll = null) : base(caster, scroll, m_Info)
{

View file

@ -9,17 +9,16 @@ namespace Server.Spells.Fourth
{
public class ArchProtectionSpell : MagerySpell, ISpellTargetingPoint3D
{
private static SpellInfo m_Info = new SpellInfo(
private static readonly SpellInfo m_Info = new SpellInfo(
"Arch Protection", "Vas Uus Sanct",
Core.AOS ? 239 : 215,
9011,
Reagent.Garlic,
Reagent.Ginseng,
Reagent.MandrakeRoot,
Reagent.SulfurousAsh
);
Reagent.SulfurousAsh);
private static Dictionary<Mobile, int> _Table = new Dictionary<Mobile, int>();
private static readonly Dictionary<Mobile, int> _Table = new Dictionary<Mobile, int>();
public ArchProtectionSpell(Mobile caster, Item scroll = null) : base(caster, scroll, m_Info)
{
@ -108,7 +107,7 @@ namespace Server.Spells.Fourth
private class InternalTimer : Timer
{
private Mobile m_Owner;
private readonly Mobile m_Owner;
public InternalTimer(Mobile target, Mobile caster) : base(TimeSpan.FromSeconds(0))
{

View file

@ -6,16 +6,15 @@ namespace Server.Spells.Fourth
{
public class CurseSpell : MagerySpell, ISpellTargetingMobile
{
private static SpellInfo m_Info = new SpellInfo(
private static readonly SpellInfo m_Info = new SpellInfo(
"Curse", "Des Sanct",
227,
9031,
Reagent.Nightshade,
Reagent.Garlic,
Reagent.SulfurousAsh
);
Reagent.SulfurousAsh);
private static HashSet<Mobile> m_UnderEffect = new HashSet<Mobile>();
private static readonly HashSet<Mobile> m_UnderEffect = new HashSet<Mobile>();
public CurseSpell(Mobile caster, Item scroll = null) : base(caster, scroll, m_Info)
{
@ -56,8 +55,7 @@ namespace Server.Spells.Fourth
SpellHelper.AddStatCurse(Caster, m, StatType.Int);
SpellHelper.DisableSkillCheck = false;
if (Caster.Player && m.Player /*&& Caster != m */ && !UnderEffect(m)
) //On OSI you CAN curse yourself and get this effect.
if (Caster.Player && m.Player /*&& Caster != m */ && !UnderEffect(m)) // On OSI you CAN curse yourself and get this effect.
{
TimeSpan duration = SpellHelper.GetDuration(Caster, m);
m_UnderEffect.Add(m);

View file

@ -9,15 +9,14 @@ namespace Server.Spells.Fourth
{
public class FireFieldSpell : MagerySpell, ISpellTargetingPoint3D
{
private static SpellInfo m_Info = new SpellInfo(
private static readonly SpellInfo m_Info = new SpellInfo(
"Fire Field", "In Flam Grav",
215,
9041,
false,
Reagent.BlackPearl,
Reagent.SpidersSilk,
Reagent.SulfurousAsh
);
Reagent.SulfurousAsh);
public FireFieldSpell(Mobile caster, Item scroll = null) : base(caster, scroll, m_Info)
{
@ -142,25 +141,25 @@ namespace Server.Spells.Fourth
switch (version)
{
case 2:
{
m_Damage = reader.ReadInt();
goto case 1;
}
{
m_Damage = reader.ReadInt();
goto case 1;
}
case 1:
{
m_Caster = reader.ReadMobile();
{
m_Caster = reader.ReadMobile();
goto case 0;
}
goto case 0;
}
case 0:
{
m_End = reader.ReadDeltaTime();
{
m_End = reader.ReadDeltaTime();
m_Timer = new InternalTimer(this, TimeSpan.Zero, true, true);
m_Timer.Start();
m_Timer = new InternalTimer(this, TimeSpan.Zero, true, true);
m_Timer.Start();
break;
}
break;
}
}
if (version < 2)
@ -197,9 +196,10 @@ namespace Server.Spells.Fourth
private class InternalTimer : Timer
{
private static Queue m_Queue = new Queue();
private bool m_InLOS, m_CanFit;
private FireFieldItem m_Item;
private static readonly Queue m_Queue = new Queue();
private readonly bool m_InLOS;
private readonly bool m_CanFit;
private readonly FireFieldItem m_Item;
public InternalTimer(FireFieldItem item, TimeSpan delay, bool inLOS, bool canFit) : base(delay,
TimeSpan.FromSeconds(1.0))

View file

@ -8,15 +8,14 @@ namespace Server.Spells.Fourth
{
public class GreaterHealSpell : MagerySpell, ISpellTargetingMobile
{
private static SpellInfo m_Info = new SpellInfo(
private static readonly SpellInfo m_Info = new SpellInfo(
"Greater Heal", "In Vas Mani",
204,
9061,
Reagent.Garlic,
Reagent.Ginseng,
Reagent.MandrakeRoot,
Reagent.SpidersSilk
);
Reagent.SpidersSilk);
public GreaterHealSpell(Mobile caster, Item scroll = null) : base(caster, scroll, m_Info)
{
@ -72,7 +71,7 @@ namespace Server.Spells.Fourth
int toHeal = (int)(Caster.Skills.Magery.Value * 0.4);
toHeal += Utility.Random(1, 10);
//m.Heal( toHeal, Caster );
// m.Heal( toHeal, Caster );
SpellHelper.Heal(toHeal, m, Caster);
m.FixedParticles(0x376A, 9, 32, 5030, EffectLayer.Waist);

View file

@ -4,13 +4,12 @@ namespace Server.Spells.Fourth
{
public class LightningSpell : MagerySpell, ISpellTargetingMobile
{
private static SpellInfo m_Info = new SpellInfo(
private static readonly SpellInfo m_Info = new SpellInfo(
"Lightning", "Por Ort Grav",
239,
9021,
Reagent.MandrakeRoot,
Reagent.SulfurousAsh
);
Reagent.SulfurousAsh);
public LightningSpell(Mobile caster, Item scroll = null) : base(caster, scroll, m_Info)
{

View file

@ -6,16 +6,15 @@ namespace Server.Spells.Fourth
{
public class ManaDrainSpell : MagerySpell, ISpellTargetingMobile
{
private static SpellInfo m_Info = new SpellInfo(
private static readonly SpellInfo m_Info = new SpellInfo(
"Mana Drain", "Ort Rel",
215,
9031,
Reagent.BlackPearl,
Reagent.MandrakeRoot,
Reagent.SpidersSilk
);
Reagent.SpidersSilk);
private static HashSet<Mobile> m_Table = new HashSet<Mobile>();
private static readonly HashSet<Mobile> m_Table = new HashSet<Mobile>();
public ManaDrainSpell(Mobile caster, Item scroll = null) : base(caster, scroll, m_Info)
{

View file

@ -8,21 +8,19 @@ namespace Server.Spells.Fourth
{
public class RecallSpell : MagerySpell, IRecallSpell
{
private static SpellInfo m_Info = new SpellInfo(
private static readonly SpellInfo m_Info = new SpellInfo(
"Recall", "Kal Ort Por",
239,
9031,
Reagent.BlackPearl,
Reagent.Bloodmoss,
Reagent.MandrakeRoot
);
Reagent.MandrakeRoot);
private Runebook m_Book;
private readonly Runebook m_Book;
private RunebookEntry m_Entry;
private readonly RunebookEntry m_Entry;
public RecallSpell(Mobile caster, RunebookEntry entry = null, Runebook book = null, Item scroll = null) :
base(caster, scroll, m_Info)
public RecallSpell(Mobile caster, RunebookEntry entry = null, Runebook book = null, Item scroll = null) : base(caster, scroll, m_Info)
{
m_Entry = entry;
m_Book = book;
@ -34,7 +32,7 @@ namespace Server.Spells.Fourth
{
if (TransformationSpellHelper.UnderTransformation(Caster, typeof(WraithFormSpell)))
min = max = 0;
else if (Core.SE && m_Book != null) //recall using Runebook charge
else if (Core.SE && m_Book != null) // recall using Runebook charge
min = max = 0;
else
base.GetCastSkills(out min, out max);
@ -83,7 +81,7 @@ namespace Server.Spells.Fourth
{
Caster.SendLocalizedMessage(1061632); // You can't do that while carrying the sigil.
}
else if (map == null || !Core.AOS && Caster.Map != map)
else if (map == null || (!Core.AOS && Caster.Map != map))
{
Caster.SendLocalizedMessage(1005569); // You can not recall to another facet.
}