Fixes code according to modern code style. Fixes a few expression bugs.
This commit is contained in:
parent
89eea25e5f
commit
970fd563b2
3324 changed files with 441118 additions and 433755 deletions
|
|
@ -2,52 +2,52 @@ using Server.Targets;
|
|||
|
||||
namespace Server.Items
|
||||
{
|
||||
public abstract class BaseSword : BaseMeleeWeapon
|
||||
{
|
||||
public override SkillName DefSkill => SkillName.Swords;
|
||||
public override WeaponType DefType => WeaponType.Slashing;
|
||||
public override WeaponAnimation DefAnimation => WeaponAnimation.Slash1H;
|
||||
public abstract class BaseSword : BaseMeleeWeapon
|
||||
{
|
||||
public BaseSword(int itemID) : base(itemID)
|
||||
{
|
||||
}
|
||||
|
||||
public BaseSword( int itemID ) : base( itemID )
|
||||
{
|
||||
}
|
||||
public BaseSword(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public BaseSword( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
public override SkillName DefSkill => SkillName.Swords;
|
||||
public override WeaponType DefType => WeaponType.Slashing;
|
||||
public override WeaponAnimation DefAnimation => WeaponAnimation.Slash1H;
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
|
||||
public override void OnDoubleClick( Mobile from )
|
||||
{
|
||||
from.SendLocalizedMessage( 1010018 ); // What do you want to use this item on?
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
from.SendLocalizedMessage(1010018); // What do you want to use this item on?
|
||||
|
||||
from.Target = new BladedItemTarget( this );
|
||||
}
|
||||
from.Target = new BladedItemTarget(this);
|
||||
}
|
||||
|
||||
public override void OnHit( Mobile attacker, Mobile defender, double damageBonus = 1 )
|
||||
{
|
||||
base.OnHit( attacker, defender, damageBonus );
|
||||
public override void OnHit(Mobile attacker, Mobile defender, double damageBonus = 1)
|
||||
{
|
||||
base.OnHit(attacker, defender, damageBonus);
|
||||
|
||||
if ( !Core.AOS && Poison != null && PoisonCharges > 0 )
|
||||
{
|
||||
--PoisonCharges;
|
||||
if (!Core.AOS && Poison != null && PoisonCharges > 0)
|
||||
{
|
||||
--PoisonCharges;
|
||||
|
||||
if ( Utility.RandomDouble() >= 0.5 ) // 50% chance to poison
|
||||
defender.ApplyPoison( attacker, Poison );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (Utility.RandomDouble() >= 0.5) // 50% chance to poison
|
||||
defender.ApplyPoison(attacker, Poison);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue