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

@ -50,12 +50,13 @@ namespace Server.Spells.Ninjitsu
Caster.SendLocalizedMessage(1061628); // You can't do that while polymorphed.
return false;
}
else if (TransformationSpellHelper.UnderTransformation(Caster))
if (TransformationSpellHelper.UnderTransformation(Caster))
{
Caster.SendLocalizedMessage(1063219); // You cannot mimic an animal while in that form.
return false;
}
else if (DisguiseTimers.IsDisguised(Caster))
if (DisguiseTimers.IsDisguised(Caster))
{
Caster.SendLocalizedMessage(1061631); // You can't do that while disguised.
return false;

View file

@ -66,12 +66,13 @@ namespace Server.Spells.Ninjitsu
Caster.SendLocalizedMessage( 1063132 ); // You cannot use this ability while mounted.
return false;
}
else if ( (Caster.Followers + 1) > Caster.FollowersMax )
if ( (Caster.Followers + 1) > Caster.FollowersMax )
{
Caster.SendLocalizedMessage( 1063133 ); // You cannot summon a mirror image because you have too many followers.
return false;
}
else if ( TransformationSpellHelper.UnderTransformation( Caster, typeof( HorrificBeastSpell ) ) )
if ( TransformationSpellHelper.UnderTransformation( Caster, typeof( HorrificBeastSpell ) ) )
{
Caster.SendLocalizedMessage( 1061091 ); // You cannot cast that spell in this form.
return false;

View file

@ -55,7 +55,8 @@ namespace Server.Spells.Ninjitsu
Caster.SendLocalizedMessage( 1063013, args ); // You need at least ~1_SKILL_REQUIREMENT~ ~2_SKILL_NAME~ skill to use that ability.
return false;
}
else if ( Caster.Mana < mana )
if ( Caster.Mana < mana )
{
Caster.SendLocalizedMessage( 1060174, mana.ToString() ); // You must have at least ~1_MANA_REQUIREMENT~ Mana to use this ability.
return false;
@ -73,7 +74,8 @@ namespace Server.Spells.Ninjitsu
Caster.SendLocalizedMessage( 1063352, RequiredSkill.ToString( "F1" ) ); // You need ~1_SKILL_REQUIREMENT~ Ninjitsu skill to perform that attack!
return false;
}
else if ( Caster.Mana < mana )
if ( Caster.Mana < mana )
{
Caster.SendLocalizedMessage( 1060174, mana.ToString() ); // You must have at least ~1_MANA_REQUIREMENT~ Mana to use this ability.
return false;