Fixes code according to modern code style. Fixes a few expression bugs.

This commit is contained in:
Kamron Batman 2018-09-15 09:58:51 -07:00
parent 89eea25e5f
commit 970fd563b2
3324 changed files with 441118 additions and 433755 deletions

View file

@ -1,59 +1,59 @@
namespace Server.Items
{
public abstract class BaseEquipableLight : BaseLight
{
[Constructible]
public BaseEquipableLight( int itemID ) : base( itemID )
{
Layer = Layer.TwoHanded;
}
public abstract class BaseEquipableLight : BaseLight
{
[Constructible]
public BaseEquipableLight(int itemID) : base(itemID)
{
Layer = Layer.TwoHanded;
}
public BaseEquipableLight( Serial serial ) : base( serial )
{
}
public BaseEquipableLight(Serial serial) : base(serial)
{
}
public override void Ignite()
{
if ( !(Parent is Mobile) && RootParent is Mobile holder )
{
if ( holder.EquipItem( this ) )
{
if ( this is Candle )
holder.SendLocalizedMessage( 502969 ); // You put the candle in your left hand.
else if ( this is Torch )
holder.SendLocalizedMessage( 502971 ); // You put the torch in your left hand.
public override void Ignite()
{
if (!(Parent is Mobile) && RootParent is Mobile holder)
{
if (holder.EquipItem(this))
{
if (this is Candle)
holder.SendLocalizedMessage(502969); // You put the candle in your left hand.
else if (this is Torch)
holder.SendLocalizedMessage(502971); // You put the torch in your left hand.
base.Ignite();
}
else
{
holder.SendLocalizedMessage( 502449 ); // You cannot hold this item.
}
}
else
{
base.Ignite();
}
}
base.Ignite();
}
else
{
holder.SendLocalizedMessage(502449); // You cannot hold this item.
}
}
else
{
base.Ignite();
}
}
public override void OnAdded(IEntity parent)
{
if ( Burning && parent is Container )
Douse();
public override void OnAdded(IEntity parent)
{
if (Burning && parent is Container)
Douse();
base.OnAdded( parent );
}
base.OnAdded(parent);
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 );
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0);
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}