Fixes implicit ternary expressions
This commit is contained in:
parent
c85b0a740c
commit
ff26dfa375
345 changed files with 1905 additions and 2336 deletions
|
|
@ -66,15 +66,13 @@ namespace Server.Items
|
|||
Delete();
|
||||
return false;
|
||||
}
|
||||
else if ( !IsChildOf( m_Board ) )
|
||||
|
||||
if ( !IsChildOf( m_Board ) )
|
||||
{
|
||||
m_Board.DropItem( this );
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool CanTarget => false;
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ namespace Server.Items
|
|||
public void Roll( Mobile from )
|
||||
{
|
||||
PublicOverheadMessage( MessageType.Regular, 0, false,
|
||||
$"*{@from.Name} rolls {Utility.Random(1, 6)}, {Utility.Random(1, 6)}*");
|
||||
$"*{from.Name} rolls {Utility.Random(1, 6)}, {Utility.Random(1, 6)}*");
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
|
|
@ -48,4 +48,4 @@ namespace Server.Items
|
|||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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 )
|
||||
|
|
|
|||
|
|
@ -19,10 +19,8 @@ namespace Server.Engines.Mahjong
|
|||
{
|
||||
return m_SubCommandDelegates[cmd];
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public static void Initialize()
|
||||
|
|
|
|||
|
|
@ -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 )
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue