Fixes implicit array initializers

This commit is contained in:
Kamron Batman 2018-09-14 13:14:20 -07:00
parent 7d3a0ca265
commit fee83ce560
189 changed files with 440 additions and 808 deletions

View file

@ -400,8 +400,7 @@ namespace Server.Engines.ConPVP
}
#region Offsets & Rotation
private static Point2D[] m_EdgeOffsets = new[]
{
private static Point2D[] m_EdgeOffsets = {
/*
* /\
* /\/\
@ -423,8 +422,7 @@ namespace Server.Engines.ConPVP
};
// nw corner
private static Point2D[] m_CornerOffsets = new[]
{
private static Point2D[] m_CornerOffsets = {
/*
* /\
* /\/\
@ -444,8 +442,7 @@ namespace Server.Engines.ConPVP
new Point2D( 3, 0 )
};
private static int[][,] m_Rotate = new[]
{
private static int[][,] m_Rotate = {
new[,]{ { +1, 0 }, { 0, +1 } }, // west
new[,]{ { -1, 0 }, { 0, -1 } }, // east
new[,]{ { 0, +1 }, { +1, 0 } }, // north

View file

@ -744,7 +744,7 @@ namespace Server.Engines.ConPVP
StopSDTimers();
Type[] types = new[]{ typeof( BeginGump ), typeof( DuelContextGump ), typeof( ParticipantGump ), typeof( PickRulesetGump ), typeof( ReadyGump ), typeof( ReadyUpGump ), typeof( RulesetGump ) };
Type[] types = { typeof( BeginGump ), typeof( DuelContextGump ), typeof( ParticipantGump ), typeof( PickRulesetGump ), typeof( ReadyGump ), typeof( ReadyUpGump ), typeof( RulesetGump ) };
for ( int i = 0; i < m_Participants.Count; ++i )
{
@ -1531,8 +1531,8 @@ namespace Server.Engines.ConPVP
public void CloseAllGumps()
{
Type[] types = new[]{ typeof( DuelContextGump ), typeof( ParticipantGump ), typeof( RulesetGump ) };
int[] defs = new[]{ -1, -1, -1 };
Type[] types = { typeof( DuelContextGump ), typeof( ParticipantGump ), typeof( RulesetGump ) };
int[] defs = { -1, -1, -1 };
for ( int i = 0; i < m_Participants.Count; ++i )
{
@ -1559,8 +1559,8 @@ namespace Server.Engines.ConPVP
if ( m_StartedReadyCountdown )
return; // sanity
Type[] types = new[]{ typeof( DuelContextGump ), typeof( ReadyUpGump ), typeof( ReadyGump ) };
int[] defs = new[]{ -1, -1, -1 };
Type[] types = { typeof( DuelContextGump ), typeof( ReadyUpGump ), typeof( ReadyGump ) };
int[] defs = { -1, -1, -1 };
for ( int i = 0; i < m_Participants.Count; ++i )
{
@ -1965,7 +1965,7 @@ namespace Server.Engines.ConPVP
BeginAutoTie();
}
Type[] types = new[]{ typeof( ReadyGump ), typeof( ReadyUpGump ), typeof( BeginGump ) };
Type[] types = { typeof( ReadyGump ), typeof( ReadyUpGump ), typeof( BeginGump ) };
for ( int i = 0; i < m_Participants.Count; ++i )
{
@ -2287,7 +2287,7 @@ namespace Server.Engines.ConPVP
m_ReadyWait = true;
m_ReadyCount = -1;
Type[] types = new[]{ typeof( ReadyUpGump ) };
Type[] types = { typeof( ReadyUpGump ) };
for ( int i = 0; i < m_Participants.Count; ++i )
{
@ -2523,7 +2523,7 @@ namespace Server.Engines.ConPVP
bool isAllReady = true;
Type[] types = new[]{ typeof( ReadyGump ) };
Type[] types = { typeof( ReadyGump ) };
for ( int i = 0; i < m_Participants.Count; ++i )
{

View file

@ -72,8 +72,7 @@ namespace Server.Engines.ConPVP
public class Ladder
{
private static int[] m_ShortLevels = new[]
{
private static int[] m_ShortLevels = {
1,
2,
3, 3,
@ -97,8 +96,7 @@ namespace Server.Engines.ConPVP
return m_ShortLevels[xp / 100];
}
private static int[] m_BaseXP = new[]
{
private static int[] m_BaseXP = {
0, 100, 200, 400, 600, 900, 1200, 1600, 2000, 2500
};
@ -116,8 +114,7 @@ namespace Server.Engines.ConPVP
}
}
private static int[] m_LossFactors = new[]
{
private static int[] m_LossFactors = {
10,
11, 11,
25, 25,
@ -133,8 +130,7 @@ namespace Server.Engines.ConPVP
return m_LossFactors[level - 1];
}
private static int[,] m_OffsetScalar = new[,]
{
private static int[,] m_OffsetScalar = {
/* { win, los } */
/* -6 */ { 175, 25 },
/* -5 */ { 165, 35 },