Upgrades code style - First batch (#22)
This commit is contained in:
parent
8ee42c8ea2
commit
632e8b4757
1834 changed files with 10245 additions and 10437 deletions
|
|
@ -18,12 +18,12 @@ namespace Server.Regions
|
|||
|
||||
public class BaseRegion : Region
|
||||
{
|
||||
public virtual bool YoungProtected { get { return true; } }
|
||||
public virtual bool YoungMayEnter { get { return true; } }
|
||||
public virtual bool MountsAllowed { get { return true; } }
|
||||
public virtual bool DeadMayEnter { get { return true; } }
|
||||
public virtual bool ResurrectionAllowed { get { return true; } }
|
||||
public virtual bool LogoutAllowed { get { return true; } }
|
||||
public virtual bool YoungProtected => true;
|
||||
public virtual bool YoungMayEnter => true;
|
||||
public virtual bool MountsAllowed => true;
|
||||
public virtual bool DeadMayEnter => true;
|
||||
public virtual bool ResurrectionAllowed => true;
|
||||
public virtual bool LogoutAllowed => true;
|
||||
|
||||
public static void Configure()
|
||||
{
|
||||
|
|
@ -557,4 +557,4 @@ namespace Server.Regions
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -133,7 +133,7 @@ namespace Server.Regions
|
|||
{
|
||||
m_GuardType = DefaultGuardType;
|
||||
}
|
||||
|
||||
|
||||
public GuardedRegion( XmlElement xml, Map map, Region parent ) : base( xml, map, parent )
|
||||
{
|
||||
XmlElement el = xml["guards"];
|
||||
|
|
@ -262,8 +262,7 @@ namespace Server.Regions
|
|||
|
||||
if ( IsGuardCandidate( m ) )
|
||||
{
|
||||
GuardTimer timer = null;
|
||||
m_GuardCandidates.TryGetValue( m, out timer );
|
||||
m_GuardCandidates.TryGetValue( m, out GuardTimer timer );
|
||||
|
||||
if ( timer == null )
|
||||
{
|
||||
|
|
@ -323,8 +322,7 @@ namespace Server.Regions
|
|||
{
|
||||
if ( IsGuardCandidate( m ) && ( ( !AllowReds && m.Kills >= 5 && m.Region.IsPartOf( this ) ) || m_GuardCandidates.ContainsKey( m ) ) )
|
||||
{
|
||||
GuardTimer timer = null;
|
||||
m_GuardCandidates.TryGetValue( m, out timer );
|
||||
m_GuardCandidates.TryGetValue( m, out GuardTimer timer );
|
||||
|
||||
if ( timer != null )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -157,7 +157,7 @@ namespace Server.Regions
|
|||
protected bool m_Land;
|
||||
protected bool m_Water;
|
||||
|
||||
public override int Height{ get{ return 16; } }
|
||||
public override int Height => 16;
|
||||
public override bool Land{ get{ EnsureInit(); return m_Land; } }
|
||||
public override bool Water{ get{ EnsureInit(); return m_Water; } }
|
||||
|
||||
|
|
|
|||
|
|
@ -266,7 +266,7 @@ namespace Server.Regions
|
|||
m_SpawnTimer.Stop();
|
||||
|
||||
TimeSpan delay = m_NextSpawn - DateTime.UtcNow;
|
||||
m_SpawnTimer = Timer.DelayCall( delay > TimeSpan.Zero ? delay : TimeSpan.Zero, new TimerCallback( TimerCallback ) );
|
||||
m_SpawnTimer = Timer.DelayCall( delay > TimeSpan.Zero ? delay : TimeSpan.Zero, new TimerCallback( TimerCallback ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -335,9 +335,7 @@ namespace Server.Regions
|
|||
else
|
||||
{
|
||||
string name = args.GetString( 0 );
|
||||
//reg = (Region) from.Map.Regions[name];
|
||||
|
||||
if ( !from.Map.Regions.TryGetValue( name, out reg ) )
|
||||
//reg = if (!from.Map.Regions.TryGetValue( name, out (Region) from.Map.Regions[name] ))
|
||||
{
|
||||
from.SendMessage( "Could not find region '{0}'.", name );
|
||||
return null;
|
||||
|
|
@ -463,4 +461,4 @@ namespace Server.Regions
|
|||
args.Mobile.SendMessage( "Spawners of region '{0}' have stopped.", region );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue