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

@ -21,11 +21,9 @@ namespace Server.Factions
index = offset / ButtonTypes;
return true;
}
else
{
type = index = 0;
return false;
}
type = index = 0;
return false;
}
public static bool Exists( Mobile mob )

View file

@ -128,10 +128,10 @@ namespace Server.Factions
AddHtml( 120, 100, 150, 20, from.Name, false, false );
AddHtmlLocalized( 20, 130, 100, 20, 1018064, false, false ); // score :
AddHtml( 120, 130, 100, 20, (pl != null ? pl.KillPoints : 0).ToString(), false, false );
AddHtml( 120, 130, 100, 20, (pl?.KillPoints ?? 0).ToString(), false, false );
AddHtmlLocalized( 20, 160, 100, 20, 1011446, false, false ); // Rank :
AddHtml( 120, 160, 100, 20, (pl != null ? pl.Rank.Rank : 0).ToString(), false, false );
AddHtml( 120, 160, 100, 20, (pl?.Rank.Rank ?? 0).ToString(), false, false );
AddHtmlLocalized( 55, 250, 100, 20, 1011447, false, false ); // BACK
AddButton( 20, 250, 4005, 4007, 0, GumpButtonType.Page, 1 );

View file

@ -118,7 +118,8 @@ namespace Server.Factions
from.SendLocalizedMessage( 1010339 ); // You no longer control this city
return;
}
else if ( m_Town.Sheriff != null )
if ( m_Town.Sheriff != null )
{
from.SendLocalizedMessage( 1010342 ); // You must fire your Sheriff before you can elect a new one
}