Fixes implicit ternary expressions

This commit is contained in:
Kamron Batman 2018-09-14 14:56:48 -07:00
parent c85b0a740c
commit ff26dfa375
345 changed files with 1905 additions and 2336 deletions

View file

@ -6,8 +6,7 @@ namespace Server.Engines.Mahjong
{
if ( direction == MahjongPieceDirection.Up || direction == MahjongPieceDirection.Down )
return new MahjongPieceDim( position, 40, 20 );
else
return new MahjongPieceDim( position, 20, 40 );
return new MahjongPieceDim( position, 20, 40 );
}
private MahjongGame m_Game;

View file

@ -25,7 +25,7 @@ namespace Server.Engines.Mahjong
m_Game.Players.SendGeneralPacket( true, true );
if ( from != null )
m_Game.Players.SendLocalizedMessage( 1062695, $"{@from.Name}\t{m_First}\t{m_Second}"); // ~1_name~ rolls the dice and gets a ~2_number~ and a ~3_number~!
m_Game.Players.SendLocalizedMessage( 1062695, $"{from.Name}\t{m_First}\t{m_Second}"); // ~1_name~ rolls the dice and gets a ~2_number~ and a ~3_number~!
}
public void Save( GenericWriter writer )

View file

@ -19,10 +19,8 @@ namespace Server.Engines.Mahjong
{
return m_SubCommandDelegates[cmd];
}
else
{
return null;
}
return null;
}
public static void Initialize()

View file

@ -35,8 +35,7 @@ namespace Server.Engines.Mahjong
{
if ( index < 0 || index >= m_Players.Length )
return null;
else
return m_Players[index];
return m_Players[index];
}
public int GetPlayerIndex( Mobile mobile )
@ -53,16 +52,14 @@ namespace Server.Engines.Mahjong
{
if ( Dealer != mobile )
return false;
else
return m_InGame[m_DealerPosition];
return m_InGame[m_DealerPosition];
}
public bool IsInGamePlayer( int index )
{
if ( index < 0 || index >= m_Players.Length || m_Players[index] == null )
return false;
else
return m_InGame[index];
return m_InGame[index];
}
public bool IsInGamePlayer( Mobile mobile )
@ -81,16 +78,14 @@ namespace Server.Engines.Mahjong
{
if ( index < 0 || index >= m_Scores.Length )
return 0;
else
return m_Scores[index];
return m_Scores[index];
}
public bool IsPublic( int index )
{
if ( index < 0 || index >= m_PublicHand.Length )
return false;
else
return m_PublicHand[index];
return m_PublicHand[index];
}
public void SetPublic( int index, bool value )
@ -264,10 +259,8 @@ namespace Server.Engines.Mahjong
return true;
}
else
{
return false;
}
return false;
}
private void AddPlayer( Mobile player, int index, bool sendJoinGame )
@ -378,7 +371,7 @@ namespace Server.Engines.Mahjong
to.Send( new MahjongPlayersInfo( m_Game, to ) );
}
SendLocalizedMessage( 1062774, $"{@from.Name}\t{to.Name}\t{amount}"); // ~1_giver~ gives ~2_receiver~ ~3_number~ points.
SendLocalizedMessage( 1062774, $"{from.Name}\t{to.Name}\t{amount}"); // ~1_giver~ gives ~2_receiver~ ~3_number~ points.
}
public void OpenSeat( int index )

View file

@ -6,8 +6,7 @@ namespace Server.Engines.Mahjong
{
if ( direction == MahjongPieceDirection.Up || direction == MahjongPieceDirection.Down )
return new MahjongPieceDim( position, 20, 30 );
else
return new MahjongPieceDim( position, 30, 20 );
return new MahjongPieceDim( position, 30, 20 );
}
private MahjongGame m_Game;