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,65 +2,67 @@ using Server.Network;
|
|||
|
||||
namespace Server.Items
|
||||
{
|
||||
[FlippableAttribute( 0xF95, 0xF96, 0xF97, 0xF98, 0xF99, 0xF9A, 0xF9B, 0xF9C )]
|
||||
public class BoltOfCloth : Item, IScissorable, IDyable, ICommodity
|
||||
{
|
||||
int ICommodity.DescriptionNumber => LabelNumber;
|
||||
bool ICommodity.IsDeedable => true;
|
||||
[Flippable(0xF95, 0xF96, 0xF97, 0xF98, 0xF99, 0xF9A, 0xF9B, 0xF9C)]
|
||||
public class BoltOfCloth : Item, IScissorable, IDyable, ICommodity
|
||||
{
|
||||
[Constructible]
|
||||
public BoltOfCloth() : this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public BoltOfCloth() : this( 1 )
|
||||
{
|
||||
}
|
||||
[Constructible]
|
||||
public BoltOfCloth(int amount) : base(0xF95)
|
||||
{
|
||||
Stackable = true;
|
||||
Weight = 5.0;
|
||||
Amount = amount;
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public BoltOfCloth( int amount ) : base( 0xF95 )
|
||||
{
|
||||
Stackable = true;
|
||||
Weight = 5.0;
|
||||
Amount = amount;
|
||||
}
|
||||
public BoltOfCloth(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public BoltOfCloth( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
int ICommodity.DescriptionNumber => LabelNumber;
|
||||
bool ICommodity.IsDeedable => true;
|
||||
|
||||
public bool Dye( Mobile from, DyeTub sender )
|
||||
{
|
||||
if ( Deleted ) return false;
|
||||
public bool Dye(Mobile from, DyeTub sender)
|
||||
{
|
||||
if (Deleted) return false;
|
||||
|
||||
Hue = sender.DyedHue;
|
||||
Hue = sender.DyedHue;
|
||||
|
||||
return true;
|
||||
}
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
return true;
|
||||
}
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
public bool Scissor(Mobile from, Scissors scissors)
|
||||
{
|
||||
if (Deleted || !from.CanSee(this)) return false;
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
base.ScissorHelper(from, new Cloth(), 50);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public bool Scissor( Mobile from, Scissors scissors )
|
||||
{
|
||||
if ( Deleted || !from.CanSee( this ) ) return false;
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
base.ScissorHelper( from, new Cloth(), 50 );
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
public override void OnSingleClick( Mobile from )
|
||||
{
|
||||
int number = (Amount == 1) ? 1049122 : 1049121;
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
|
||||
from.Send( new MessageLocalized( Serial, ItemID, MessageType.Label, 0x3B2, 3, number, "", (Amount * 50).ToString() ) );
|
||||
}
|
||||
}
|
||||
public override void OnSingleClick(Mobile from)
|
||||
{
|
||||
int number = Amount == 1 ? 1049122 : 1049121;
|
||||
|
||||
from.Send(
|
||||
new MessageLocalized(Serial, ItemID, MessageType.Label, 0x3B2, 3, number, "", (Amount * 50).ToString()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,41 +1,40 @@
|
|||
namespace Server.Items
|
||||
{
|
||||
public class Bone : Item, ICommodity
|
||||
{
|
||||
int ICommodity.DescriptionNumber => LabelNumber;
|
||||
bool ICommodity.IsDeedable => true;
|
||||
public class Bone : Item, ICommodity
|
||||
{
|
||||
[Constructible]
|
||||
public Bone() : this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public Bone() : this( 1 )
|
||||
{
|
||||
}
|
||||
[Constructible]
|
||||
public Bone(int amount) : base(0xf7e)
|
||||
{
|
||||
Stackable = true;
|
||||
Amount = amount;
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public Bone( int amount ) : base( 0xf7e )
|
||||
{
|
||||
Stackable = true;
|
||||
Amount = amount;
|
||||
Weight = 1.0;
|
||||
}
|
||||
public Bone(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public Bone( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
int ICommodity.DescriptionNumber => LabelNumber;
|
||||
bool ICommodity.IsDeedable => true;
|
||||
|
||||
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -2,68 +2,67 @@ using Server.Network;
|
|||
|
||||
namespace Server.Items
|
||||
{
|
||||
[FlippableAttribute( 0x1766, 0x1768 )]
|
||||
public class Cloth : Item, IScissorable, IDyable, ICommodity
|
||||
{
|
||||
int ICommodity.DescriptionNumber => LabelNumber;
|
||||
bool ICommodity.IsDeedable => true;
|
||||
[Flippable(0x1766, 0x1768)]
|
||||
public class Cloth : Item, IScissorable, IDyable, ICommodity
|
||||
{
|
||||
[Constructible]
|
||||
public Cloth() : this(1)
|
||||
{
|
||||
}
|
||||
|
||||
public override double DefaultWeight => 0.1;
|
||||
[Constructible]
|
||||
public Cloth(int amount) : base(0x1766)
|
||||
{
|
||||
Stackable = true;
|
||||
Amount = amount;
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public Cloth() : this( 1 )
|
||||
{
|
||||
}
|
||||
public Cloth(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public Cloth( int amount ) : base( 0x1766 )
|
||||
{
|
||||
Stackable = true;
|
||||
Amount = amount;
|
||||
}
|
||||
public override double DefaultWeight => 0.1;
|
||||
int ICommodity.DescriptionNumber => LabelNumber;
|
||||
bool ICommodity.IsDeedable => true;
|
||||
|
||||
public Cloth( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
public bool Dye(Mobile from, DyeTub sender)
|
||||
{
|
||||
if (Deleted)
|
||||
return false;
|
||||
|
||||
public bool Dye( Mobile from, DyeTub sender )
|
||||
{
|
||||
if ( Deleted )
|
||||
return false;
|
||||
Hue = sender.DyedHue;
|
||||
|
||||
Hue = sender.DyedHue;
|
||||
return true;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
public bool Scissor(Mobile from, Scissors scissors)
|
||||
{
|
||||
if (Deleted || !from.CanSee(this)) return false;
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
base.ScissorHelper(from, new Bandage(), 1);
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void OnSingleClick( Mobile from )
|
||||
{
|
||||
int number = (Amount == 1) ? 1049124 : 1049123;
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
from.Send( new MessageLocalized( Serial, ItemID, MessageType.Regular, 0x3B2, 3, number, "", Amount.ToString() ) );
|
||||
}
|
||||
|
||||
public bool Scissor( Mobile from, Scissors scissors )
|
||||
{
|
||||
if ( Deleted || !from.CanSee( this ) ) return false;
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
|
||||
base.ScissorHelper( from, new Bandage(), 1 );
|
||||
public override void OnSingleClick(Mobile from)
|
||||
{
|
||||
int number = Amount == 1 ? 1049124 : 1049123;
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
from.Send(new MessageLocalized(Serial, ItemID, MessageType.Regular, 0x3B2, 3, number, "", Amount.ToString()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -2,110 +2,111 @@ using Server.Targeting;
|
|||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class Cotton : Item, IDyable
|
||||
{
|
||||
[Constructible]
|
||||
public Cotton() : this( 1 )
|
||||
{
|
||||
}
|
||||
public class Cotton : Item, IDyable
|
||||
{
|
||||
[Constructible]
|
||||
public Cotton() : this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public Cotton( int amount ) : base( 0xDF9 )
|
||||
{
|
||||
Stackable = true;
|
||||
Weight = 4.0;
|
||||
Amount = amount;
|
||||
}
|
||||
[Constructible]
|
||||
public Cotton(int amount) : base(0xDF9)
|
||||
{
|
||||
Stackable = true;
|
||||
Weight = 4.0;
|
||||
Amount = amount;
|
||||
}
|
||||
|
||||
public Cotton( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
public Cotton(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
public bool Dye(Mobile from, DyeTub sender)
|
||||
{
|
||||
if (Deleted)
|
||||
return false;
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
Hue = sender.DyedHue;
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
return true;
|
||||
}
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
public bool Dye( Mobile from, DyeTub sender )
|
||||
{
|
||||
if ( Deleted )
|
||||
return false;
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
Hue = sender.DyedHue;
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
public override void OnDoubleClick( Mobile from )
|
||||
{
|
||||
if ( IsChildOf( from.Backpack ) )
|
||||
{
|
||||
from.SendLocalizedMessage( 502655 ); // What spinning wheel do you wish to spin this on?
|
||||
from.Target = new PickWheelTarget( this );
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it.
|
||||
}
|
||||
}
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
|
||||
public virtual void OnSpun( ISpinningWheel wheel, Mobile from, int hue )
|
||||
{
|
||||
Item item = new SpoolOfThread( 6 );
|
||||
item.Hue = hue;
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (IsChildOf(from.Backpack))
|
||||
{
|
||||
from.SendLocalizedMessage(502655); // What spinning wheel do you wish to spin this on?
|
||||
from.Target = new PickWheelTarget(this);
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it.
|
||||
}
|
||||
}
|
||||
|
||||
from.AddToBackpack( item );
|
||||
from.SendLocalizedMessage( 1010577 ); // You put the spools of thread in your backpack.
|
||||
}
|
||||
public virtual void OnSpun(ISpinningWheel wheel, Mobile from, int hue)
|
||||
{
|
||||
Item item = new SpoolOfThread(6);
|
||||
item.Hue = hue;
|
||||
|
||||
private class PickWheelTarget : Target
|
||||
{
|
||||
private Cotton m_Cotton;
|
||||
from.AddToBackpack(item);
|
||||
from.SendLocalizedMessage(1010577); // You put the spools of thread in your backpack.
|
||||
}
|
||||
|
||||
public PickWheelTarget( Cotton cotton ) : base( 3, false, TargetFlags.None )
|
||||
{
|
||||
m_Cotton = cotton;
|
||||
}
|
||||
private class PickWheelTarget : Target
|
||||
{
|
||||
private Cotton m_Cotton;
|
||||
|
||||
protected override void OnTarget( Mobile from, object targeted )
|
||||
{
|
||||
if ( m_Cotton.Deleted )
|
||||
return;
|
||||
public PickWheelTarget(Cotton cotton) : base(3, false, TargetFlags.None)
|
||||
{
|
||||
m_Cotton = cotton;
|
||||
}
|
||||
|
||||
ISpinningWheel wheel = targeted as ISpinningWheel;
|
||||
protected override void OnTarget(Mobile from, object targeted)
|
||||
{
|
||||
if (m_Cotton.Deleted)
|
||||
return;
|
||||
|
||||
if ( wheel == null && targeted is AddonComponent component )
|
||||
wheel = component.Addon as ISpinningWheel;
|
||||
ISpinningWheel wheel = targeted as ISpinningWheel;
|
||||
|
||||
if ( wheel is Item )
|
||||
{
|
||||
if ( !m_Cotton.IsChildOf( from.Backpack ) )
|
||||
{
|
||||
from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it.
|
||||
}
|
||||
else if ( wheel.Spinning )
|
||||
{
|
||||
from.SendLocalizedMessage( 502656 ); // That spinning wheel is being used.
|
||||
}
|
||||
else
|
||||
{
|
||||
m_Cotton.Consume();
|
||||
wheel.BeginSpin( m_Cotton.OnSpun, from, m_Cotton.Hue );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage( 502658 ); // Use that on a spinning wheel.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (wheel == null && targeted is AddonComponent component)
|
||||
wheel = component.Addon as ISpinningWheel;
|
||||
|
||||
if (wheel is Item)
|
||||
{
|
||||
if (!m_Cotton.IsChildOf(from.Backpack))
|
||||
{
|
||||
from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it.
|
||||
}
|
||||
else if (wheel.Spinning)
|
||||
{
|
||||
from.SendLocalizedMessage(502656); // That spinning wheel is being used.
|
||||
}
|
||||
else
|
||||
{
|
||||
m_Cotton.Consume();
|
||||
wheel.BeginSpin(m_Cotton.OnSpun, from, m_Cotton.Hue);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(502658); // Use that on a spinning wheel.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -2,100 +2,101 @@ using Server.Targeting;
|
|||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class Flax : Item
|
||||
{
|
||||
[Constructible]
|
||||
public Flax() : this( 1 )
|
||||
{
|
||||
}
|
||||
public class Flax : Item
|
||||
{
|
||||
[Constructible]
|
||||
public Flax() : this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public Flax( int amount ) : base( 0x1A9C )
|
||||
{
|
||||
Stackable = true;
|
||||
Weight = 1.0;
|
||||
Amount = amount;
|
||||
}
|
||||
[Constructible]
|
||||
public Flax(int amount) : base(0x1A9C)
|
||||
{
|
||||
Stackable = true;
|
||||
Weight = 1.0;
|
||||
Amount = amount;
|
||||
}
|
||||
|
||||
public Flax( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
public Flax(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
public override void OnDoubleClick( Mobile from )
|
||||
{
|
||||
if ( IsChildOf( from.Backpack ) )
|
||||
{
|
||||
from.SendLocalizedMessage( 502655 ); // What spinning wheel do you wish to spin this on?
|
||||
from.Target = new PickWheelTarget( this );
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it.
|
||||
}
|
||||
}
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
|
||||
public virtual void OnSpun( ISpinningWheel wheel, Mobile from, int hue )
|
||||
{
|
||||
Item item = new SpoolOfThread( 6 );
|
||||
item.Hue = hue;
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (IsChildOf(from.Backpack))
|
||||
{
|
||||
from.SendLocalizedMessage(502655); // What spinning wheel do you wish to spin this on?
|
||||
from.Target = new PickWheelTarget(this);
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it.
|
||||
}
|
||||
}
|
||||
|
||||
from.AddToBackpack( item );
|
||||
from.SendLocalizedMessage( 1010577 ); // You put the spools of thread in your backpack.
|
||||
}
|
||||
public virtual void OnSpun(ISpinningWheel wheel, Mobile from, int hue)
|
||||
{
|
||||
Item item = new SpoolOfThread(6);
|
||||
item.Hue = hue;
|
||||
|
||||
private class PickWheelTarget : Target
|
||||
{
|
||||
private Flax m_Flax;
|
||||
from.AddToBackpack(item);
|
||||
from.SendLocalizedMessage(1010577); // You put the spools of thread in your backpack.
|
||||
}
|
||||
|
||||
public PickWheelTarget( Flax flax ) : base( 3, false, TargetFlags.None )
|
||||
{
|
||||
m_Flax = flax;
|
||||
}
|
||||
private class PickWheelTarget : Target
|
||||
{
|
||||
private Flax m_Flax;
|
||||
|
||||
protected override void OnTarget( Mobile from, object targeted )
|
||||
{
|
||||
if ( m_Flax.Deleted )
|
||||
return;
|
||||
public PickWheelTarget(Flax flax) : base(3, false, TargetFlags.None)
|
||||
{
|
||||
m_Flax = flax;
|
||||
}
|
||||
|
||||
ISpinningWheel wheel = targeted as ISpinningWheel;
|
||||
protected override void OnTarget(Mobile from, object targeted)
|
||||
{
|
||||
if (m_Flax.Deleted)
|
||||
return;
|
||||
|
||||
if ( wheel == null && targeted is AddonComponent component )
|
||||
wheel = component.Addon as ISpinningWheel;
|
||||
ISpinningWheel wheel = targeted as ISpinningWheel;
|
||||
|
||||
if ( wheel is Item )
|
||||
{
|
||||
if ( !m_Flax.IsChildOf( from.Backpack ) )
|
||||
{
|
||||
from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it.
|
||||
}
|
||||
else if ( wheel.Spinning )
|
||||
{
|
||||
from.SendLocalizedMessage( 502656 ); // That spinning wheel is being used.
|
||||
}
|
||||
else
|
||||
{
|
||||
m_Flax.Consume();
|
||||
wheel.BeginSpin( m_Flax.OnSpun, from, m_Flax.Hue );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage( 502658 ); // Use that on a spinning wheel.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (wheel == null && targeted is AddonComponent component)
|
||||
wheel = component.Addon as ISpinningWheel;
|
||||
|
||||
if (wheel is Item)
|
||||
{
|
||||
if (!m_Flax.IsChildOf(from.Backpack))
|
||||
{
|
||||
from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it.
|
||||
}
|
||||
else if (wheel.Spinning)
|
||||
{
|
||||
from.SendLocalizedMessage(502656); // That spinning wheel is being used.
|
||||
}
|
||||
else
|
||||
{
|
||||
m_Flax.Consume();
|
||||
wheel.BeginSpin(m_Flax.OnSpun, from, m_Flax.Hue);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(502658); // Use that on a spinning wheel.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,288 +1,293 @@
|
|||
namespace Server.Items
|
||||
{
|
||||
public abstract class BaseHides : Item, ICommodity
|
||||
{
|
||||
private CraftResource m_Resource;
|
||||
public abstract class BaseHides : Item, ICommodity
|
||||
{
|
||||
private CraftResource m_Resource;
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public CraftResource Resource
|
||||
{
|
||||
get => m_Resource;
|
||||
set{ m_Resource = value; InvalidateProperties(); }
|
||||
}
|
||||
|
||||
int ICommodity.DescriptionNumber => LabelNumber;
|
||||
bool ICommodity.IsDeedable => true;
|
||||
public BaseHides(CraftResource resource) : this(resource, 1)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
public BaseHides(CraftResource resource, int amount) : base(0x1079)
|
||||
{
|
||||
Stackable = true;
|
||||
Weight = 5.0;
|
||||
Amount = amount;
|
||||
Hue = CraftResources.GetHue(resource);
|
||||
|
||||
writer.Write( (int) 1 ); // version
|
||||
m_Resource = resource;
|
||||
}
|
||||
|
||||
writer.Write( (int) m_Resource );
|
||||
}
|
||||
public BaseHides(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public CraftResource Resource
|
||||
{
|
||||
get => m_Resource;
|
||||
set
|
||||
{
|
||||
m_Resource = value;
|
||||
InvalidateProperties();
|
||||
}
|
||||
}
|
||||
|
||||
int version = reader.ReadInt();
|
||||
public override int LabelNumber
|
||||
{
|
||||
get
|
||||
{
|
||||
if (m_Resource >= CraftResource.SpinedLeather && m_Resource <= CraftResource.BarbedLeather)
|
||||
return 1049687 + (m_Resource - CraftResource.SpinedLeather);
|
||||
|
||||
switch ( version )
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
m_Resource = (CraftResource)reader.ReadInt();
|
||||
break;
|
||||
}
|
||||
case 0:
|
||||
{
|
||||
OreInfo info = new OreInfo( reader.ReadInt(), reader.ReadInt(), reader.ReadString() );
|
||||
return 1047023;
|
||||
}
|
||||
}
|
||||
|
||||
m_Resource = CraftResources.GetFromOreInfo( info );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
int ICommodity.DescriptionNumber => LabelNumber;
|
||||
bool ICommodity.IsDeedable => true;
|
||||
|
||||
public BaseHides( CraftResource resource ) : this( resource, 1 )
|
||||
{
|
||||
}
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
public BaseHides( CraftResource resource, int amount ) : base( 0x1079 )
|
||||
{
|
||||
Stackable = true;
|
||||
Weight = 5.0;
|
||||
Amount = amount;
|
||||
Hue = CraftResources.GetHue( resource );
|
||||
writer.Write(1); // version
|
||||
|
||||
m_Resource = resource;
|
||||
}
|
||||
writer.Write((int)m_Resource);
|
||||
}
|
||||
|
||||
public BaseHides( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
public override void AddNameProperty( ObjectPropertyList list )
|
||||
{
|
||||
if ( Amount > 1 )
|
||||
list.Add( 1050039, "{0}\t#{1}", Amount, 1024216 ); // ~1_NUMBER~ ~2_ITEMNAME~
|
||||
else
|
||||
list.Add( 1024216 ); // pile of hides
|
||||
}
|
||||
int version = reader.ReadInt();
|
||||
|
||||
public override void GetProperties( ObjectPropertyList list )
|
||||
{
|
||||
base.GetProperties( list );
|
||||
switch (version)
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
m_Resource = (CraftResource)reader.ReadInt();
|
||||
break;
|
||||
}
|
||||
case 0:
|
||||
{
|
||||
OreInfo info = new OreInfo(reader.ReadInt(), reader.ReadInt(), reader.ReadString());
|
||||
|
||||
if ( !CraftResources.IsStandard( m_Resource ) )
|
||||
{
|
||||
int num = CraftResources.GetLocalizationNumber( m_Resource );
|
||||
m_Resource = CraftResources.GetFromOreInfo(info);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( num > 0 )
|
||||
list.Add( num );
|
||||
else
|
||||
list.Add( CraftResources.GetName( m_Resource ) );
|
||||
}
|
||||
}
|
||||
public override void AddNameProperty(ObjectPropertyList list)
|
||||
{
|
||||
if (Amount > 1)
|
||||
list.Add(1050039, "{0}\t#{1}", Amount, 1024216); // ~1_NUMBER~ ~2_ITEMNAME~
|
||||
else
|
||||
list.Add(1024216); // pile of hides
|
||||
}
|
||||
|
||||
public override int LabelNumber
|
||||
{
|
||||
get
|
||||
{
|
||||
if ( m_Resource >= CraftResource.SpinedLeather && m_Resource <= CraftResource.BarbedLeather )
|
||||
return 1049687 + (int)(m_Resource - CraftResource.SpinedLeather);
|
||||
public override void GetProperties(ObjectPropertyList list)
|
||||
{
|
||||
base.GetProperties(list);
|
||||
|
||||
return 1047023;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!CraftResources.IsStandard(m_Resource))
|
||||
{
|
||||
int num = CraftResources.GetLocalizationNumber(m_Resource);
|
||||
|
||||
[FlippableAttribute( 0x1079, 0x1078 )]
|
||||
public class Hides : BaseHides, IScissorable
|
||||
{
|
||||
[Constructible]
|
||||
public Hides() : this( 1 )
|
||||
{
|
||||
}
|
||||
if (num > 0)
|
||||
list.Add(num);
|
||||
else
|
||||
list.Add(CraftResources.GetName(m_Resource));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public Hides( int amount ) : base( CraftResource.RegularLeather, amount )
|
||||
{
|
||||
}
|
||||
[Flippable(0x1079, 0x1078)]
|
||||
public class Hides : BaseHides, IScissorable
|
||||
{
|
||||
[Constructible]
|
||||
public Hides() : this(1)
|
||||
{
|
||||
}
|
||||
|
||||
public Hides( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
[Constructible]
|
||||
public Hides(int amount) : base(CraftResource.RegularLeather, amount)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
public Hides(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
public bool Scissor(Mobile from, Scissors scissors)
|
||||
{
|
||||
if (Deleted || !from.CanSee(this)) return false;
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
if (Core.AOS && !IsChildOf(from.Backpack))
|
||||
{
|
||||
from.SendLocalizedMessage(502437); // Items you wish to cut must be in your backpack
|
||||
return false;
|
||||
}
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
base.ScissorHelper(from, new Leather(), 1);
|
||||
|
||||
public bool Scissor( Mobile from, Scissors scissors )
|
||||
{
|
||||
if ( Deleted || !from.CanSee( this ) ) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
if ( Core.AOS && !IsChildOf ( from.Backpack ) )
|
||||
{
|
||||
from.SendLocalizedMessage ( 502437 ); // Items you wish to cut must be in your backpack
|
||||
return false;
|
||||
}
|
||||
base.ScissorHelper( from, new Leather(), 1 );
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
[FlippableAttribute( 0x1079, 0x1078 )]
|
||||
public class SpinedHides : BaseHides, IScissorable
|
||||
{
|
||||
[Constructible]
|
||||
public SpinedHides() : this( 1 )
|
||||
{
|
||||
}
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
[Constructible]
|
||||
public SpinedHides( int amount ) : base( CraftResource.SpinedLeather, amount )
|
||||
{
|
||||
}
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
public SpinedHides( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
[Flippable(0x1079, 0x1078)]
|
||||
public class SpinedHides : BaseHides, IScissorable
|
||||
{
|
||||
[Constructible]
|
||||
public SpinedHides() : this(1)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
[Constructible]
|
||||
public SpinedHides(int amount) : base(CraftResource.SpinedLeather, amount)
|
||||
{
|
||||
}
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
public SpinedHides(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
public bool Scissor(Mobile from, Scissors scissors)
|
||||
{
|
||||
if (Deleted || !from.CanSee(this)) return false;
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
if (Core.AOS && !IsChildOf(from.Backpack))
|
||||
{
|
||||
from.SendLocalizedMessage(502437); // Items you wish to cut must be in your backpack
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool Scissor( Mobile from, Scissors scissors )
|
||||
{
|
||||
if ( Deleted || !from.CanSee( this ) ) return false;
|
||||
base.ScissorHelper(from, new SpinedLeather(), 1);
|
||||
|
||||
if ( Core.AOS && !IsChildOf ( from.Backpack ) )
|
||||
{
|
||||
from.SendLocalizedMessage ( 502437 ); // Items you wish to cut must be in your backpack
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
base.ScissorHelper( from, new SpinedLeather(), 1 );
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
[FlippableAttribute( 0x1079, 0x1078 )]
|
||||
public class HornedHides : BaseHides, IScissorable
|
||||
{
|
||||
[Constructible]
|
||||
public HornedHides() : this( 1 )
|
||||
{
|
||||
}
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
[Constructible]
|
||||
public HornedHides( int amount ) : base( CraftResource.HornedLeather, amount )
|
||||
{
|
||||
}
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
public HornedHides( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
[Flippable(0x1079, 0x1078)]
|
||||
public class HornedHides : BaseHides, IScissorable
|
||||
{
|
||||
[Constructible]
|
||||
public HornedHides() : this(1)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
[Constructible]
|
||||
public HornedHides(int amount) : base(CraftResource.HornedLeather, amount)
|
||||
{
|
||||
}
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
public HornedHides(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
public bool Scissor(Mobile from, Scissors scissors)
|
||||
{
|
||||
if (Deleted || !from.CanSee(this)) return false;
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
if (Core.AOS && !IsChildOf(from.Backpack))
|
||||
{
|
||||
from.SendLocalizedMessage(502437); // Items you wish to cut must be in your backpack
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool Scissor( Mobile from, Scissors scissors )
|
||||
{
|
||||
if ( Deleted || !from.CanSee( this ) ) return false;
|
||||
base.ScissorHelper(from, new HornedLeather(), 1);
|
||||
|
||||
if ( Core.AOS && !IsChildOf ( from.Backpack ) )
|
||||
{
|
||||
from.SendLocalizedMessage ( 502437 ); // Items you wish to cut must be in your backpack
|
||||
return false;
|
||||
}
|
||||
|
||||
base.ScissorHelper( from, new HornedLeather(), 1 );
|
||||
return true;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
[FlippableAttribute( 0x1079, 0x1078 )]
|
||||
public class BarbedHides : BaseHides, IScissorable
|
||||
{
|
||||
[Constructible]
|
||||
public BarbedHides() : this( 1 )
|
||||
{
|
||||
}
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public BarbedHides( int amount ) : base( CraftResource.BarbedLeather, amount )
|
||||
{
|
||||
}
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
public BarbedHides( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
[Flippable(0x1079, 0x1078)]
|
||||
public class BarbedHides : BaseHides, IScissorable
|
||||
{
|
||||
[Constructible]
|
||||
public BarbedHides() : this(1)
|
||||
{
|
||||
}
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
[Constructible]
|
||||
public BarbedHides(int amount) : base(CraftResource.BarbedLeather, amount)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
public BarbedHides(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
public bool Scissor(Mobile from, Scissors scissors)
|
||||
{
|
||||
if (Deleted || !from.CanSee(this)) return false;
|
||||
|
||||
public bool Scissor( Mobile from, Scissors scissors )
|
||||
{
|
||||
if ( Deleted || !from.CanSee( this ) ) return false;
|
||||
if (Core.AOS && !IsChildOf(from.Backpack))
|
||||
{
|
||||
from.SendLocalizedMessage(502437); // Items you wish to cut must be in your backpack
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( Core.AOS && !IsChildOf ( from.Backpack ) )
|
||||
{
|
||||
from.SendLocalizedMessage ( 502437 ); // Items you wish to cut must be in your backpack
|
||||
return false;
|
||||
}
|
||||
base.ScissorHelper(from, new BarbedLeather(), 1);
|
||||
|
||||
base.ScissorHelper( from, new BarbedLeather(), 1 );
|
||||
return true;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,237 +1,233 @@
|
|||
namespace Server.Items
|
||||
{
|
||||
public abstract class BaseLeather : Item, ICommodity
|
||||
{
|
||||
private CraftResource m_Resource;
|
||||
public abstract class BaseLeather : Item, ICommodity
|
||||
{
|
||||
private CraftResource m_Resource;
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public CraftResource Resource
|
||||
{
|
||||
get => m_Resource;
|
||||
set{ m_Resource = value; InvalidateProperties(); }
|
||||
}
|
||||
|
||||
int ICommodity.DescriptionNumber => LabelNumber;
|
||||
bool ICommodity.IsDeedable => true;
|
||||
public BaseLeather(CraftResource resource) : this(resource, 1)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
public BaseLeather(CraftResource resource, int amount) : base(0x1081)
|
||||
{
|
||||
Stackable = true;
|
||||
Weight = 1.0;
|
||||
Amount = amount;
|
||||
Hue = CraftResources.GetHue(resource);
|
||||
|
||||
writer.Write( (int) 1 ); // version
|
||||
m_Resource = resource;
|
||||
}
|
||||
|
||||
writer.Write( (int) m_Resource );
|
||||
}
|
||||
public BaseLeather(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public CraftResource Resource
|
||||
{
|
||||
get => m_Resource;
|
||||
set
|
||||
{
|
||||
m_Resource = value;
|
||||
InvalidateProperties();
|
||||
}
|
||||
}
|
||||
|
||||
int version = reader.ReadInt();
|
||||
public override int LabelNumber
|
||||
{
|
||||
get
|
||||
{
|
||||
if (m_Resource >= CraftResource.SpinedLeather && m_Resource <= CraftResource.BarbedLeather)
|
||||
return 1049684 + (m_Resource - CraftResource.SpinedLeather);
|
||||
|
||||
switch ( version )
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
m_Resource = (CraftResource)reader.ReadInt();
|
||||
break;
|
||||
}
|
||||
case 0:
|
||||
{
|
||||
OreInfo info = new OreInfo( reader.ReadInt(), reader.ReadInt(), reader.ReadString() );
|
||||
return 1047022;
|
||||
}
|
||||
}
|
||||
|
||||
m_Resource = CraftResources.GetFromOreInfo( info );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
int ICommodity.DescriptionNumber => LabelNumber;
|
||||
bool ICommodity.IsDeedable => true;
|
||||
|
||||
public BaseLeather( CraftResource resource ) : this( resource, 1 )
|
||||
{
|
||||
}
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
public BaseLeather( CraftResource resource, int amount ) : base( 0x1081 )
|
||||
{
|
||||
Stackable = true;
|
||||
Weight = 1.0;
|
||||
Amount = amount;
|
||||
Hue = CraftResources.GetHue( resource );
|
||||
writer.Write(1); // version
|
||||
|
||||
m_Resource = resource;
|
||||
}
|
||||
writer.Write((int)m_Resource);
|
||||
}
|
||||
|
||||
public BaseLeather( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
public override void AddNameProperty( ObjectPropertyList list )
|
||||
{
|
||||
if ( Amount > 1 )
|
||||
list.Add( 1050039, "{0}\t#{1}", Amount, 1024199 ); // ~1_NUMBER~ ~2_ITEMNAME~
|
||||
else
|
||||
list.Add( 1024199 ); // cut leather
|
||||
}
|
||||
int version = reader.ReadInt();
|
||||
|
||||
public override void GetProperties( ObjectPropertyList list )
|
||||
{
|
||||
base.GetProperties( list );
|
||||
switch (version)
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
m_Resource = (CraftResource)reader.ReadInt();
|
||||
break;
|
||||
}
|
||||
case 0:
|
||||
{
|
||||
OreInfo info = new OreInfo(reader.ReadInt(), reader.ReadInt(), reader.ReadString());
|
||||
|
||||
if ( !CraftResources.IsStandard( m_Resource ) )
|
||||
{
|
||||
int num = CraftResources.GetLocalizationNumber( m_Resource );
|
||||
m_Resource = CraftResources.GetFromOreInfo(info);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( num > 0 )
|
||||
list.Add( num );
|
||||
else
|
||||
list.Add( CraftResources.GetName( m_Resource ) );
|
||||
}
|
||||
}
|
||||
public override void AddNameProperty(ObjectPropertyList list)
|
||||
{
|
||||
if (Amount > 1)
|
||||
list.Add(1050039, "{0}\t#{1}", Amount, 1024199); // ~1_NUMBER~ ~2_ITEMNAME~
|
||||
else
|
||||
list.Add(1024199); // cut leather
|
||||
}
|
||||
|
||||
public override int LabelNumber
|
||||
{
|
||||
get
|
||||
{
|
||||
if ( m_Resource >= CraftResource.SpinedLeather && m_Resource <= CraftResource.BarbedLeather )
|
||||
return 1049684 + (int)(m_Resource - CraftResource.SpinedLeather);
|
||||
public override void GetProperties(ObjectPropertyList list)
|
||||
{
|
||||
base.GetProperties(list);
|
||||
|
||||
return 1047022;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!CraftResources.IsStandard(m_Resource))
|
||||
{
|
||||
int num = CraftResources.GetLocalizationNumber(m_Resource);
|
||||
|
||||
[FlippableAttribute( 0x1081, 0x1082 )]
|
||||
public class Leather : BaseLeather
|
||||
{
|
||||
[Constructible]
|
||||
public Leather() : this( 1 )
|
||||
{
|
||||
}
|
||||
if (num > 0)
|
||||
list.Add(num);
|
||||
else
|
||||
list.Add(CraftResources.GetName(m_Resource));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public Leather( int amount ) : base( CraftResource.RegularLeather, amount )
|
||||
{
|
||||
}
|
||||
[Flippable(0x1081, 0x1082)]
|
||||
public class Leather : BaseLeather
|
||||
{
|
||||
[Constructible]
|
||||
public Leather() : this(1)
|
||||
{
|
||||
}
|
||||
|
||||
public Leather( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
[Constructible]
|
||||
public Leather(int amount) : base(CraftResource.RegularLeather, amount)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
public Leather(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
|
||||
}
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
[FlippableAttribute( 0x1081, 0x1082 )]
|
||||
public class SpinedLeather : BaseLeather
|
||||
{
|
||||
[Constructible]
|
||||
public SpinedLeather() : this( 1 )
|
||||
{
|
||||
}
|
||||
[Flippable(0x1081, 0x1082)]
|
||||
public class SpinedLeather : BaseLeather
|
||||
{
|
||||
[Constructible]
|
||||
public SpinedLeather() : this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public SpinedLeather( int amount ) : base( CraftResource.SpinedLeather, amount )
|
||||
{
|
||||
}
|
||||
[Constructible]
|
||||
public SpinedLeather(int amount) : base(CraftResource.SpinedLeather, amount)
|
||||
{
|
||||
}
|
||||
|
||||
public SpinedLeather( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
public SpinedLeather(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
[Flippable(0x1081, 0x1082)]
|
||||
public class HornedLeather : BaseLeather
|
||||
{
|
||||
[Constructible]
|
||||
public HornedLeather() : this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[FlippableAttribute( 0x1081, 0x1082 )]
|
||||
public class HornedLeather : BaseLeather
|
||||
{
|
||||
[Constructible]
|
||||
public HornedLeather() : this( 1 )
|
||||
{
|
||||
}
|
||||
[Constructible]
|
||||
public HornedLeather(int amount) : base(CraftResource.HornedLeather, amount)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public HornedLeather( int amount ) : base( CraftResource.HornedLeather, amount )
|
||||
{
|
||||
}
|
||||
public HornedLeather(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public HornedLeather( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
writer.Write( (int) 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();
|
||||
}
|
||||
[Flippable(0x1081, 0x1082)]
|
||||
public class BarbedLeather : BaseLeather
|
||||
{
|
||||
[Constructible]
|
||||
public BarbedLeather() : this(1)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
[Constructible]
|
||||
public BarbedLeather(int amount) : base(CraftResource.BarbedLeather, amount)
|
||||
{
|
||||
}
|
||||
|
||||
[FlippableAttribute( 0x1081, 0x1082 )]
|
||||
public class BarbedLeather : BaseLeather
|
||||
{
|
||||
[Constructible]
|
||||
public BarbedLeather() : this( 1 )
|
||||
{
|
||||
}
|
||||
public BarbedLeather(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public BarbedLeather( int amount ) : base( CraftResource.BarbedLeather, amount )
|
||||
{
|
||||
}
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
public BarbedLeather( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -2,67 +2,67 @@ using Server.Network;
|
|||
|
||||
namespace Server.Items
|
||||
{
|
||||
[FlippableAttribute( 0x1765, 0x1767 )]
|
||||
public class UncutCloth : Item, IScissorable, IDyable, ICommodity
|
||||
{
|
||||
int ICommodity.DescriptionNumber => LabelNumber;
|
||||
bool ICommodity.IsDeedable => true;
|
||||
[Flippable(0x1765, 0x1767)]
|
||||
public class UncutCloth : Item, IScissorable, IDyable, ICommodity
|
||||
{
|
||||
[Constructible]
|
||||
public UncutCloth() : this(1)
|
||||
{
|
||||
}
|
||||
|
||||
public override double DefaultWeight => 0.1;
|
||||
[Constructible]
|
||||
public UncutCloth(int amount) : base(0x1767)
|
||||
{
|
||||
Stackable = true;
|
||||
Amount = amount;
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public UncutCloth() : this( 1 )
|
||||
{
|
||||
}
|
||||
public UncutCloth(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public UncutCloth( int amount ) : base( 0x1767 )
|
||||
{
|
||||
Stackable = true;
|
||||
Amount = amount;
|
||||
}
|
||||
public override double DefaultWeight => 0.1;
|
||||
int ICommodity.DescriptionNumber => LabelNumber;
|
||||
bool ICommodity.IsDeedable => true;
|
||||
|
||||
public UncutCloth( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
public bool Dye(Mobile from, DyeTub sender)
|
||||
{
|
||||
if (Deleted)
|
||||
return false;
|
||||
|
||||
public bool Dye( Mobile from, DyeTub sender )
|
||||
{
|
||||
if ( Deleted )
|
||||
return false;
|
||||
Hue = sender.DyedHue;
|
||||
|
||||
Hue = sender.DyedHue;
|
||||
return true;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
public bool Scissor(Mobile from, Scissors scissors)
|
||||
{
|
||||
if (Deleted || !from.CanSee(this)) return false;
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
base.ScissorHelper(from, new Bandage(), 1);
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void OnSingleClick( Mobile from )
|
||||
{
|
||||
int number = (Amount == 1) ? 1049124 : 1049123;
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
from.Send( new MessageLocalized( Serial, ItemID, MessageType.Regular, 0x3B2, 3, number, "", Amount.ToString() ) );
|
||||
}
|
||||
public bool Scissor( Mobile from, Scissors scissors )
|
||||
{
|
||||
if ( Deleted || !from.CanSee( this ) ) return false;
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
|
||||
base.ScissorHelper( from, new Bandage(), 1 );
|
||||
public override void OnSingleClick(Mobile from)
|
||||
{
|
||||
int number = Amount == 1 ? 1049124 : 1049123;
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
from.Send(new MessageLocalized(Serial, ItemID, MessageType.Regular, 0x3B2, 3, number, "", Amount.ToString()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -2,152 +2,154 @@ using Server.Targeting;
|
|||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class Wool : Item, IDyable
|
||||
{
|
||||
[Constructible]
|
||||
public Wool() : this( 1 )
|
||||
{
|
||||
}
|
||||
public class Wool : Item, IDyable
|
||||
{
|
||||
[Constructible]
|
||||
public Wool() : this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public Wool( int amount ) : base( 0xDF8 )
|
||||
{
|
||||
Stackable = true;
|
||||
Weight = 4.0;
|
||||
Amount = amount;
|
||||
}
|
||||
[Constructible]
|
||||
public Wool(int amount) : base(0xDF8)
|
||||
{
|
||||
Stackable = true;
|
||||
Weight = 4.0;
|
||||
Amount = amount;
|
||||
}
|
||||
|
||||
public Wool( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
public Wool(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
public bool Dye(Mobile from, DyeTub sender)
|
||||
{
|
||||
if (Deleted)
|
||||
return false;
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
Hue = sender.DyedHue;
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
return true;
|
||||
}
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
public bool Dye( Mobile from, DyeTub sender )
|
||||
{
|
||||
if ( Deleted )
|
||||
return false;
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
Hue = sender.DyedHue;
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
public override void OnDoubleClick( Mobile from )
|
||||
{
|
||||
if ( IsChildOf( from.Backpack ) )
|
||||
{
|
||||
from.SendLocalizedMessage( 502655 ); // What spinning wheel do you wish to spin this on?
|
||||
from.Target = new PickWheelTarget( this );
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it.
|
||||
}
|
||||
}
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
|
||||
public virtual void OnSpun( ISpinningWheel wheel, Mobile from, int hue )
|
||||
{
|
||||
Item item = new DarkYarn( 3 );
|
||||
item.Hue = hue;
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (IsChildOf(from.Backpack))
|
||||
{
|
||||
from.SendLocalizedMessage(502655); // What spinning wheel do you wish to spin this on?
|
||||
from.Target = new PickWheelTarget(this);
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it.
|
||||
}
|
||||
}
|
||||
|
||||
from.AddToBackpack( item );
|
||||
from.SendLocalizedMessage( 1010576 ); // You put the balls of yarn in your backpack.
|
||||
}
|
||||
public virtual void OnSpun(ISpinningWheel wheel, Mobile from, int hue)
|
||||
{
|
||||
Item item = new DarkYarn(3);
|
||||
item.Hue = hue;
|
||||
|
||||
private class PickWheelTarget : Target
|
||||
{
|
||||
private Wool m_Wool;
|
||||
from.AddToBackpack(item);
|
||||
from.SendLocalizedMessage(1010576); // You put the balls of yarn in your backpack.
|
||||
}
|
||||
|
||||
public PickWheelTarget( Wool wool ) : base( 3, false, TargetFlags.None )
|
||||
{
|
||||
m_Wool = wool;
|
||||
}
|
||||
private class PickWheelTarget : Target
|
||||
{
|
||||
private Wool m_Wool;
|
||||
|
||||
protected override void OnTarget( Mobile from, object targeted )
|
||||
{
|
||||
if ( m_Wool.Deleted )
|
||||
return;
|
||||
public PickWheelTarget(Wool wool) : base(3, false, TargetFlags.None)
|
||||
{
|
||||
m_Wool = wool;
|
||||
}
|
||||
|
||||
ISpinningWheel wheel = targeted as ISpinningWheel;
|
||||
protected override void OnTarget(Mobile from, object targeted)
|
||||
{
|
||||
if (m_Wool.Deleted)
|
||||
return;
|
||||
|
||||
if ( wheel == null && targeted is AddonComponent component )
|
||||
wheel = component.Addon as ISpinningWheel;
|
||||
ISpinningWheel wheel = targeted as ISpinningWheel;
|
||||
|
||||
if ( wheel is Item )
|
||||
{
|
||||
if ( !m_Wool.IsChildOf( from.Backpack ) )
|
||||
{
|
||||
from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it.
|
||||
}
|
||||
else if ( wheel.Spinning )
|
||||
{
|
||||
from.SendLocalizedMessage( 502656 ); // That spinning wheel is being used.
|
||||
}
|
||||
else
|
||||
{
|
||||
m_Wool.Consume();
|
||||
wheel.BeginSpin( m_Wool.OnSpun, from, m_Wool.Hue );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage( 502658 ); // Use that on a spinning wheel.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
public class TaintedWool : Wool
|
||||
{
|
||||
[Constructible]
|
||||
public TaintedWool() : this( 1 )
|
||||
{
|
||||
}
|
||||
if (wheel == null && targeted is AddonComponent component)
|
||||
wheel = component.Addon as ISpinningWheel;
|
||||
|
||||
[Constructible]
|
||||
public TaintedWool( int amount ) : base( 0x101F )
|
||||
{
|
||||
Stackable = true;
|
||||
Weight = 4.0;
|
||||
Amount = amount;
|
||||
}
|
||||
if (wheel is Item)
|
||||
{
|
||||
if (!m_Wool.IsChildOf(from.Backpack))
|
||||
{
|
||||
from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it.
|
||||
}
|
||||
else if (wheel.Spinning)
|
||||
{
|
||||
from.SendLocalizedMessage(502656); // That spinning wheel is being used.
|
||||
}
|
||||
else
|
||||
{
|
||||
m_Wool.Consume();
|
||||
wheel.BeginSpin(m_Wool.OnSpun, from, m_Wool.Hue);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(502658); // Use that on a spinning wheel.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public TaintedWool( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
public class TaintedWool : Wool
|
||||
{
|
||||
[Constructible]
|
||||
public TaintedWool() : this(1)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
[Constructible]
|
||||
public TaintedWool(int amount) : base(0x101F)
|
||||
{
|
||||
Stackable = true;
|
||||
Weight = 4.0;
|
||||
Amount = amount;
|
||||
}
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
public TaintedWool(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void OnSpun( ISpinningWheel wheel, Mobile from, int hue )
|
||||
{
|
||||
Item item = new DarkYarn( 1 );
|
||||
item.Hue = hue;
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
from.AddToBackpack( item );
|
||||
from.SendLocalizedMessage( 1010574 ); // You put a ball of yarn in your backpack.
|
||||
}
|
||||
}
|
||||
}
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
|
||||
public override void OnSpun(ISpinningWheel wheel, Mobile from, int hue)
|
||||
{
|
||||
Item item = new DarkYarn(1);
|
||||
item.Hue = hue;
|
||||
|
||||
from.AddToBackpack(item);
|
||||
from.SendLocalizedMessage(1010574); // You put a ball of yarn in your backpack.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -2,232 +2,232 @@ using Server.Targeting;
|
|||
|
||||
namespace Server.Items
|
||||
{
|
||||
public abstract class BaseClothMaterial : Item, IDyable
|
||||
{
|
||||
public BaseClothMaterial( int itemID ) : this( itemID, 1 )
|
||||
{
|
||||
}
|
||||
public abstract class BaseClothMaterial : Item, IDyable
|
||||
{
|
||||
public BaseClothMaterial(int itemID) : this(itemID, 1)
|
||||
{
|
||||
}
|
||||
|
||||
public BaseClothMaterial( int itemID, int amount ) : base( itemID )
|
||||
{
|
||||
Stackable = true;
|
||||
Weight = 1.0;
|
||||
Amount = amount;
|
||||
}
|
||||
public BaseClothMaterial(int itemID, int amount) : base(itemID)
|
||||
{
|
||||
Stackable = true;
|
||||
Weight = 1.0;
|
||||
Amount = amount;
|
||||
}
|
||||
|
||||
public BaseClothMaterial( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
public BaseClothMaterial(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
public bool Dye(Mobile from, DyeTub sender)
|
||||
{
|
||||
if (Deleted)
|
||||
return false;
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
Hue = sender.DyedHue;
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
return true;
|
||||
}
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
public bool Dye( Mobile from, DyeTub sender )
|
||||
{
|
||||
if ( Deleted )
|
||||
return false;
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
Hue = sender.DyedHue;
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
return true;
|
||||
}
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
|
||||
public override void OnDoubleClick( Mobile from )
|
||||
{
|
||||
if ( IsChildOf( from.Backpack ) )
|
||||
{
|
||||
from.SendLocalizedMessage( 500366 ); // Select a loom to use that on.
|
||||
from.Target = new PickLoomTarget( this );
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it.
|
||||
}
|
||||
}
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (IsChildOf(from.Backpack))
|
||||
{
|
||||
from.SendLocalizedMessage(500366); // Select a loom to use that on.
|
||||
from.Target = new PickLoomTarget(this);
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it.
|
||||
}
|
||||
}
|
||||
|
||||
private class PickLoomTarget : Target
|
||||
{
|
||||
private BaseClothMaterial m_Material;
|
||||
private class PickLoomTarget : Target
|
||||
{
|
||||
private BaseClothMaterial m_Material;
|
||||
|
||||
public PickLoomTarget( BaseClothMaterial material ) : base( 3, false, TargetFlags.None )
|
||||
{
|
||||
m_Material = material;
|
||||
}
|
||||
public PickLoomTarget(BaseClothMaterial material) : base(3, false, TargetFlags.None)
|
||||
{
|
||||
m_Material = material;
|
||||
}
|
||||
|
||||
protected override void OnTarget( Mobile from, object targeted )
|
||||
{
|
||||
if ( m_Material.Deleted )
|
||||
return;
|
||||
protected override void OnTarget(Mobile from, object targeted)
|
||||
{
|
||||
if (m_Material.Deleted)
|
||||
return;
|
||||
|
||||
ILoom loom = targeted as ILoom;
|
||||
ILoom loom = targeted as ILoom;
|
||||
|
||||
if ( loom == null && targeted is AddonComponent component )
|
||||
loom = component.Addon as ILoom;
|
||||
if (loom == null && targeted is AddonComponent component)
|
||||
loom = component.Addon as ILoom;
|
||||
|
||||
if ( loom != null )
|
||||
{
|
||||
if ( !m_Material.IsChildOf( from.Backpack ) )
|
||||
{
|
||||
from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it.
|
||||
}
|
||||
else if ( loom.Phase < 4 )
|
||||
{
|
||||
m_Material.Consume();
|
||||
if (loom != null)
|
||||
{
|
||||
if (!m_Material.IsChildOf(from.Backpack))
|
||||
{
|
||||
from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it.
|
||||
}
|
||||
else if (loom.Phase < 4)
|
||||
{
|
||||
m_Material.Consume();
|
||||
|
||||
if ( targeted is Item item )
|
||||
item.SendLocalizedMessageTo( from, 1010001 + loom.Phase++ );
|
||||
}
|
||||
else
|
||||
{
|
||||
Item create = new BoltOfCloth();
|
||||
create.Hue = m_Material.Hue;
|
||||
if (targeted is Item item)
|
||||
item.SendLocalizedMessageTo(from, 1010001 + loom.Phase++);
|
||||
}
|
||||
else
|
||||
{
|
||||
Item create = new BoltOfCloth();
|
||||
create.Hue = m_Material.Hue;
|
||||
|
||||
m_Material.Consume();
|
||||
loom.Phase = 0;
|
||||
from.SendLocalizedMessage( 500368 ); // You create some cloth and put it in your backpack.
|
||||
from.AddToBackpack( create );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage( 500367 ); // Try using that on a loom.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
m_Material.Consume();
|
||||
loom.Phase = 0;
|
||||
from.SendLocalizedMessage(500368); // You create some cloth and put it in your backpack.
|
||||
from.AddToBackpack(create);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(500367); // Try using that on a loom.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class DarkYarn : BaseClothMaterial
|
||||
{
|
||||
[Constructible]
|
||||
public DarkYarn() : this( 1 )
|
||||
{
|
||||
}
|
||||
public class DarkYarn : BaseClothMaterial
|
||||
{
|
||||
[Constructible]
|
||||
public DarkYarn() : this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public DarkYarn( int amount ) : base( 0xE1D, amount )
|
||||
{
|
||||
}
|
||||
[Constructible]
|
||||
public DarkYarn(int amount) : base(0xE1D, amount)
|
||||
{
|
||||
}
|
||||
|
||||
public DarkYarn( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
public DarkYarn(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
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 class LightYarn : BaseClothMaterial
|
||||
{
|
||||
[Constructible]
|
||||
public LightYarn() : this( 1 )
|
||||
{
|
||||
}
|
||||
public class LightYarn : BaseClothMaterial
|
||||
{
|
||||
[Constructible]
|
||||
public LightYarn() : this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public LightYarn( int amount ) : base( 0xE1E, amount )
|
||||
{
|
||||
}
|
||||
[Constructible]
|
||||
public LightYarn(int amount) : base(0xE1E, amount)
|
||||
{
|
||||
}
|
||||
|
||||
public LightYarn( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
public LightYarn(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
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 class LightYarnUnraveled : BaseClothMaterial
|
||||
{
|
||||
[Constructible]
|
||||
public LightYarnUnraveled() : this( 1 )
|
||||
{
|
||||
}
|
||||
public class LightYarnUnraveled : BaseClothMaterial
|
||||
{
|
||||
[Constructible]
|
||||
public LightYarnUnraveled() : this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public LightYarnUnraveled( int amount ) : base( 0xE1F, amount )
|
||||
{
|
||||
}
|
||||
[Constructible]
|
||||
public LightYarnUnraveled(int amount) : base(0xE1F, amount)
|
||||
{
|
||||
}
|
||||
|
||||
public LightYarnUnraveled( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
public LightYarnUnraveled(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
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 class SpoolOfThread : BaseClothMaterial
|
||||
{
|
||||
[Constructible]
|
||||
public SpoolOfThread() : this( 1 )
|
||||
{
|
||||
}
|
||||
public class SpoolOfThread : BaseClothMaterial
|
||||
{
|
||||
[Constructible]
|
||||
public SpoolOfThread() : this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public SpoolOfThread( int amount ) : base( 0xFA0, amount )
|
||||
{
|
||||
}
|
||||
[Constructible]
|
||||
public SpoolOfThread(int amount) : base(0xFA0, amount)
|
||||
{
|
||||
}
|
||||
|
||||
public SpoolOfThread( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
public SpoolOfThread(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue