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

@ -80,7 +80,7 @@ namespace Server.Engines.BulkOrders
return BulkMaterialType.None;
}
public override int LabelNumber{ get{ return 1045151; } } // a bulk order deed
public override int LabelNumber => 1045151; // a bulk order deed
public LargeBOD( int hue, int amountMax, bool requireExeptional, BulkMaterialType material, LargeBulkEntry[] entries ) : base( Core.AOS ? 0x2258 : 0x14EF )
{
@ -265,4 +265,4 @@ namespace Server.Engines.BulkOrders
Delete();
}
}
}
}

View file

@ -134,14 +134,10 @@ namespace Server.Engines.BulkOrders
if (m_Cache == null)
m_Cache = new Dictionary<string, Dictionary<string, SmallBulkEntry[]>>();
Dictionary<string, SmallBulkEntry[]> table = null;
if (!m_Cache.TryGetValue(type, out table))
if (!m_Cache.TryGetValue( type, out Dictionary<string, SmallBulkEntry[]> table ))
m_Cache[type] = table = new Dictionary<string, SmallBulkEntry[]>();
SmallBulkEntry[] entries = null;
if (!table.TryGetValue(name, out entries))
if (!table.TryGetValue( name, out SmallBulkEntry[] entries ))
table[name] = entries = SmallBulkEntry.LoadEntries(type, name);
return entries;
@ -186,4 +182,4 @@ namespace Server.Engines.BulkOrders
writer.Write( m_Details.Graphic );
}
}
}
}

View file

@ -41,7 +41,7 @@ namespace Server.Engines.BulkOrders
[CommandProperty( AccessLevel.GameMaster )]
public bool Complete{ get{ return ( m_AmountCur == m_AmountMax ); } }
public override int LabelNumber{ get{ return 1045151; } } // a bulk order deed
public override int LabelNumber => 1045151; // a bulk order deed
[Constructible]
public SmallBOD( int hue, int amountMax, Type type, int number, int graphic, bool requireExeptional, BulkMaterialType material ) : base( Core.AOS ? 0x2258 : 0x14EF )
@ -288,4 +288,4 @@ namespace Server.Engines.BulkOrders
Delete();
}
}
}
}

View file

@ -49,14 +49,10 @@ namespace Server.Engines.BulkOrders
if ( m_Cache == null )
m_Cache = new Dictionary<string, Dictionary<string, SmallBulkEntry[]>>();
Dictionary<string, SmallBulkEntry[]> table = null;
if (!m_Cache.TryGetValue(type, out table))
if (!m_Cache.TryGetValue( type, out Dictionary<string, SmallBulkEntry[]> table ))
m_Cache[type] = table = new Dictionary<string, SmallBulkEntry[]>();
SmallBulkEntry[] entries = null;
if (!table.TryGetValue(name, out entries))
if (!table.TryGetValue( name, out SmallBulkEntry[] entries ))
table[name] = entries = LoadEntries(type, name);
return entries;
@ -107,4 +103,4 @@ namespace Server.Engines.BulkOrders
return list.ToArray();
}
}
}
}