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

@ -41,7 +41,7 @@ namespace Server.Mobiles
{
base.OnDeath( c );
if ( Utility.RandomDouble() < 0.3 )
if (Utility.RandomDouble() < 0.3)
c.DropItem( new GnawsFang() );
}
*/
@ -77,4 +77,4 @@ namespace Server.Mobiles
int version = reader.ReadInt();
}
}
}
}

View file

@ -42,10 +42,10 @@ namespace Server.Mobiles
{
base.OnDeath( c );
if ( Utility.RandomDouble() < 0.25 )
if (Utility.RandomDouble() < 0.25)
c.DropItem( new IrksBrain() );
if ( Utility.RandomDouble() < 0.025 )
if (Utility.RandomDouble() < 0.025)
c.DropItem( new PaladinGloves() );
}
*/
@ -82,4 +82,4 @@ namespace Server.Mobiles
int version = reader.ReadInt();
}
}
}
}

View file

@ -52,13 +52,13 @@ namespace Server.Mobiles
{
base.OnDeath( c );
if ( Utility.RandomDouble() < 0.025 )
if (Utility.RandomDouble() < 0.025)
c.DropItem( new GreymistChest() );
if ( Utility.RandomDouble() < 0.45 )
if (Utility.RandomDouble() < 0.45)
c.DropItem( new LissithsSilk() );
if ( Utility.RandomDouble() < 0.1 )
if (Utility.RandomDouble() < 0.1)
c.DropItem( new ParrotItem() );
}
*/
@ -86,4 +86,4 @@ namespace Server.Mobiles
int version = reader.ReadInt();
}
}
}
}

View file

@ -52,10 +52,10 @@ namespace Server.Mobiles
{
base.OnDeath( c );
if ( Utility.RandomDouble() < 0.2 )
if (Utility.RandomDouble() < 0.2)
c.DropItem( new SabrixsEye() );
if ( Utility.RandomDouble() < 0.25 )
if (Utility.RandomDouble() < 0.25)
{
switch ( Utility.Random( 2 ) )
{
@ -64,7 +64,7 @@ namespace Server.Mobiles
}
}
if ( Utility.RandomDouble() < 0.1 )
if (Utility.RandomDouble() < 0.1)
c.DropItem( new ParrotItem() );
}
*/
@ -92,4 +92,4 @@ namespace Server.Mobiles
int version = reader.ReadInt();
}
}
}
}

View file

@ -41,7 +41,7 @@ namespace Server.Mobiles
/*
// TODO: uncomment once added
if ( Utility.RandomDouble() < 0.1 )
if (Utility.RandomDouble() < 0.1)
PackItem( new ParrotItem() );
*/
}
@ -77,4 +77,4 @@ namespace Server.Mobiles
int version = reader.ReadInt();
}
}
}
}

View file

@ -5,7 +5,7 @@ namespace Server.Mobiles
{
public class Swoop : Eagle
{
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 Swoop()
@ -48,13 +48,13 @@ namespace Server.Mobiles
{
base.OnDeath( c );
if ( Utility.RandomDouble() < 0.025 )
if (Utility.RandomDouble() < 0.025)
{
switch ( Utility.Random( 18 ) )
{
case 0: c.DropItem( new AssassinChest() ); break;
case 1: c.DropItem( new AssassinArms() ); break;
case 2: c.DropItem( new DeathChest() ); break;
case 2: c.DropItem( new DeathChest() ); break;
case 3: c.DropItem( new MyrmidonArms() ); break;
case 4: c.DropItem( new MyrmidonLegs() ); break;
case 5: c.DropItem( new MyrmidonGorget() ); break;
@ -73,7 +73,7 @@ namespace Server.Mobiles
}
}
if ( Utility.RandomDouble() < 0.1 )
if (Utility.RandomDouble() < 0.1)
c.DropItem( new ParrotItem() );
}
*/
@ -100,7 +100,7 @@ namespace Server.Mobiles
{
base.OnGaveMeleeAttack(defender);
if (0.1 <= Utility.RandomDouble())
if (Utility.RandomDouble() >= 0.1)
return;
if (m_Table.TryGetValue(defender, out ExpireTimer timer))
@ -142,8 +142,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)

View file

@ -54,7 +54,7 @@ namespace Server.Mobiles
{
base.OnDeath( c );
if ( Utility.RandomDouble() < 0.025 )
if (Utility.RandomDouble() < 0.025)
{
switch ( Utility.Random( 2 ) )
{
@ -63,7 +63,7 @@ namespace Server.Mobiles
}
}
if ( Utility.RandomDouble() < 0.1 )
if (Utility.RandomDouble() < 0.1)
c.DropItem( new ParrotItem() );
}
*/
@ -91,4 +91,4 @@ namespace Server.Mobiles
int version = reader.ReadInt();
}
}
}
}