Fixes more casting and other formatting issues.

This commit is contained in:
Kamron Batman 2018-08-19 10:14:40 +08:00
parent 03dd5f1926
commit 61937d9c97
67 changed files with 325 additions and 570 deletions

View file

@ -78,9 +78,7 @@ namespace Server.Items
return;
}
LandTarget land = targeted as LandTarget;
if ( land == null )
if ( !(targeted is LandTarget land) )
{
from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 1061912 ); // * You cannot plant a green thorn there! *
}

View file

@ -62,9 +62,7 @@ namespace Server.Items
return;
}
Item item = targeted as Item;
if ( item == null || !item.IsChildOf( from.Backpack ) )
if ( !(targeted is Item item) || !item.IsChildOf( from.Backpack ) )
{
from.SendLocalizedMessage( 1042664 ); // You must have the object in your backpack to use it.
}