Adds more formatting
This commit is contained in:
parent
e77d695684
commit
f674ec2be0
68 changed files with 530 additions and 876 deletions
|
|
@ -16,8 +16,8 @@ namespace Server.Items
|
|||
|
||||
public static void GetContextMenuEntries( Mobile from, Item item, List<ContextMenuEntry> list )
|
||||
{
|
||||
if ( from is PlayerMobile )
|
||||
list.Add( new LockKarmaEntry( (PlayerMobile)from ) );
|
||||
if ( from is PlayerMobile mobile )
|
||||
list.Add( new LockKarmaEntry( mobile ) );
|
||||
|
||||
list.Add( new ResurrectEntry( from, item ) );
|
||||
|
||||
|
|
|
|||
|
|
@ -53,9 +53,7 @@ namespace Server.Items
|
|||
|
||||
private static void Link_OnFirstTarget( Mobile from, object targeted )
|
||||
{
|
||||
BaseDoor door = targeted as BaseDoor;
|
||||
|
||||
if ( door == null )
|
||||
if ( !(targeted is BaseDoor door) )
|
||||
{
|
||||
from.BeginTarget( -1, false, TargetFlags.None, new TargetCallback( Link_OnFirstTarget ) );
|
||||
from.SendMessage( "That is not a door. Try again." );
|
||||
|
|
@ -70,9 +68,8 @@ namespace Server.Items
|
|||
private static void Link_OnSecondTarget( Mobile from, object targeted, object state )
|
||||
{
|
||||
BaseDoor first = (BaseDoor)state;
|
||||
BaseDoor second = targeted as BaseDoor;
|
||||
|
||||
if ( second == null )
|
||||
if ( !(targeted is BaseDoor second) )
|
||||
{
|
||||
from.BeginTarget( -1, false, TargetFlags.None, new TargetStateCallback( Link_OnSecondTarget ), first );
|
||||
from.SendMessage( "That is not a door. Try again." );
|
||||
|
|
@ -95,9 +92,7 @@ namespace Server.Items
|
|||
|
||||
private static void ChainLink_OnTarget( Mobile from, object targeted, object state )
|
||||
{
|
||||
BaseDoor door = targeted as BaseDoor;
|
||||
|
||||
if ( door == null )
|
||||
if ( !(targeted is BaseDoor door) )
|
||||
{
|
||||
from.BeginTarget( -1, false, TargetFlags.None, new TargetStateCallback( ChainLink_OnTarget ), state );
|
||||
from.SendMessage( "That is not a door. Try again." );
|
||||
|
|
@ -586,4 +581,4 @@ namespace Server.Items
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue