Adds more formatting
This commit is contained in:
parent
e77d695684
commit
f674ec2be0
68 changed files with 530 additions and 876 deletions
|
|
@ -292,10 +292,8 @@ namespace Server.Items
|
|||
|
||||
Item item = m.Items[i];
|
||||
|
||||
if ( item is BaseClothing )
|
||||
if ( item is BaseClothing clothing )
|
||||
{
|
||||
BaseClothing clothing = (BaseClothing)item;
|
||||
|
||||
if ( clothing.RequiredRace != null && m.Race != clothing.RequiredRace )
|
||||
{
|
||||
if ( clothing.RequiredRace == Race.Elf )
|
||||
|
|
@ -337,9 +335,7 @@ namespace Server.Items
|
|||
|
||||
public override void OnAdded(IEntity parent)
|
||||
{
|
||||
Mobile mob = parent as Mobile;
|
||||
|
||||
if ( mob != null )
|
||||
if ( parent is Mobile mob )
|
||||
{
|
||||
if ( Core.AOS )
|
||||
m_AosSkillBonuses.AddTo( mob );
|
||||
|
|
@ -353,9 +349,7 @@ namespace Server.Items
|
|||
|
||||
public override void OnRemoved(IEntity parent)
|
||||
{
|
||||
Mobile mob = parent as Mobile;
|
||||
|
||||
if ( mob != null )
|
||||
if ( parent is Mobile mob )
|
||||
{
|
||||
if ( Core.AOS )
|
||||
m_AosSkillBonuses.Remove();
|
||||
|
|
@ -415,8 +409,7 @@ namespace Server.Items
|
|||
{
|
||||
MaxHitPoints -= wear;
|
||||
|
||||
if ( Parent is Mobile )
|
||||
((Mobile)Parent).LocalOverheadMessage( MessageType.Regular, 0x3B2, 1061121 ); // Your equipment is severely damaged.
|
||||
(Parent as Mobile)?.LocalOverheadMessage( MessageType.Regular, 0x3B2, 1061121 ); // Your equipment is severely damaged.
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -452,9 +445,7 @@ namespace Server.Items
|
|||
|
||||
public override void OnAfterDuped( Item newItem )
|
||||
{
|
||||
BaseClothing clothing = newItem as BaseClothing;
|
||||
|
||||
if ( clothing == null )
|
||||
if ( !(newItem is BaseClothing clothing) )
|
||||
return;
|
||||
|
||||
clothing.m_AosAttributes = new AosAttributes( newItem, m_AosAttributes );
|
||||
|
|
@ -911,9 +902,7 @@ namespace Server.Items
|
|||
if ( m_MaxHitPoints == 0 && m_HitPoints == 0 )
|
||||
m_HitPoints = m_MaxHitPoints = Utility.RandomMinMax( InitMinHits, InitMaxHits );
|
||||
|
||||
Mobile parent = Parent as Mobile;
|
||||
|
||||
if ( parent != null )
|
||||
if ( Parent is Mobile parent )
|
||||
{
|
||||
if ( Core.AOS )
|
||||
m_AosSkillBonuses.AddTo( parent );
|
||||
|
|
|
|||
|
|
@ -192,16 +192,16 @@ namespace Server.Items
|
|||
{
|
||||
base.OnAdded( parent );
|
||||
|
||||
if ( parent is Mobile )
|
||||
((Mobile)parent).VirtualArmorMod += 2;
|
||||
if ( parent is Mobile mobile )
|
||||
mobile.VirtualArmorMod += 2;
|
||||
}
|
||||
|
||||
public override void OnRemoved(IEntity parent)
|
||||
{
|
||||
base.OnRemoved( parent );
|
||||
|
||||
if ( parent is Mobile )
|
||||
((Mobile)parent).VirtualArmorMod -= 2;
|
||||
if ( parent is Mobile mobile )
|
||||
mobile.VirtualArmorMod -= 2;
|
||||
}
|
||||
|
||||
public override bool Dye( Mobile from, DyeTub sender )
|
||||
|
|
@ -275,8 +275,8 @@ namespace Server.Items
|
|||
}
|
||||
}
|
||||
|
||||
if ( Parent is Mobile )
|
||||
((Mobile)Parent).VirtualArmorMod += 2;
|
||||
if ( Parent is Mobile mobile )
|
||||
mobile.VirtualArmorMod += 2;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -732,8 +732,8 @@ namespace Server.Items
|
|||
{
|
||||
base.OnAdded( parent );
|
||||
|
||||
if ( parent is Mobile )
|
||||
Misc.Titles.AwardKarma( (Mobile)parent, -20, true );
|
||||
if ( parent is Mobile mobile )
|
||||
Misc.Titles.AwardKarma( mobile, -20, true );
|
||||
}
|
||||
|
||||
public OrcishKinMask( Serial serial ) : base( serial )
|
||||
|
|
|
|||
|
|
@ -269,16 +269,16 @@ namespace Server.Items
|
|||
{
|
||||
base.OnAdded( parent );
|
||||
|
||||
if ( parent is Mobile )
|
||||
((Mobile)parent).VirtualArmorMod += 2;
|
||||
if ( parent is Mobile mobile )
|
||||
mobile.VirtualArmorMod += 2;
|
||||
}
|
||||
|
||||
public override void OnRemoved(IEntity parent)
|
||||
{
|
||||
base.OnRemoved( parent );
|
||||
|
||||
if ( parent is Mobile )
|
||||
((Mobile)parent).VirtualArmorMod -= 2;
|
||||
if ( parent is Mobile mobile )
|
||||
mobile.VirtualArmorMod -= 2;
|
||||
}
|
||||
|
||||
public override bool Dye( Mobile from, DyeTub sender )
|
||||
|
|
@ -352,8 +352,8 @@ namespace Server.Items
|
|||
}
|
||||
}
|
||||
|
||||
if ( Parent is Mobile )
|
||||
((Mobile)Parent).VirtualArmorMod += 2;
|
||||
if ( Parent is Mobile mobile )
|
||||
mobile.VirtualArmorMod += 2;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -394,16 +394,16 @@ namespace Server.Items
|
|||
{
|
||||
base.OnAdded( parent );
|
||||
|
||||
if ( parent is Mobile )
|
||||
((Mobile)parent).VirtualArmorMod += 2;
|
||||
if ( parent is Mobile mobile )
|
||||
mobile.VirtualArmorMod += 2;
|
||||
}
|
||||
|
||||
public override void OnRemoved(IEntity parent)
|
||||
{
|
||||
base.OnRemoved( parent );
|
||||
|
||||
if ( parent is Mobile )
|
||||
((Mobile)parent).VirtualArmorMod -= 2;
|
||||
if ( parent is Mobile mobile )
|
||||
mobile.VirtualArmorMod -= 2;
|
||||
}
|
||||
|
||||
public override bool Dye( Mobile from, DyeTub sender )
|
||||
|
|
@ -477,8 +477,8 @@ namespace Server.Items
|
|||
}
|
||||
}
|
||||
|
||||
if ( Parent is Mobile )
|
||||
((Mobile)Parent).VirtualArmorMod += 2;
|
||||
if ( Parent is Mobile mobile )
|
||||
mobile.VirtualArmorMod += 2;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue