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

@ -7,7 +7,7 @@ namespace Server.Mobiles
{
public class Hiryu : BaseMount
{
private static Dictionary<Mobile, ExpireTimer> m_Table = new Dictionary<Mobile, ExpireTimer>();
private static readonly Dictionary<Mobile, ExpireTimer> m_Table = new Dictionary<Mobile, ExpireTimer>();
[Constructible]
public Hiryu()
@ -73,29 +73,6 @@ namespace Server.Mobiles
{
int rand = Utility.Random(1075);
/*
1000 1075 No Hue Color 93.02% 0x0
*
10 1075 Ice Green 0.93% 0x847F
10 1075 Light Blue 0.93% 0x848D
10 1075 Strong Cyan 0.93% 0x8495
10 1075 Agapite 0.93% 0x8899
10 1075 Gold 0.93% 0x8032
*
8 1075 Blue and Yellow 0.74% 0x8487
*
5 1075 Ice Blue 0.47% 0x8482
*
3 1075 Cyan 0.28% 0x8123
3 1075 Light Green 0.28% 0x8295
*
2 1075 Strong Yellow 0.19% 0x8037
2 1075 Green 0.19% 0x8030 //this one is an approximation
*
1 1075 Strong Purple 0.09% 0x8490
1 1075 Strong Green 0.09% 0x855C
* */
if (rand <= 0)
return 0x855C;
if (rand <= 1)
@ -123,11 +100,9 @@ namespace Server.Mobiles
if (rand <= 74)
return 0x847F;
return 0;
}
public override int GetAngerSound() => 0x4FE;
public override int GetIdleSound() => 0x4FD;
@ -148,7 +123,7 @@ namespace Server.Mobiles
{
base.OnGaveMeleeAttack(defender);
if (0.1 <= Utility.RandomDouble())
if (Utility.RandomDouble() >= 0.1)
return;
/* Grasping Claw
@ -193,10 +168,10 @@ namespace Server.Mobiles
int version = reader.ReadInt();
if (version == 0)
Timer.DelayCall(TimeSpan.Zero, delegate { Hue = GetHue(); });
Timer.DelayCall(TimeSpan.Zero, () => { Hue = GetHue(); });
if (version <= 1)
Timer.DelayCall(TimeSpan.Zero, delegate
Timer.DelayCall(TimeSpan.Zero, () =>
{
if (InternalItem != null) InternalItem.Hue = Hue;
});
@ -212,8 +187,8 @@ namespace Server.Mobiles
private class ExpireTimer : Timer
{
private Mobile m_Mobile;
private ResistanceMod m_Mod;
private readonly Mobile m_Mobile;
private readonly ResistanceMod m_Mod;
public ExpireTimer(Mobile m, ResistanceMod mod, TimeSpan delay)
: base(delay)