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

@ -82,7 +82,7 @@ namespace Server.Spells.Spellweaving
if ( t.Z + id.CalcHeight != location.Z )
continue;
else if ( IsValidTile( tand ) )
if ( IsValidTile( tand ) )
return true;
}
@ -94,7 +94,7 @@ namespace Server.Spells.Spellweaving
if ( item == null || item.Z + id.CalcHeight != location.Z )
continue;
else if ( IsValidTile( item.ItemID ) )
if ( IsValidTile( item.ItemID ) )
{
eable.Free();
return true;

View file

@ -36,7 +36,7 @@ namespace Server.Spells.Spellweaving
public static ArcaneFocus FindArcaneFocus( Mobile from )
{
if ( @from?.Backpack == null )
if ( from?.Backpack == null )
return null;
if ( from.Holding is ArcaneFocus )
@ -87,7 +87,8 @@ namespace Server.Spells.Spellweaving
caster.SendLocalizedMessage( 1060174, mana.ToString() ); // You must have at least ~1_MANA_REQUIREMENT~ Mana to use this ability.
return false;
}
else if ( caster.Skills[CastSkill].Value < RequiredSkill )
if ( caster.Skills[CastSkill].Value < RequiredSkill )
{
caster.SendLocalizedMessage( 1063013, $"{RequiredSkill.ToString("F1")}\t{"#1044114"}"); // You need at least ~1_SKILL_REQUIREMENT~ ~2_SKILL_NAME~ skill to use that ability.
return false;

View file

@ -27,7 +27,8 @@ namespace Server.Spells.Spellweaving
Caster.SendLocalizedMessage( 501775 ); // This spell is already in effect.
return false;
}
else if ( !Caster.CanBeginAction( typeof( AttuneWeaponSpell ) ) )
if ( !Caster.CanBeginAction( typeof( AttuneWeaponSpell ) ) )
{
Caster.SendLocalizedMessage( 1075124 ); // You must wait before casting that spell again.
return false;

View file

@ -38,7 +38,7 @@ namespace Server.Items
public virtual void Expire( Mobile parent )
{
parent?.SendLocalizedMessage( 1072515, (Name == null ? $"#{LabelNumber}" : Name) ); // The ~1_name~ expired...
parent?.SendLocalizedMessage( 1072515, Name ?? $"#{LabelNumber}" ); // The ~1_name~ expired...
Effects.PlaySound( GetWorldLocation(), Map, 0x201 );
@ -48,7 +48,7 @@ namespace Server.Items
public virtual void SendTimeRemainingMessage( Mobile to )
{
to.SendLocalizedMessage( 1072516,
$"{(Name == null ? $"#{LabelNumber}" : Name)}\t{(int) m_LifeSpan.TotalSeconds}"); // ~1_name~ will expire in ~2_val~ seconds!
$"{Name ?? $"#{LabelNumber}"}\t{(int) m_LifeSpan.TotalSeconds}"); // ~1_name~ will expire in ~2_val~ seconds!
}
public override void OnDelete()