Upgrades code style - First batch (#22)

This commit is contained in:
Kamron Batman 2018-08-14 06:16:50 +08:00 committed by GitHub
parent 8ee42c8ea2
commit 632e8b4757
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
1834 changed files with 10245 additions and 10437 deletions

View file

@ -37,8 +37,7 @@ namespace Server.SkillHandlers
public static Mobile GetUser( BaseBook book )
{
Mobile m = null;
m_UseTable.TryGetValue(book, out m);
m_UseTable.TryGetValue( book, out Mobile m );
return m;
}
@ -161,4 +160,4 @@ namespace Server.SkillHandlers
}
}
}
}
}

View file

@ -84,8 +84,8 @@ namespace Server.SkillHandlers
public override bool ClearHandsOnCast => false;
public override double CastDelayFastScalar { get { return 0; } }
public override TimeSpan CastDelayBase { get { return TimeSpan.FromSeconds( 1.0 ); } }
public override double CastDelayFastScalar => 0;
public override TimeSpan CastDelayBase => TimeSpan.FromSeconds( 1.0 );
public override int GetMana()
{

View file

@ -13,7 +13,7 @@ namespace Server.SkillHandlers
public static double HidingRequirement { get { return ( Core.ML ? 30.0 : ( Core.SE ? 50.0 : 80.0 ) ); } }
public static int[,] ArmorTable { get { return m_ArmorTable; } }
public static int[,] ArmorTable => m_ArmorTable;
private static int[,] m_ArmorTable = new int[,]
{
// Gorget Gloves Helmet Arms Legs Chest Shield
@ -110,4 +110,4 @@ namespace Server.SkillHandlers
return TimeSpan.FromSeconds( 10.0 );
}
}
}
}

View file

@ -52,8 +52,7 @@ namespace Server.SkillHandlers
public static double GetStalkingBonus( Mobile tracker, Mobile target )
{
TrackingInfo info = null;
m_Table.TryGetValue( tracker, out info );
m_Table.TryGetValue( tracker, out TrackingInfo info );
if ( info == null || info.m_Target != target || info.m_Map != target.Map )
return 0.0;
@ -179,7 +178,7 @@ namespace Server.SkillHandlers
foreach ( Mobile m in from.GetMobilesInRange( range ) )
{
// Ghosts can no longer be tracked
// Ghosts can no longer be tracked
if ( m != from && (!Core.AOS || m.Alive) && (!m.Hidden || m.AccessLevel == AccessLevel.Player || from.AccessLevel > m.AccessLevel) && check( m ) && CheckDifficulty( from, m ) )
list.Add( m );
}
@ -202,7 +201,7 @@ namespace Server.SkillHandlers
}
}
// Tracking players uses tracking and detect hidden vs. hiding and stealth
// Tracking players uses tracking and detect hidden vs. hiding and stealth
private static bool CheckDifficulty( Mobile from, Mobile m )
{
if ( !Core.AOS || !m.Player )
@ -210,7 +209,7 @@ namespace Server.SkillHandlers
int tracking = from.Skills[SkillName.Tracking].Fixed;
int tracking = from.Skills[SkillName.Tracking].Fixed;
int detectHidden = from.Skills[SkillName.DetectHidden].Fixed;
if( Core.ML && m.Race == Race.Elf )
@ -220,7 +219,7 @@ namespace Server.SkillHandlers
int stealth = m.Skills[SkillName.Stealth].Fixed;
int divisor = hiding + stealth;
// Necromancy forms affect tracking difficulty
// Necromancy forms affect tracking difficulty
if ( TransformationSpellHelper.UnderTransformation( m, typeof( HorrificBeastSpell ) ) )
divisor -= 200;
else if ( TransformationSpellHelper.UnderTransformation( m, typeof( VampiricEmbraceSpell ) ) && divisor < 500 )
@ -397,4 +396,4 @@ namespace Server.SkillHandlers
}
}
}
}
}