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

@ -88,8 +88,7 @@ namespace Server.Items
if ( FacingSouth )
return BaseAddon.IsWall( p.X, p.Y - 1, p.Z, map ); // north wall
else
return BaseAddon.IsWall( p.X - 1, p.Y, p.Z, map ); // west wall
return BaseAddon.IsWall( p.X - 1, p.Y, p.Z, map ); // west wall
}
}

View file

@ -272,7 +272,7 @@ namespace Server.Engines.Events
Body = from.Body;
m_From = from;
Name = $"{@from.Name}\'s Naughty Twin";
Name = $"{from.Name}\'s Naughty Twin";
Timer.DelayCall<Mobile>( TrickOrTreat.OneSecond, Utility.RandomBool() ? StealCandy : new TimerStateCallback<Mobile>( ToGate ), m_From );
}

View file

@ -100,7 +100,7 @@ namespace Server.Mobiles
{
if ( Utility.RandomBool() )
{
if ( @from?.Map != null && Map != Map.Internal && Map == @from.Map && @from.InRange( this, 12 ) )
if ( from?.Map != null && Map != Map.Internal && Map == from.Map && from.InRange( this, 12 ) )
{
SpillAcid( ( willKill ) ? this : from, ( willKill ) ? 3 : 1 );
}

View file

@ -12,8 +12,7 @@ namespace Server.Items
{
if ( m_Owner != null )
return $"{m_Owner}'s St. Valentine Bear";
else
return "St. Valentine Bear";
return "St. Valentine Bear";
}
}
@ -194,9 +193,10 @@ namespace Server.Items
from.SendMessage( "Lines cannot be left blank." );
return;
}
else if ( line1.Length > 25
|| line2.Length > 25
|| line3.Length > 25 )
if ( line1.Length > 25
|| line2.Length > 25
|| line3.Length > 25 )
{
from.SendMessage( "Lines may not exceed 25 characters." );
return;
@ -216,7 +216,7 @@ namespace Server.Items
{
TextRelay tr = info.GetTextEntry( idx );
return ( tr == null ) ? null : tr.Text;
return tr?.Text;
}
}
}