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

@ -195,22 +195,22 @@ namespace Server.Mobiles
switch (version)
{
case 0:
{
m_Focus = reader.ReadMobile();
if (m_Focus != null)
{
m_AttackTimer = new AttackTimer(this);
m_AttackTimer.Start();
}
else
{
m_IdleTimer = new IdleTimer(this);
m_IdleTimer.Start();
}
m_Focus = reader.ReadMobile();
break;
}
if (m_Focus != null)
{
m_AttackTimer = new AttackTimer(this);
m_AttackTimer.Start();
}
else
{
m_IdleTimer = new IdleTimer(this);
m_IdleTimer.Start();
}
break;
}
}
}
@ -233,7 +233,7 @@ namespace Server.Mobiles
private class AvengeTimer : Timer
{
private Mobile m_Focus;
private readonly Mobile m_Focus;
public AvengeTimer(Mobile focus) : base(TimeSpan.FromSeconds(2.5), TimeSpan.FromSeconds(1.0), 3) => m_Focus = focus;
@ -245,7 +245,7 @@ namespace Server.Mobiles
private class AttackTimer : Timer
{
private WarriorGuard m_Owner;
private readonly WarriorGuard m_Owner;
public AttackTimer(WarriorGuard owner) : base(TimeSpan.FromSeconds(0.25), TimeSpan.FromSeconds(0.1)) => m_Owner = owner;
@ -308,22 +308,22 @@ namespace Server.Mobiles
Stop();
} // </instakill>
/*else if ( !m_Owner.InRange( target, 20 ) )
/*else if (!m_Owner.InRange( target, 20 ))
{
m_Owner.Focus = null;
}
else if ( !m_Owner.InRange( target, 10 ) || !m_Owner.InLOS( target ) )
else if (!m_Owner.InRange( target, 10 ) || !m_Owner.InLOS( target ))
{
TeleportTo( target );
}
else if ( !m_Owner.InRange( target, 1 ) )
else if (!m_Owner.InRange( target, 1 ))
{
if ( !m_Owner.Move( m_Owner.GetDirectionTo( target ) | Direction.Running ) )
if (!m_Owner.Move( m_Owner.GetDirectionTo( target ) | Direction.Running ))
TeleportTo( target );
}
else if ( !m_Owner.CanSee( target ) )
else if (!m_Owner.CanSee( target ))
{
if ( !m_Owner.UseSkill( SkillName.DetectHidden ) && Utility.Random( 50 ) == 0 )
if (!m_Owner.UseSkill( SkillName.DetectHidden ) && Utility.Random( 50 ) == 0)
m_Owner.Say( "Reveal!" );
}*/
}
@ -346,7 +346,7 @@ namespace Server.Mobiles
private class IdleTimer : Timer
{
private WarriorGuard m_Owner;
private readonly WarriorGuard m_Owner;
private int m_Stage;
public IdleTimer(WarriorGuard owner) : base(TimeSpan.FromSeconds(2.0), TimeSpan.FromSeconds(2.5)) => m_Owner = owner;