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

@ -12,13 +12,12 @@ namespace Server.Spells.Necromancy
{
public class ExorcismSpell : NecromancerSpell
{
private static SpellInfo m_Info = new SpellInfo(
private static readonly SpellInfo m_Info = new SpellInfo(
"Exorcism", "Ort Corp Grav",
203,
9031,
Reagent.NoxCrystal,
Reagent.GraveDust
);
Reagent.GraveDust);
private static readonly int Range = Core.ML ? 48 : 18;
@ -67,7 +66,6 @@ namespace Server.Spells.Necromancy
public override double RequiredSkill => 80.0;
public override int RequiredMana => 40;
public override bool DelayedDamage => false;
public override bool CheckCast()
@ -99,7 +97,7 @@ namespace Server.Spells.Necromancy
IEnumerable<Mobile> targets = r.ChampionSpawn.GetMobilesInRange(Range).Where(IsValidTarget);
foreach (Mobile m in targets)
//Surprisingly, no sparkle type effects
// Surprisingly, no sparkle type effects
m.Location = GetNearestShrine(m);
}
}
@ -118,12 +116,12 @@ namespace Server.Spells.Necromancy
if (c?.Deleted == false && map != null && c.Map == map)
{
if (SpellHelper.IsAnyT2A(map, c.Location) && SpellHelper.IsAnyT2A(map, m.Location))
return false; //Same Map, both in T2A, ie, same 'sub server'.
return false; // Same Map, both in T2A, ie, same 'sub server'.
if (m.Region.IsPartOf<DungeonRegion>() == Region.Find(c.Location, map).IsPartOf<DungeonRegion>())
return false; //Same Map, both in Dungeon region OR They're both NOT in a dungeon region.
return false; // Same Map, both in Dungeon region OR They're both NOT in a dungeon region.
//Just an approximation cause RunUO doesn't divide up the world the same way OSI does ;p
// Just an approximation cause RunUO doesn't divide up the world the same way OSI does ;p
}
if (Party.Get(m)?.Contains(Caster) == true)
@ -143,7 +141,7 @@ namespace Server.Spells.Necromancy
Faction f = Faction.Find(m);
return Faction.Facet != m.Map || f == null || f != Faction.Find(Caster);
return m.Map != Faction.Facet || f == null || f != Faction.Find(Caster);
}
private static Point3D GetNearestShrine(Mobile m)
@ -152,7 +150,6 @@ namespace Server.Spells.Necromancy
Point3D[] locList;
if (map == Map.Felucca || map == Map.Trammel)
locList = m_BritanniaLocs;
else if (map == Map.Ilshenar)
@ -162,7 +159,7 @@ namespace Server.Spells.Necromancy
else if (map == Map.Malas)
locList = m_MalasLocs;
else
locList = new Point3D[0];
locList = Array.Empty<Point3D>();
Point3D closest = Point3D.Zero;
double minDist = double.MaxValue;