Adds more formatting
This commit is contained in:
parent
e77d695684
commit
f674ec2be0
68 changed files with 530 additions and 876 deletions
|
|
@ -54,9 +54,7 @@ namespace Server.Items
|
|||
|
||||
public void Throw( Mobile from )
|
||||
{
|
||||
BaseKnife knife = from.Weapon as BaseKnife;
|
||||
|
||||
if ( knife == null )
|
||||
if ( !(from.Weapon is BaseKnife knife) )
|
||||
{
|
||||
from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 500751 ); // Try holding a knife...
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -74,9 +74,7 @@ namespace Server.Items
|
|||
m_Timer = null;
|
||||
}
|
||||
|
||||
Mobile from = state as Mobile;
|
||||
|
||||
if ( from != null && !from.Deleted && !this.Deleted && IsFull )
|
||||
if ( state is Mobile from && !from.Deleted && !this.Deleted && IsFull )
|
||||
{
|
||||
SackFlour flour = new SackFlour();
|
||||
|
||||
|
|
@ -137,9 +135,7 @@ namespace Server.Items
|
|||
|
||||
for ( int i = 0; i < components.Count; ++i )
|
||||
{
|
||||
AddonComponent component = components[i] as AddonComponent;
|
||||
|
||||
if ( component == null )
|
||||
if ( !(components[i] is AddonComponent component) )
|
||||
continue;
|
||||
|
||||
int[] itemTable = FindItemTable( component.ItemID );
|
||||
|
|
|
|||
|
|
@ -60,9 +60,7 @@ namespace Server.Items
|
|||
m_Timer = null;
|
||||
}
|
||||
|
||||
Mobile from = state as Mobile;
|
||||
|
||||
if ( from != null && !from.Deleted && !this.Deleted && IsFull )
|
||||
if ( state is Mobile from && !from.Deleted && !this.Deleted && IsFull )
|
||||
{
|
||||
SackFlour flour = new SackFlour();
|
||||
|
||||
|
|
@ -123,9 +121,7 @@ namespace Server.Items
|
|||
|
||||
for ( int i = 0; i < components.Count; ++i )
|
||||
{
|
||||
AddonComponent component = components[i] as AddonComponent;
|
||||
|
||||
if ( component == null )
|
||||
if ( !(components[i] is AddonComponent component) )
|
||||
continue;
|
||||
|
||||
int[] itemTable = FindItemTable( component.ItemID );
|
||||
|
|
|
|||
|
|
@ -76,9 +76,7 @@ namespace Server.Items
|
|||
{
|
||||
for ( int i = 0; i < Components.Count; ++i )
|
||||
{
|
||||
AddonComponent ac = Components[i] as AddonComponent;
|
||||
|
||||
if ( ac != null && ac.Hue == 2118 )
|
||||
if ( Components[i] is AddonComponent ac && ac.Hue == 2118 )
|
||||
ac.Hue = 1161;
|
||||
}
|
||||
} );
|
||||
|
|
@ -90,9 +88,7 @@ namespace Server.Items
|
|||
{
|
||||
for ( int i = 0; i < Components.Count; ++i )
|
||||
{
|
||||
AddonComponent ac = Components[i] as AddonComponent;
|
||||
|
||||
if ( ac != null )
|
||||
if ( Components[i] is AddonComponent ac )
|
||||
ac.Name = "jack-o-lantern";
|
||||
}
|
||||
} );
|
||||
|
|
|
|||
|
|
@ -17,9 +17,7 @@ namespace Server.Items
|
|||
{
|
||||
m_Active = value;
|
||||
|
||||
SHTeleporter sourceAddon = Addon as SHTeleporter;
|
||||
|
||||
if ( sourceAddon != null )
|
||||
if ( Addon is SHTeleporter sourceAddon )
|
||||
sourceAddon.ChangeActive( value );
|
||||
}
|
||||
}
|
||||
|
|
@ -46,9 +44,7 @@ namespace Server.Items
|
|||
{
|
||||
m_TeleDest = value;
|
||||
|
||||
SHTeleporter sourceAddon = Addon as SHTeleporter;
|
||||
|
||||
if ( sourceAddon != null )
|
||||
if ( Addon is SHTeleporter sourceAddon )
|
||||
sourceAddon.ChangeDest( value );
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue