Fixes more casting and other formatting issues.
This commit is contained in:
parent
03dd5f1926
commit
61937d9c97
67 changed files with 325 additions and 570 deletions
|
|
@ -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! *
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue