Adds more formatting
This commit is contained in:
parent
e77d695684
commit
f674ec2be0
68 changed files with 530 additions and 876 deletions
|
|
@ -263,7 +263,7 @@ namespace Server.Items
|
|||
writer.Write( m_Height );
|
||||
|
||||
writer.Write( m_Protected );
|
||||
|
||||
|
||||
writer.Write( m_Pins.Count );
|
||||
for ( int i = 0; i < m_Pins.Count; ++i )
|
||||
writer.Write( m_Pins[i] );
|
||||
|
|
@ -303,9 +303,8 @@ namespace Server.Items
|
|||
private static void OnMapCommand( NetState state, PacketReader pvSrc )
|
||||
{
|
||||
Mobile from = state.Mobile;
|
||||
MapItem map = World.FindItem( pvSrc.ReadInt32() ) as MapItem;
|
||||
|
||||
if ( map == null )
|
||||
if ( !(World.FindItem( pvSrc.ReadInt32() ) is MapItem map) )
|
||||
return;
|
||||
|
||||
int command = pvSrc.ReadByte();
|
||||
|
|
@ -366,7 +365,7 @@ namespace Server.Items
|
|||
m_Stream.Write( (byte) command );
|
||||
m_Stream.Write( (byte) number );
|
||||
m_Stream.Write( (short) x );
|
||||
m_Stream.Write( (short) y );
|
||||
m_Stream.Write( (short) y );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -400,4 +399,4 @@ namespace Server.Items
|
|||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -342,11 +342,7 @@ namespace Server.Items
|
|||
{
|
||||
IPoint3D p = targeted as IPoint3D;
|
||||
|
||||
Point3D targ3D;
|
||||
if ( p is Item )
|
||||
targ3D = ((Item)p).GetWorldLocation();
|
||||
else
|
||||
targ3D = new Point3D( p );
|
||||
Point3D targ3D = (p as Item)?.GetWorldLocation() ?? new Point3D(p);
|
||||
|
||||
int maxRange;
|
||||
double skillValue = from.Skills[SkillName.Mining].Value;
|
||||
|
|
@ -621,7 +617,7 @@ namespace Server.Items
|
|||
if ( from.AccessLevel >= AccessLevel.GameMaster )
|
||||
return true;
|
||||
|
||||
if ( from is PlayerMobile && ((PlayerMobile)from).Young )
|
||||
if ( @from is PlayerMobile mobile && mobile.Young )
|
||||
return true;
|
||||
|
||||
if ( from == this.Decoder )
|
||||
|
|
@ -935,4 +931,4 @@ namespace Server.Items
|
|||
Delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue