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

@ -110,8 +110,7 @@ namespace Server.Items
{
if ( ItemID == 0x3062 )
return new AquariumEastDeed();
else
return new AquariumNorthDeed();
return new AquariumNorthDeed();
}
}
@ -167,7 +166,7 @@ namespace Server.Items
{
if ( from == null || from.Deleted )
return false;
else if ( from.AccessLevel >= AccessLevel.GameMaster )
if ( from.AccessLevel >= AccessLevel.GameMaster )
return true;
BaseHouse house = BaseHouse.FindHouseAt( this );
@ -822,7 +821,7 @@ namespace Server.Items
if ( IsFull || m_LiveCreatures >= MaxLiveCreatures || fish.Dead )
{
@from?.SendLocalizedMessage( 1073633 ); // The aquarium can not hold the creature.
from?.SendLocalizedMessage( 1073633 ); // The aquarium can not hold the creature.
return false;
}
@ -832,7 +831,7 @@ namespace Server.Items
m_LiveCreatures += 1;
@from?.SendLocalizedMessage( 1073632, $"#{fish.LabelNumber}"); // You add the following creature to your aquarium: ~1_FISH~
from?.SendLocalizedMessage( 1073632, $"#{fish.LabelNumber}"); // You add the following creature to your aquarium: ~1_FISH~
InvalidateProperties();
return true;
@ -874,7 +873,7 @@ namespace Server.Items
#region Static members
public static FishBowl GetEmptyBowl( Mobile from )
{
if ( @from?.Backpack == null )
if ( from?.Backpack == null )
return null;
Item[] items = from.Backpack.FindItemsByType( typeof( FishBowl ) );

View file

@ -38,24 +38,20 @@ namespace Server.Items
Delete();
return;
}
else
if ( from.PlaceInBackpack( fish ) )
{
if ( from.PlaceInBackpack( fish ) )
{
from.PlaySound( 0x5A2 );
from.SendLocalizedMessage( 1074490 ); // A live creature flops around in your pack before running out of air.
from.PlaySound( 0x5A2 );
from.SendLocalizedMessage( 1074490 ); // A live creature flops around in your pack before running out of air.
fish.Kill();
Delete();
return;
}
else
{
fish.Delete();
from.SendLocalizedMessage( 1074488 ); // You could not hold the creature.
}
fish.Kill();
Delete();
return;
}
fish.Delete();
from.SendLocalizedMessage( 1074488 ); // You could not hold the creature.
}
InUse = false;