#W# Source and Scripts added. Added Scripts/Settings.cs to expose some basic tweak able settings.
This commit is contained in:
parent
b51c58f514
commit
3045c83799
3512 changed files with 627673 additions and 0 deletions
47
Scripts/Items/Resources/Arrows/Arrow.cs
Normal file
47
Scripts/Items/Resources/Arrows/Arrow.cs
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class Arrow : Item, ICommodity
|
||||
{
|
||||
int ICommodity.DescriptionNumber { get { return LabelNumber; } }
|
||||
bool ICommodity.IsDeedable { get { return true; } }
|
||||
|
||||
public override double DefaultWeight
|
||||
{
|
||||
get { return 0.1; }
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Arrow() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Arrow( int amount ) : base( 0xF3F )
|
||||
{
|
||||
Stackable = true;
|
||||
Amount = amount;
|
||||
}
|
||||
|
||||
public Arrow( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
47
Scripts/Items/Resources/Arrows/Bolt.cs
Normal file
47
Scripts/Items/Resources/Arrows/Bolt.cs
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class Bolt : Item, ICommodity
|
||||
{
|
||||
int ICommodity.DescriptionNumber { get { return LabelNumber; } }
|
||||
bool ICommodity.IsDeedable { get { return true; } }
|
||||
|
||||
public override double DefaultWeight
|
||||
{
|
||||
get { return 0.1; }
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Bolt() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Bolt( int amount ) : base( 0x1BFB )
|
||||
{
|
||||
Stackable = true;
|
||||
Amount = amount;
|
||||
}
|
||||
|
||||
public Bolt( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
48
Scripts/Items/Resources/Arrows/Feather.cs
Normal file
48
Scripts/Items/Resources/Arrows/Feather.cs
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class Feather : Item, ICommodity
|
||||
{
|
||||
int ICommodity.DescriptionNumber { get { return LabelNumber; } }
|
||||
bool ICommodity.IsDeedable { get { return true; } }
|
||||
|
||||
public override double DefaultWeight
|
||||
{
|
||||
get { return 0.1; }
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Feather() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Feather( int amount ) : base( 0x1BD1 )
|
||||
{
|
||||
Stackable = true;
|
||||
Amount = amount;
|
||||
}
|
||||
|
||||
public Feather( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
48
Scripts/Items/Resources/Arrows/Shaft.cs
Normal file
48
Scripts/Items/Resources/Arrows/Shaft.cs
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class Shaft : Item, ICommodity
|
||||
{
|
||||
int ICommodity.DescriptionNumber { get { return LabelNumber; } }
|
||||
bool ICommodity.IsDeedable { get { return true; } }
|
||||
|
||||
public override double DefaultWeight
|
||||
{
|
||||
get { return 0.1; }
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Shaft() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Shaft( int amount ) : base( 0x1BD4 )
|
||||
{
|
||||
Stackable = true;
|
||||
Amount = amount;
|
||||
}
|
||||
|
||||
public Shaft( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
429
Scripts/Items/Resources/Blacksmithing/Ingots.cs
Normal file
429
Scripts/Items/Resources/Blacksmithing/Ingots.cs
Normal file
|
|
@ -0,0 +1,429 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public abstract class BaseIngot : Item, ICommodity
|
||||
{
|
||||
private CraftResource m_Resource;
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public CraftResource Resource
|
||||
{
|
||||
get{ return m_Resource; }
|
||||
set{ m_Resource = value; InvalidateProperties(); }
|
||||
}
|
||||
|
||||
public override double DefaultWeight
|
||||
{
|
||||
get { return 0.1; }
|
||||
}
|
||||
|
||||
int ICommodity.DescriptionNumber { get { return LabelNumber; } }
|
||||
bool ICommodity.IsDeedable { get { return true; } }
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 1 ); // version
|
||||
|
||||
writer.Write( (int) m_Resource );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch ( version )
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
m_Resource = (CraftResource)reader.ReadInt();
|
||||
break;
|
||||
}
|
||||
case 0:
|
||||
{
|
||||
OreInfo info;
|
||||
|
||||
switch ( reader.ReadInt() )
|
||||
{
|
||||
case 0: info = OreInfo.Iron; break;
|
||||
case 1: info = OreInfo.DullCopper; break;
|
||||
case 2: info = OreInfo.ShadowIron; break;
|
||||
case 3: info = OreInfo.Copper; break;
|
||||
case 4: info = OreInfo.Bronze; break;
|
||||
case 5: info = OreInfo.Gold; break;
|
||||
case 6: info = OreInfo.Agapite; break;
|
||||
case 7: info = OreInfo.Verite; break;
|
||||
case 8: info = OreInfo.Valorite; break;
|
||||
default: info = null; break;
|
||||
}
|
||||
|
||||
m_Resource = CraftResources.GetFromOreInfo( info );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public BaseIngot( CraftResource resource ) : this( resource, 1 )
|
||||
{
|
||||
}
|
||||
|
||||
public BaseIngot( CraftResource resource, int amount ) : base( 0x1BF2 )
|
||||
{
|
||||
Stackable = true;
|
||||
Amount = amount;
|
||||
Hue = CraftResources.GetHue( resource );
|
||||
|
||||
m_Resource = resource;
|
||||
}
|
||||
|
||||
public BaseIngot( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void AddNameProperty( ObjectPropertyList list )
|
||||
{
|
||||
if ( Amount > 1 )
|
||||
list.Add( 1050039, "{0}\t#{1}", Amount, 1027154 ); // ~1_NUMBER~ ~2_ITEMNAME~
|
||||
else
|
||||
list.Add( 1027154 ); // ingots
|
||||
}
|
||||
|
||||
public override void GetProperties( ObjectPropertyList list )
|
||||
{
|
||||
base.GetProperties( list );
|
||||
|
||||
if ( !CraftResources.IsStandard( m_Resource ) )
|
||||
{
|
||||
int num = CraftResources.GetLocalizationNumber( m_Resource );
|
||||
|
||||
if ( num > 0 )
|
||||
list.Add( num );
|
||||
else
|
||||
list.Add( CraftResources.GetName( m_Resource ) );
|
||||
}
|
||||
}
|
||||
|
||||
public override int LabelNumber
|
||||
{
|
||||
get
|
||||
{
|
||||
if ( m_Resource >= CraftResource.DullCopper && m_Resource <= CraftResource.Valorite )
|
||||
return 1042684 + (int)(m_Resource - CraftResource.DullCopper);
|
||||
|
||||
return 1042692;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[FlipableAttribute( 0x1BF2, 0x1BEF )]
|
||||
public class IronIngot : BaseIngot
|
||||
{
|
||||
[Constructable]
|
||||
public IronIngot() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public IronIngot( int amount ) : base( CraftResource.Iron, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public IronIngot( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
[FlipableAttribute( 0x1BF2, 0x1BEF )]
|
||||
public class DullCopperIngot : BaseIngot
|
||||
{
|
||||
[Constructable]
|
||||
public DullCopperIngot() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public DullCopperIngot( int amount ) : base( CraftResource.DullCopper, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public DullCopperIngot( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
[FlipableAttribute( 0x1BF2, 0x1BEF )]
|
||||
public class ShadowIronIngot : BaseIngot
|
||||
{
|
||||
[Constructable]
|
||||
public ShadowIronIngot() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public ShadowIronIngot( int amount ) : base( CraftResource.ShadowIron, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public ShadowIronIngot( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
[FlipableAttribute( 0x1BF2, 0x1BEF )]
|
||||
public class CopperIngot : BaseIngot
|
||||
{
|
||||
[Constructable]
|
||||
public CopperIngot() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public CopperIngot( int amount ) : base( CraftResource.Copper, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public CopperIngot( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
[FlipableAttribute( 0x1BF2, 0x1BEF )]
|
||||
public class BronzeIngot : BaseIngot
|
||||
{
|
||||
[Constructable]
|
||||
public BronzeIngot() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public BronzeIngot( int amount ) : base( CraftResource.Bronze, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public BronzeIngot( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
[FlipableAttribute( 0x1BF2, 0x1BEF )]
|
||||
public class GoldIngot : BaseIngot
|
||||
{
|
||||
[Constructable]
|
||||
public GoldIngot() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public GoldIngot( int amount ) : base( CraftResource.Gold, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public GoldIngot( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
[FlipableAttribute( 0x1BF2, 0x1BEF )]
|
||||
public class AgapiteIngot : BaseIngot
|
||||
{
|
||||
[Constructable]
|
||||
public AgapiteIngot() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public AgapiteIngot( int amount ) : base( CraftResource.Agapite, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public AgapiteIngot( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
[FlipableAttribute( 0x1BF2, 0x1BEF )]
|
||||
public class VeriteIngot : BaseIngot
|
||||
{
|
||||
[Constructable]
|
||||
public VeriteIngot() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public VeriteIngot( int amount ) : base( CraftResource.Verite, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public VeriteIngot( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
[FlipableAttribute( 0x1BF2, 0x1BEF )]
|
||||
public class ValoriteIngot : BaseIngot
|
||||
{
|
||||
[Constructable]
|
||||
public ValoriteIngot() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public ValoriteIngot( int amount ) : base( CraftResource.Valorite, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public ValoriteIngot( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
701
Scripts/Items/Resources/Blacksmithing/Ore.cs
Normal file
701
Scripts/Items/Resources/Blacksmithing/Ore.cs
Normal file
|
|
@ -0,0 +1,701 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
using Server.Network;
|
||||
using Server.Targeting;
|
||||
using Server.Engines.Craft;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public abstract class BaseOre : Item
|
||||
{
|
||||
private CraftResource m_Resource;
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public CraftResource Resource
|
||||
{
|
||||
get{ return m_Resource; }
|
||||
set{ m_Resource = value; InvalidateProperties(); }
|
||||
}
|
||||
|
||||
public abstract BaseIngot GetIngot();
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 1 ); // version
|
||||
|
||||
writer.Write( (int) m_Resource );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch ( version )
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
m_Resource = (CraftResource)reader.ReadInt();
|
||||
break;
|
||||
}
|
||||
case 0:
|
||||
{
|
||||
OreInfo info;
|
||||
|
||||
switch ( reader.ReadInt() )
|
||||
{
|
||||
case 0: info = OreInfo.Iron; break;
|
||||
case 1: info = OreInfo.DullCopper; break;
|
||||
case 2: info = OreInfo.ShadowIron; break;
|
||||
case 3: info = OreInfo.Copper; break;
|
||||
case 4: info = OreInfo.Bronze; break;
|
||||
case 5: info = OreInfo.Gold; break;
|
||||
case 6: info = OreInfo.Agapite; break;
|
||||
case 7: info = OreInfo.Verite; break;
|
||||
case 8: info = OreInfo.Valorite; break;
|
||||
default: info = null; break;
|
||||
}
|
||||
|
||||
m_Resource = CraftResources.GetFromOreInfo( info );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static int RandomSize()
|
||||
{
|
||||
double rand = Utility.RandomDouble();
|
||||
|
||||
if ( rand < 0.12 )
|
||||
return 0x19B7;
|
||||
else if ( rand < 0.18 )
|
||||
return 0x19B8;
|
||||
else if ( rand < 0.25 )
|
||||
return 0x19BA;
|
||||
else
|
||||
return 0x19B9;
|
||||
}
|
||||
|
||||
public BaseOre( CraftResource resource ) : this( resource, 1 )
|
||||
{
|
||||
}
|
||||
|
||||
public BaseOre( CraftResource resource, int amount ) : base( RandomSize() )
|
||||
{
|
||||
Stackable = true;
|
||||
Amount = amount;
|
||||
Hue = CraftResources.GetHue( resource );
|
||||
|
||||
m_Resource = resource;
|
||||
}
|
||||
|
||||
public BaseOre( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void AddNameProperty( ObjectPropertyList list )
|
||||
{
|
||||
if ( Amount > 1 )
|
||||
list.Add( 1050039, "{0}\t#{1}", Amount, 1026583 ); // ~1_NUMBER~ ~2_ITEMNAME~
|
||||
else
|
||||
list.Add( 1026583 ); // ore
|
||||
}
|
||||
|
||||
public override void GetProperties( ObjectPropertyList list )
|
||||
{
|
||||
base.GetProperties( list );
|
||||
|
||||
if ( !CraftResources.IsStandard( m_Resource ) )
|
||||
{
|
||||
int num = CraftResources.GetLocalizationNumber( m_Resource );
|
||||
|
||||
if ( num > 0 )
|
||||
list.Add( num );
|
||||
else
|
||||
list.Add( CraftResources.GetName( m_Resource ) );
|
||||
}
|
||||
}
|
||||
|
||||
public override int LabelNumber
|
||||
{
|
||||
get
|
||||
{
|
||||
if ( m_Resource >= CraftResource.DullCopper && m_Resource <= CraftResource.Valorite )
|
||||
return 1042845 + (int)(m_Resource - CraftResource.DullCopper);
|
||||
|
||||
return 1042853; // iron ore;
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnDoubleClick( Mobile from )
|
||||
{
|
||||
if ( !Movable )
|
||||
return;
|
||||
|
||||
if ( RootParent is BaseCreature )
|
||||
{
|
||||
from.SendLocalizedMessage( 500447 ); // That is not accessible
|
||||
}
|
||||
else if ( from.InRange( this.GetWorldLocation(), 2 ) )
|
||||
{
|
||||
from.SendLocalizedMessage( 501971 ); // Select the forge on which to smelt the ore, or another pile of ore with which to combine it.
|
||||
from.Target = new InternalTarget( this );
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage( 501976 ); // The ore is too far away.
|
||||
}
|
||||
}
|
||||
|
||||
private class InternalTarget : Target
|
||||
{
|
||||
private BaseOre m_Ore;
|
||||
|
||||
public InternalTarget( BaseOre ore ) : base ( 2, false, TargetFlags.None )
|
||||
{
|
||||
m_Ore = ore;
|
||||
}
|
||||
|
||||
private bool IsForge( object obj )
|
||||
{
|
||||
if ( Core.ML && obj is Mobile && ((Mobile)obj).IsDeadBondedPet )
|
||||
return false;
|
||||
|
||||
if ( obj.GetType().IsDefined( typeof( ForgeAttribute ), false ) )
|
||||
return true;
|
||||
|
||||
int itemID = 0;
|
||||
|
||||
if ( obj is Item )
|
||||
itemID = ((Item)obj).ItemID;
|
||||
else if ( obj is StaticTarget )
|
||||
itemID = ((StaticTarget)obj).ItemID;
|
||||
|
||||
return ( itemID == 4017 || (itemID >= 6522 && itemID <= 6569) );
|
||||
}
|
||||
|
||||
protected override void OnTarget( Mobile from, object targeted )
|
||||
{
|
||||
if ( m_Ore.Deleted )
|
||||
return;
|
||||
|
||||
if ( !from.InRange( m_Ore.GetWorldLocation(), 2 ) )
|
||||
{
|
||||
from.SendLocalizedMessage( 501976 ); // The ore is too far away.
|
||||
return;
|
||||
}
|
||||
|
||||
#region Combine Ore
|
||||
if ( targeted is BaseOre )
|
||||
{
|
||||
BaseOre ore = (BaseOre)targeted;
|
||||
|
||||
if ( !ore.Movable )
|
||||
{
|
||||
return;
|
||||
}
|
||||
else if ( m_Ore == ore )
|
||||
{
|
||||
from.SendLocalizedMessage( 501972 ); // Select another pile or ore with which to combine this.
|
||||
from.Target = new InternalTarget( ore );
|
||||
return;
|
||||
}
|
||||
else if ( ore.Resource != m_Ore.Resource )
|
||||
{
|
||||
from.SendLocalizedMessage( 501979 ); // You cannot combine ores of different metals.
|
||||
return;
|
||||
}
|
||||
|
||||
int worth = ore.Amount;
|
||||
|
||||
if ( ore.ItemID == 0x19B9 )
|
||||
worth *= 8;
|
||||
else if ( ore.ItemID == 0x19B7 )
|
||||
worth *= 2;
|
||||
else
|
||||
worth *= 4;
|
||||
|
||||
int sourceWorth = m_Ore.Amount;
|
||||
|
||||
if ( m_Ore.ItemID == 0x19B9 )
|
||||
sourceWorth *= 8;
|
||||
else if ( m_Ore.ItemID == 0x19B7 )
|
||||
sourceWorth *= 2;
|
||||
else
|
||||
sourceWorth *= 4;
|
||||
|
||||
worth += sourceWorth;
|
||||
|
||||
int plusWeight = 0;
|
||||
int newID = ore.ItemID;
|
||||
|
||||
if ( ore.DefaultWeight != m_Ore.DefaultWeight )
|
||||
{
|
||||
if ( ore.ItemID == 0x19B7 || m_Ore.ItemID == 0x19B7 )
|
||||
{
|
||||
newID = 0x19B7;
|
||||
}
|
||||
else if ( ore.ItemID == 0x19B9 )
|
||||
{
|
||||
newID = m_Ore.ItemID;
|
||||
plusWeight = ore.Amount * 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
plusWeight = m_Ore.Amount * 2;
|
||||
}
|
||||
}
|
||||
|
||||
if ( ( ore.ItemID == 0x19B9 && worth > 120000 ) || ( ( ore.ItemID == 0x19B8 || ore.ItemID == 0x19BA ) && worth > 60000 ) || ( ore.ItemID == 0x19B7 && worth > 30000 ) )
|
||||
{
|
||||
from.SendLocalizedMessage( 1062844 ); // There is too much ore to combine.
|
||||
return;
|
||||
}
|
||||
else if ( ore.RootParent is Mobile && ( plusWeight + ((Mobile)ore.RootParent).Backpack.TotalWeight ) > ((Mobile)ore.RootParent).Backpack.MaxWeight )
|
||||
{
|
||||
from.SendLocalizedMessage( 501978 ); // The weight is too great to combine in a container.
|
||||
return;
|
||||
}
|
||||
|
||||
ore.ItemID = newID;
|
||||
|
||||
if ( ore.ItemID == 0x19B9 )
|
||||
ore.Amount = worth / 8;
|
||||
else if ( ore.ItemID == 0x19B7 )
|
||||
ore.Amount = worth / 2;
|
||||
else
|
||||
ore.Amount = worth / 4;
|
||||
|
||||
m_Ore.Delete();
|
||||
return;
|
||||
}
|
||||
#endregion
|
||||
|
||||
if ( IsForge( targeted ) )
|
||||
{
|
||||
double difficulty;
|
||||
|
||||
switch ( m_Ore.Resource )
|
||||
{
|
||||
default: difficulty = 50.0; break;
|
||||
case CraftResource.DullCopper: difficulty = 65.0; break;
|
||||
case CraftResource.ShadowIron: difficulty = 70.0; break;
|
||||
case CraftResource.Copper: difficulty = 75.0; break;
|
||||
case CraftResource.Bronze: difficulty = 80.0; break;
|
||||
case CraftResource.Gold: difficulty = 85.0; break;
|
||||
case CraftResource.Agapite: difficulty = 90.0; break;
|
||||
case CraftResource.Verite: difficulty = 95.0; break;
|
||||
case CraftResource.Valorite: difficulty = 99.0; break;
|
||||
}
|
||||
|
||||
double minSkill = difficulty - 25.0;
|
||||
double maxSkill = difficulty + 25.0;
|
||||
|
||||
if ( difficulty > 50.0 && difficulty > from.Skills[SkillName.Mining].Value )
|
||||
{
|
||||
from.SendLocalizedMessage( 501986 ); // You have no idea how to smelt this strange ore!
|
||||
return;
|
||||
}
|
||||
|
||||
if ( m_Ore.ItemID == 0x19B7 && m_Ore.Amount < 2 )
|
||||
{
|
||||
from.SendLocalizedMessage( 501987 ); // There is not enough metal-bearing ore in this pile to make an ingot.
|
||||
return;
|
||||
}
|
||||
|
||||
if ( from.CheckTargetSkill( SkillName.Mining, targeted, minSkill, maxSkill ) )
|
||||
{
|
||||
int toConsume = m_Ore.Amount;
|
||||
|
||||
if ( toConsume <= 0 )
|
||||
{
|
||||
from.SendLocalizedMessage( 501987 ); // There is not enough metal-bearing ore in this pile to make an ingot.
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( toConsume > 30000 )
|
||||
toConsume = 30000;
|
||||
|
||||
int ingotAmount;
|
||||
|
||||
if ( m_Ore.ItemID == 0x19B7 )
|
||||
{
|
||||
ingotAmount = toConsume / 2;
|
||||
|
||||
if ( toConsume % 2 != 0 )
|
||||
--toConsume;
|
||||
}
|
||||
else if ( m_Ore.ItemID == 0x19B9 )
|
||||
{
|
||||
ingotAmount = toConsume * 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
ingotAmount = toConsume;
|
||||
}
|
||||
|
||||
BaseIngot ingot = m_Ore.GetIngot();
|
||||
ingot.Amount = ingotAmount;
|
||||
|
||||
m_Ore.Consume( toConsume );
|
||||
from.AddToBackpack( ingot );
|
||||
//from.PlaySound( 0x57 );
|
||||
|
||||
from.SendLocalizedMessage( 501988 ); // You smelt the ore removing the impurities and put the metal in your backpack.
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( m_Ore.Amount < 2 )
|
||||
{
|
||||
if ( m_Ore.ItemID == 0x19B9 )
|
||||
m_Ore.ItemID = 0x19B8;
|
||||
else
|
||||
m_Ore.ItemID = 0x19B7;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_Ore.Amount /= 2;
|
||||
}
|
||||
|
||||
from.SendLocalizedMessage( 501990 ); // You burn away the impurities but are left with less useable metal.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class IronOre : BaseOre
|
||||
{
|
||||
[Constructable]
|
||||
public IronOre() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public IronOre( int amount ) : base( CraftResource.Iron, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public IronOre( bool fixedSize ) : this( 1 )
|
||||
{
|
||||
if ( fixedSize )
|
||||
ItemID = 0x19B8;
|
||||
}
|
||||
|
||||
public IronOre( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
|
||||
public override BaseIngot GetIngot()
|
||||
{
|
||||
return new IronIngot();
|
||||
}
|
||||
}
|
||||
|
||||
public class DullCopperOre : BaseOre
|
||||
{
|
||||
[Constructable]
|
||||
public DullCopperOre() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public DullCopperOre( int amount ) : base( CraftResource.DullCopper, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public DullCopperOre( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
|
||||
public override BaseIngot GetIngot()
|
||||
{
|
||||
return new DullCopperIngot();
|
||||
}
|
||||
}
|
||||
|
||||
public class ShadowIronOre : BaseOre
|
||||
{
|
||||
[Constructable]
|
||||
public ShadowIronOre() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public ShadowIronOre( int amount ) : base( CraftResource.ShadowIron, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public ShadowIronOre( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
|
||||
public override BaseIngot GetIngot()
|
||||
{
|
||||
return new ShadowIronIngot();
|
||||
}
|
||||
}
|
||||
|
||||
public class CopperOre : BaseOre
|
||||
{
|
||||
[Constructable]
|
||||
public CopperOre() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public CopperOre( int amount ) : base( CraftResource.Copper, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public CopperOre( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
|
||||
public override BaseIngot GetIngot()
|
||||
{
|
||||
return new CopperIngot();
|
||||
}
|
||||
}
|
||||
|
||||
public class BronzeOre : BaseOre
|
||||
{
|
||||
[Constructable]
|
||||
public BronzeOre() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public BronzeOre( int amount ) : base( CraftResource.Bronze, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public BronzeOre( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
|
||||
public override BaseIngot GetIngot()
|
||||
{
|
||||
return new BronzeIngot();
|
||||
}
|
||||
}
|
||||
|
||||
public class GoldOre : BaseOre
|
||||
{
|
||||
[Constructable]
|
||||
public GoldOre() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public GoldOre( int amount ) : base( CraftResource.Gold, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public GoldOre( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
|
||||
public override BaseIngot GetIngot()
|
||||
{
|
||||
return new GoldIngot();
|
||||
}
|
||||
}
|
||||
|
||||
public class AgapiteOre : BaseOre
|
||||
{
|
||||
[Constructable]
|
||||
public AgapiteOre() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public AgapiteOre( int amount ) : base( CraftResource.Agapite, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public AgapiteOre( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
|
||||
public override BaseIngot GetIngot()
|
||||
{
|
||||
return new AgapiteIngot();
|
||||
}
|
||||
}
|
||||
|
||||
public class VeriteOre : BaseOre
|
||||
{
|
||||
[Constructable]
|
||||
public VeriteOre() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public VeriteOre( int amount ) : base( CraftResource.Verite, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public VeriteOre( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
|
||||
public override BaseIngot GetIngot()
|
||||
{
|
||||
return new VeriteIngot();
|
||||
}
|
||||
}
|
||||
|
||||
public class ValoriteOre : BaseOre
|
||||
{
|
||||
[Constructable]
|
||||
public ValoriteOre() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public ValoriteOre( int amount ) : base( CraftResource.Valorite, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public ValoriteOre( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
|
||||
public override BaseIngot GetIngot()
|
||||
{
|
||||
return new ValoriteIngot();
|
||||
}
|
||||
}
|
||||
}
|
||||
270
Scripts/Items/Resources/Blacksmithing/Scales.cs
Normal file
270
Scripts/Items/Resources/Blacksmithing/Scales.cs
Normal file
|
|
@ -0,0 +1,270 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public abstract class BaseScales : Item, ICommodity
|
||||
{
|
||||
public override int LabelNumber{ get{ return 1053139; } } // dragon scales
|
||||
|
||||
private CraftResource m_Resource;
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public CraftResource Resource
|
||||
{
|
||||
get{ return m_Resource; }
|
||||
set{ m_Resource = value; InvalidateProperties(); }
|
||||
}
|
||||
|
||||
public override double DefaultWeight
|
||||
{
|
||||
get { return 0.1; }
|
||||
}
|
||||
|
||||
int ICommodity.DescriptionNumber { get { return LabelNumber; } }
|
||||
bool ICommodity.IsDeedable { get { return true; } }
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
|
||||
writer.Write( (int) m_Resource );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch ( version )
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
m_Resource = (CraftResource)reader.ReadInt();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public BaseScales( CraftResource resource ) : this( resource, 1 )
|
||||
{
|
||||
}
|
||||
|
||||
public BaseScales( CraftResource resource, int amount ) : base( 0x26B4 )
|
||||
{
|
||||
Stackable = true;
|
||||
Amount = amount;
|
||||
Hue = CraftResources.GetHue( resource );
|
||||
|
||||
m_Resource = resource;
|
||||
}
|
||||
|
||||
public BaseScales( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
public class RedScales : BaseScales
|
||||
{
|
||||
[Constructable]
|
||||
public RedScales() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public RedScales( int amount ) : base( CraftResource.RedScales, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public RedScales( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public class YellowScales : BaseScales
|
||||
{
|
||||
[Constructable]
|
||||
public YellowScales() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public YellowScales( int amount ) : base( CraftResource.YellowScales, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public YellowScales( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public class BlackScales : BaseScales
|
||||
{
|
||||
[Constructable]
|
||||
public BlackScales() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public BlackScales( int amount ) : base( CraftResource.BlackScales, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public BlackScales( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public class GreenScales : BaseScales
|
||||
{
|
||||
[Constructable]
|
||||
public GreenScales() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public GreenScales( int amount ) : base( CraftResource.GreenScales, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public GreenScales( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public class WhiteScales : BaseScales
|
||||
{
|
||||
[Constructable]
|
||||
public WhiteScales() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public WhiteScales( int amount ) : base( CraftResource.WhiteScales, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public WhiteScales( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public class BlueScales : BaseScales
|
||||
{
|
||||
public override int LabelNumber{ get{ return 1053140; } } // sea serpent scales
|
||||
|
||||
[Constructable]
|
||||
public BlueScales() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public BlueScales( int amount ) : base( CraftResource.BlueScales, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public BlueScales( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
79
Scripts/Items/Resources/Fishing/BigFish.cs
Normal file
79
Scripts/Items/Resources/Fishing/BigFish.cs
Normal file
|
|
@ -0,0 +1,79 @@
|
|||
using System;
|
||||
using Server.Network;
|
||||
using Server.Targeting;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class BigFish : Item, ICarvable
|
||||
{
|
||||
private Mobile m_Fisher;
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public Mobile Fisher
|
||||
{
|
||||
get{ return m_Fisher; }
|
||||
set{ m_Fisher = value; InvalidateProperties(); }
|
||||
}
|
||||
|
||||
public void Carve( Mobile from, Item item )
|
||||
{
|
||||
base.ScissorHelper( from, new RawFishSteak(), Math.Max( 16, (int)Weight ) / 4 , false );
|
||||
}
|
||||
|
||||
public override int LabelNumber{ get{ return 1041112; } } // a big fish
|
||||
|
||||
[Constructable]
|
||||
public BigFish() : base( 0x09CC )
|
||||
{
|
||||
Weight = Utility.RandomMinMax( 3, 200 ); //TODO: Find correct formula. max on OSI currently 200, OSI dev says it's not 200 as max, and ~ 1/1,000,000 chance to get highest
|
||||
Hue = Utility.RandomBool() ? 0x847 : 0x58C;
|
||||
}
|
||||
|
||||
public override void GetProperties( ObjectPropertyList list )
|
||||
{
|
||||
base.GetProperties( list );
|
||||
|
||||
if ( Weight >= 20 )
|
||||
{
|
||||
if ( m_Fisher != null )
|
||||
list.Add( 1070857, m_Fisher.Name ); // Caught by ~1_fisherman~
|
||||
|
||||
list.Add( 1070858, ((int)Weight).ToString() ); // ~1_weight~ stones
|
||||
}
|
||||
}
|
||||
|
||||
public BigFish( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 1 ); // version
|
||||
|
||||
writer.Write( (Mobile) m_Fisher );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch ( version )
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
m_Fisher = reader.ReadMobile();
|
||||
break;
|
||||
}
|
||||
case 0:
|
||||
{
|
||||
Weight = Utility.RandomMinMax( 3, 200 );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
47
Scripts/Items/Resources/Fishing/Fish.cs
Normal file
47
Scripts/Items/Resources/Fishing/Fish.cs
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
using System;
|
||||
using Server.Network;
|
||||
using Server.Targeting;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class Fish : Item, ICarvable
|
||||
{
|
||||
public void Carve( Mobile from, Item item )
|
||||
{
|
||||
base.ScissorHelper( from, new RawFishSteak(), 4 );
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Fish() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Fish( int amount ) : base( Utility.Random( 0x09CC, 4 ) )
|
||||
{
|
||||
Stackable = true;
|
||||
Weight = 1.0;
|
||||
Amount = amount;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public Fish( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
203
Scripts/Items/Resources/Fishing/MagicFish.cs
Normal file
203
Scripts/Items/Resources/Fishing/MagicFish.cs
Normal file
|
|
@ -0,0 +1,203 @@
|
|||
using System;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public abstract class BaseMagicFish : Item
|
||||
{
|
||||
public virtual int Bonus{ get{ return 0; } }
|
||||
public virtual StatType Type{ get{ return StatType.Str; } }
|
||||
|
||||
public override double DefaultWeight
|
||||
{
|
||||
get { return 1.0; }
|
||||
}
|
||||
|
||||
public BaseMagicFish( int hue ) : base( 0xDD6 )
|
||||
{
|
||||
Hue = hue;
|
||||
}
|
||||
|
||||
public BaseMagicFish( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public virtual bool Apply( Mobile from )
|
||||
{
|
||||
bool applied = Spells.SpellHelper.AddStatOffset( from, Type, Bonus, TimeSpan.FromMinutes( 1.0 ) );
|
||||
|
||||
if ( !applied )
|
||||
from.SendLocalizedMessage( 502173 ); // You are already under a similar effect.
|
||||
|
||||
return applied;
|
||||
}
|
||||
|
||||
public override void OnDoubleClick( Mobile from )
|
||||
{
|
||||
if ( !IsChildOf( from.Backpack ) )
|
||||
{
|
||||
from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it.
|
||||
}
|
||||
else if ( Apply( from ) )
|
||||
{
|
||||
from.FixedEffect( 0x375A, 10, 15 );
|
||||
from.PlaySound( 0x1E7 );
|
||||
from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 501774 ); // You swallow the fish whole!
|
||||
Delete();
|
||||
}
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class PrizedFish : BaseMagicFish
|
||||
{
|
||||
public override int Bonus{ get{ return 5; } }
|
||||
public override StatType Type{ get{ return StatType.Int; } }
|
||||
|
||||
public override int LabelNumber{ get{ return 1041073; } } // prized fish
|
||||
|
||||
[Constructable]
|
||||
public PrizedFish() : base( 51 )
|
||||
{
|
||||
}
|
||||
|
||||
public PrizedFish( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
if ( Hue == 151 )
|
||||
Hue = 51;
|
||||
}
|
||||
}
|
||||
|
||||
public class WondrousFish : BaseMagicFish
|
||||
{
|
||||
public override int Bonus{ get{ return 5; } }
|
||||
public override StatType Type{ get{ return StatType.Dex; } }
|
||||
|
||||
public override int LabelNumber{ get{ return 1041074; } } // wondrous fish
|
||||
|
||||
[Constructable]
|
||||
public WondrousFish() : base( 86 )
|
||||
{
|
||||
}
|
||||
|
||||
public WondrousFish( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
if ( Hue == 286 )
|
||||
Hue = 86;
|
||||
}
|
||||
}
|
||||
|
||||
public class TrulyRareFish : BaseMagicFish
|
||||
{
|
||||
public override int Bonus{ get{ return 5; } }
|
||||
public override StatType Type{ get{ return StatType.Str; } }
|
||||
|
||||
public override int LabelNumber{ get{ return 1041075; } } // truly rare fish
|
||||
|
||||
[Constructable]
|
||||
public TrulyRareFish() : base( 76 )
|
||||
{
|
||||
}
|
||||
|
||||
public TrulyRareFish( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
if ( Hue == 376 )
|
||||
Hue = 76;
|
||||
}
|
||||
}
|
||||
|
||||
public class PeculiarFish : BaseMagicFish
|
||||
{
|
||||
public override int LabelNumber{ get{ return 1041076; } } // highly peculiar fish
|
||||
|
||||
[Constructable]
|
||||
public PeculiarFish() : base( 66 )
|
||||
{
|
||||
}
|
||||
|
||||
public PeculiarFish( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override bool Apply( Mobile from )
|
||||
{
|
||||
from.Stam += 10;
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
if ( Hue == 266 )
|
||||
Hue = 66;
|
||||
}
|
||||
}
|
||||
}
|
||||
315
Scripts/Items/Resources/Masonry/Granite.cs
Normal file
315
Scripts/Items/Resources/Masonry/Granite.cs
Normal file
|
|
@ -0,0 +1,315 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public abstract class BaseGranite : Item
|
||||
{
|
||||
private CraftResource m_Resource;
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public CraftResource Resource
|
||||
{
|
||||
get{ return m_Resource; }
|
||||
set{ m_Resource = value; InvalidateProperties(); }
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 1 ); // version
|
||||
|
||||
writer.Write( (int) m_Resource );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch ( version )
|
||||
{
|
||||
case 1:
|
||||
case 0:
|
||||
{
|
||||
m_Resource = (CraftResource)reader.ReadInt();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ( version < 1 )
|
||||
Stackable = Core.ML;
|
||||
}
|
||||
|
||||
public override double DefaultWeight
|
||||
{
|
||||
get { return Core.ML ? 1.0 : 10.0; } // Pub 57
|
||||
}
|
||||
|
||||
public BaseGranite( CraftResource resource ) : base( 0x1779 )
|
||||
{
|
||||
Hue = CraftResources.GetHue( resource );
|
||||
Stackable = Core.ML;
|
||||
|
||||
m_Resource = resource;
|
||||
}
|
||||
|
||||
public BaseGranite( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber{ get{ return 1044607; } } // high quality granite
|
||||
|
||||
public override void GetProperties( ObjectPropertyList list )
|
||||
{
|
||||
base.GetProperties( list );
|
||||
|
||||
if ( !CraftResources.IsStandard( m_Resource ) )
|
||||
{
|
||||
int num = CraftResources.GetLocalizationNumber( m_Resource );
|
||||
|
||||
if ( num > 0 )
|
||||
list.Add( num );
|
||||
else
|
||||
list.Add( CraftResources.GetName( m_Resource ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class Granite : BaseGranite
|
||||
{
|
||||
[Constructable]
|
||||
public Granite() : base( CraftResource.Iron )
|
||||
{
|
||||
}
|
||||
|
||||
public Granite( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class DullCopperGranite : BaseGranite
|
||||
{
|
||||
[Constructable]
|
||||
public DullCopperGranite() : base( CraftResource.DullCopper )
|
||||
{
|
||||
}
|
||||
|
||||
public DullCopperGranite( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class ShadowIronGranite : BaseGranite
|
||||
{
|
||||
[Constructable]
|
||||
public ShadowIronGranite() : base( CraftResource.ShadowIron )
|
||||
{
|
||||
}
|
||||
|
||||
public ShadowIronGranite( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class CopperGranite : BaseGranite
|
||||
{
|
||||
[Constructable]
|
||||
public CopperGranite() : base( CraftResource.Copper )
|
||||
{
|
||||
}
|
||||
|
||||
public CopperGranite( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class BronzeGranite : BaseGranite
|
||||
{
|
||||
[Constructable]
|
||||
public BronzeGranite() : base( CraftResource.Bronze )
|
||||
{
|
||||
}
|
||||
|
||||
public BronzeGranite( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class GoldGranite : BaseGranite
|
||||
{
|
||||
[Constructable]
|
||||
public GoldGranite() : base( CraftResource.Gold )
|
||||
{
|
||||
}
|
||||
|
||||
public GoldGranite( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class AgapiteGranite : BaseGranite
|
||||
{
|
||||
[Constructable]
|
||||
public AgapiteGranite() : base( CraftResource.Agapite )
|
||||
{
|
||||
}
|
||||
|
||||
public AgapiteGranite( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class VeriteGranite : BaseGranite
|
||||
{
|
||||
[Constructable]
|
||||
public VeriteGranite() : base( CraftResource.Verite )
|
||||
{
|
||||
}
|
||||
|
||||
public VeriteGranite( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class ValoriteGranite : BaseGranite
|
||||
{
|
||||
[Constructable]
|
||||
public ValoriteGranite() : base( CraftResource.Valorite )
|
||||
{
|
||||
}
|
||||
|
||||
public ValoriteGranite( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
1048
Scripts/Items/Resources/MiscMLResources.cs
Normal file
1048
Scripts/Items/Resources/MiscMLResources.cs
Normal file
File diff suppressed because it is too large
Load diff
50
Scripts/Items/Resources/Reagents/BagOfAllReagents.cs
Normal file
50
Scripts/Items/Resources/Reagents/BagOfAllReagents.cs
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class BagOfAllReagents : Bag
|
||||
{
|
||||
[Constructable]
|
||||
public BagOfAllReagents() : this( 50 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public BagOfAllReagents( int amount )
|
||||
{
|
||||
DropItem( new BlackPearl ( amount ) );
|
||||
DropItem( new Bloodmoss ( amount ) );
|
||||
DropItem( new Garlic ( amount ) );
|
||||
DropItem( new Ginseng ( amount ) );
|
||||
DropItem( new MandrakeRoot ( amount ) );
|
||||
DropItem( new Nightshade ( amount ) );
|
||||
DropItem( new SulfurousAsh ( amount ) );
|
||||
DropItem( new SpidersSilk ( amount ) );
|
||||
DropItem( new BatWing ( amount ) );
|
||||
DropItem( new GraveDust ( amount ) );
|
||||
DropItem( new DaemonBlood ( amount ) );
|
||||
DropItem( new NoxCrystal ( amount ) );
|
||||
DropItem( new PigIron ( amount ) );
|
||||
}
|
||||
|
||||
public BagOfAllReagents( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
42
Scripts/Items/Resources/Reagents/BagOfNecroReagents.cs
Normal file
42
Scripts/Items/Resources/Reagents/BagOfNecroReagents.cs
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class BagOfNecroReagents : Bag
|
||||
{
|
||||
[Constructable]
|
||||
public BagOfNecroReagents() : this( 50 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public BagOfNecroReagents( int amount )
|
||||
{
|
||||
DropItem( new BatWing ( amount ) );
|
||||
DropItem( new GraveDust ( amount ) );
|
||||
DropItem( new DaemonBlood( amount ) );
|
||||
DropItem( new NoxCrystal ( amount ) );
|
||||
DropItem( new PigIron ( amount ) );
|
||||
}
|
||||
|
||||
public BagOfNecroReagents( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
45
Scripts/Items/Resources/Reagents/BagOfReagents.cs
Normal file
45
Scripts/Items/Resources/Reagents/BagOfReagents.cs
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class BagOfReagents : Bag
|
||||
{
|
||||
[Constructable]
|
||||
public BagOfReagents() : this( 50 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public BagOfReagents( int amount )
|
||||
{
|
||||
DropItem( new BlackPearl ( amount ) );
|
||||
DropItem( new Bloodmoss ( amount ) );
|
||||
DropItem( new Garlic ( amount ) );
|
||||
DropItem( new Ginseng ( amount ) );
|
||||
DropItem( new MandrakeRoot ( amount ) );
|
||||
DropItem( new Nightshade ( amount ) );
|
||||
DropItem( new SulfurousAsh ( amount ) );
|
||||
DropItem( new SpidersSilk ( amount ) );
|
||||
}
|
||||
|
||||
public BagOfReagents( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
41
Scripts/Items/Resources/Reagents/BaseReagent.cs
Normal file
41
Scripts/Items/Resources/Reagents/BaseReagent.cs
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public abstract class BaseReagent : Item
|
||||
{
|
||||
public override double DefaultWeight
|
||||
{
|
||||
get { return 0.1; }
|
||||
}
|
||||
|
||||
public BaseReagent( int itemID ) : this( itemID, 1 )
|
||||
{
|
||||
}
|
||||
|
||||
public BaseReagent( int itemID, int amount ) : base( itemID )
|
||||
{
|
||||
Stackable = true;
|
||||
Amount = amount;
|
||||
}
|
||||
|
||||
public BaseReagent( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
42
Scripts/Items/Resources/Reagents/BatWing.cs
Normal file
42
Scripts/Items/Resources/Reagents/BatWing.cs
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class BatWing : BaseReagent, ICommodity
|
||||
{
|
||||
int ICommodity.DescriptionNumber { get { return LabelNumber; } }
|
||||
bool ICommodity.IsDeedable { get { return true; } }
|
||||
|
||||
[Constructable]
|
||||
public BatWing() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public BatWing( int amount ) : base( 0xF78, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public BatWing( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
40
Scripts/Items/Resources/Reagents/BlackPearl.cs
Normal file
40
Scripts/Items/Resources/Reagents/BlackPearl.cs
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class BlackPearl : BaseReagent, ICommodity
|
||||
{
|
||||
int ICommodity.DescriptionNumber { get { return LabelNumber; } }
|
||||
bool ICommodity.IsDeedable { get { return true; } }
|
||||
|
||||
[Constructable]
|
||||
public BlackPearl() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public BlackPearl( int amount ) : base( 0xF7A, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public BlackPearl( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
42
Scripts/Items/Resources/Reagents/Bloodmoss.cs
Normal file
42
Scripts/Items/Resources/Reagents/Bloodmoss.cs
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class Bloodmoss : BaseReagent, ICommodity
|
||||
{
|
||||
int ICommodity.DescriptionNumber { get { return LabelNumber; } }
|
||||
bool ICommodity.IsDeedable { get { return true; } }
|
||||
|
||||
[Constructable]
|
||||
public Bloodmoss() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Bloodmoss( int amount ) : base( 0xF7B, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public Bloodmoss( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
42
Scripts/Items/Resources/Reagents/DaemonBlood.cs
Normal file
42
Scripts/Items/Resources/Reagents/DaemonBlood.cs
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class DaemonBlood : BaseReagent, ICommodity
|
||||
{
|
||||
int ICommodity.DescriptionNumber { get { return LabelNumber; } }
|
||||
bool ICommodity.IsDeedable { get { return true; } }
|
||||
|
||||
[Constructable]
|
||||
public DaemonBlood() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public DaemonBlood( int amount ) : base( 0xF7D, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public DaemonBlood( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
45
Scripts/Items/Resources/Reagents/DaemonBone.cs
Normal file
45
Scripts/Items/Resources/Reagents/DaemonBone.cs
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
// TODO: Commodity?
|
||||
public class DaemonBone : BaseReagent
|
||||
{
|
||||
public override double DefaultWeight
|
||||
{
|
||||
get { return 1.0; }
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public DaemonBone() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public DaemonBone( int amount ) : base( 0xF80, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public DaemonBone( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
40
Scripts/Items/Resources/Reagents/DeadWood.cs
Normal file
40
Scripts/Items/Resources/Reagents/DeadWood.cs
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class DeadWood : BaseReagent, ICommodity
|
||||
{
|
||||
int ICommodity.DescriptionNumber { get { return LabelNumber; } }
|
||||
bool ICommodity.IsDeedable { get { return true; } }
|
||||
|
||||
[Constructable]
|
||||
public DeadWood() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public DeadWood( int amount ) : base( 0xF90, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public DeadWood( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
42
Scripts/Items/Resources/Reagents/DragonsBlood.cs
Normal file
42
Scripts/Items/Resources/Reagents/DragonsBlood.cs
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class DragonsBlood : BaseReagent, ICommodity
|
||||
{
|
||||
int ICommodity.DescriptionNumber { get { return LabelNumber; } }
|
||||
bool ICommodity.IsDeedable { get { return Core.ML; } }
|
||||
|
||||
[Constructable]
|
||||
public DragonsBlood()
|
||||
: this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public DragonsBlood( int amount )
|
||||
: base( 0x4077, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public DragonsBlood( Serial serial )
|
||||
: base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
42
Scripts/Items/Resources/Reagents/Garlic.cs
Normal file
42
Scripts/Items/Resources/Reagents/Garlic.cs
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class Garlic : BaseReagent, ICommodity
|
||||
{
|
||||
int ICommodity.DescriptionNumber { get { return LabelNumber; } }
|
||||
bool ICommodity.IsDeedable { get { return true; } }
|
||||
|
||||
[Constructable]
|
||||
public Garlic() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Garlic( int amount ) : base( 0xF84, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public Garlic( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
42
Scripts/Items/Resources/Reagents/Ginseng.cs
Normal file
42
Scripts/Items/Resources/Reagents/Ginseng.cs
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class Ginseng : BaseReagent, ICommodity
|
||||
{
|
||||
int ICommodity.DescriptionNumber { get { return LabelNumber; } }
|
||||
bool ICommodity.IsDeedable { get { return true; } }
|
||||
|
||||
[Constructable]
|
||||
public Ginseng() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Ginseng( int amount ) : base( 0xF85, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public Ginseng( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
42
Scripts/Items/Resources/Reagents/GraveDust.cs
Normal file
42
Scripts/Items/Resources/Reagents/GraveDust.cs
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class GraveDust : BaseReagent, ICommodity
|
||||
{
|
||||
int ICommodity.DescriptionNumber { get { return LabelNumber; } }
|
||||
bool ICommodity.IsDeedable { get { return true; } }
|
||||
|
||||
[Constructable]
|
||||
public GraveDust() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public GraveDust( int amount ) : base( 0xF8F, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public GraveDust( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
42
Scripts/Items/Resources/Reagents/MandrakeRoot.cs
Normal file
42
Scripts/Items/Resources/Reagents/MandrakeRoot.cs
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class MandrakeRoot : BaseReagent, ICommodity
|
||||
{
|
||||
int ICommodity.DescriptionNumber { get { return LabelNumber; } }
|
||||
bool ICommodity.IsDeedable { get { return true; } }
|
||||
|
||||
[Constructable]
|
||||
public MandrakeRoot() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public MandrakeRoot( int amount ) : base( 0xF86, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public MandrakeRoot( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
42
Scripts/Items/Resources/Reagents/Nightshade.cs
Normal file
42
Scripts/Items/Resources/Reagents/Nightshade.cs
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class Nightshade : BaseReagent, ICommodity
|
||||
{
|
||||
int ICommodity.DescriptionNumber { get { return LabelNumber; } }
|
||||
bool ICommodity.IsDeedable { get { return true; } }
|
||||
|
||||
[Constructable]
|
||||
public Nightshade() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Nightshade( int amount ) : base( 0xF88, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public Nightshade( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
42
Scripts/Items/Resources/Reagents/NoxCrystal.cs
Normal file
42
Scripts/Items/Resources/Reagents/NoxCrystal.cs
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class NoxCrystal : BaseReagent, ICommodity
|
||||
{
|
||||
int ICommodity.DescriptionNumber { get { return LabelNumber; } }
|
||||
bool ICommodity.IsDeedable { get { return true; } }
|
||||
|
||||
[Constructable]
|
||||
public NoxCrystal() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public NoxCrystal( int amount ) : base( 0xF8E, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public NoxCrystal( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
42
Scripts/Items/Resources/Reagents/PigIron.cs
Normal file
42
Scripts/Items/Resources/Reagents/PigIron.cs
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class PigIron : BaseReagent, ICommodity
|
||||
{
|
||||
int ICommodity.DescriptionNumber { get { return LabelNumber; } }
|
||||
bool ICommodity.IsDeedable { get { return true; } }
|
||||
|
||||
[Constructable]
|
||||
public PigIron() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public PigIron( int amount ) : base( 0xF8A, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public PigIron( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
42
Scripts/Items/Resources/Reagents/SpidersSilk.cs
Normal file
42
Scripts/Items/Resources/Reagents/SpidersSilk.cs
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class SpidersSilk : BaseReagent, ICommodity
|
||||
{
|
||||
int ICommodity.DescriptionNumber { get { return LabelNumber; } }
|
||||
bool ICommodity.IsDeedable { get { return true; } }
|
||||
|
||||
[Constructable]
|
||||
public SpidersSilk() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public SpidersSilk( int amount ) : base( 0xF8D, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public SpidersSilk( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
42
Scripts/Items/Resources/Reagents/SulfurousAsh.cs
Normal file
42
Scripts/Items/Resources/Reagents/SulfurousAsh.cs
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class SulfurousAsh : BaseReagent, ICommodity
|
||||
{
|
||||
int ICommodity.DescriptionNumber { get { return LabelNumber; } }
|
||||
bool ICommodity.IsDeedable { get { return true; } }
|
||||
|
||||
[Constructable]
|
||||
public SulfurousAsh() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public SulfurousAsh( int amount ) : base( 0xF8C, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public SulfurousAsh( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
68
Scripts/Items/Resources/Tailor/BoltOfCloth.cs
Normal file
68
Scripts/Items/Resources/Tailor/BoltOfCloth.cs
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[FlipableAttribute( 0xF95, 0xF96, 0xF97, 0xF98, 0xF99, 0xF9A, 0xF9B, 0xF9C )]
|
||||
public class BoltOfCloth : Item, IScissorable, IDyable, ICommodity
|
||||
{
|
||||
int ICommodity.DescriptionNumber { get { return LabelNumber; } }
|
||||
bool ICommodity.IsDeedable { get { return true; } }
|
||||
|
||||
[Constructable]
|
||||
public BoltOfCloth() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public BoltOfCloth( int amount ) : base( 0xF95 )
|
||||
{
|
||||
Stackable = true;
|
||||
Weight = 5.0;
|
||||
Amount = amount;
|
||||
}
|
||||
|
||||
public BoltOfCloth( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public bool Dye( Mobile from, DyeTub sender )
|
||||
{
|
||||
if ( Deleted ) return false;
|
||||
|
||||
Hue = sender.DyedHue;
|
||||
|
||||
return true;
|
||||
}
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
|
||||
public bool Scissor( Mobile from, Scissors scissors )
|
||||
{
|
||||
if ( Deleted || !from.CanSee( this ) ) return false;
|
||||
|
||||
base.ScissorHelper( from, new Cloth(), 50 );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
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() ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
44
Scripts/Items/Resources/Tailor/Bone.cs
Normal file
44
Scripts/Items/Resources/Tailor/Bone.cs
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class Bone : Item, ICommodity
|
||||
{
|
||||
int ICommodity.DescriptionNumber { get { return LabelNumber; } }
|
||||
bool ICommodity.IsDeedable { get { return true; } }
|
||||
|
||||
[Constructable]
|
||||
public Bone() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Bone( int amount ) : base( 0xf7e )
|
||||
{
|
||||
Stackable = true;
|
||||
Amount = amount;
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
||||
public Bone( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
74
Scripts/Items/Resources/Tailor/Cloth.cs
Normal file
74
Scripts/Items/Resources/Tailor/Cloth.cs
Normal file
|
|
@ -0,0 +1,74 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[FlipableAttribute( 0x1766, 0x1768 )]
|
||||
public class Cloth : Item, IScissorable, IDyable, ICommodity
|
||||
{
|
||||
int ICommodity.DescriptionNumber { get { return LabelNumber; } }
|
||||
bool ICommodity.IsDeedable { get { return true; } }
|
||||
|
||||
public override double DefaultWeight
|
||||
{
|
||||
get { return 0.1; }
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Cloth() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Cloth( int amount ) : base( 0x1766 )
|
||||
{
|
||||
Stackable = true;
|
||||
Amount = amount;
|
||||
}
|
||||
|
||||
public Cloth( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public bool Dye( Mobile from, DyeTub sender )
|
||||
{
|
||||
if ( Deleted )
|
||||
return false;
|
||||
|
||||
Hue = sender.DyedHue;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
|
||||
public override void OnSingleClick( Mobile from )
|
||||
{
|
||||
int number = (Amount == 1) ? 1049124 : 1049123;
|
||||
|
||||
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;
|
||||
|
||||
base.ScissorHelper( from, new Bandage(), 1 );
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
115
Scripts/Items/Resources/Tailor/Cotton.cs
Normal file
115
Scripts/Items/Resources/Tailor/Cotton.cs
Normal file
|
|
@ -0,0 +1,115 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
using Server.Targeting;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class Cotton : Item, IDyable
|
||||
{
|
||||
[Constructable]
|
||||
public Cotton() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Cotton( int amount ) : base( 0xDF9 )
|
||||
{
|
||||
Stackable = true;
|
||||
Weight = 4.0;
|
||||
Amount = amount;
|
||||
}
|
||||
|
||||
public Cotton( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
public bool Dye( Mobile from, DyeTub sender )
|
||||
{
|
||||
if ( Deleted )
|
||||
return false;
|
||||
|
||||
Hue = sender.DyedHue;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
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.
|
||||
}
|
||||
}
|
||||
|
||||
public static void OnSpun( ISpinningWheel wheel, Mobile from, int hue )
|
||||
{
|
||||
Item item = new SpoolOfThread( 6 );
|
||||
item.Hue = hue;
|
||||
|
||||
from.AddToBackpack( item );
|
||||
from.SendLocalizedMessage( 1010577 ); // You put the spools of thread in your backpack.
|
||||
}
|
||||
|
||||
private class PickWheelTarget : Target
|
||||
{
|
||||
private Cotton m_Cotton;
|
||||
|
||||
public PickWheelTarget( Cotton cotton ) : base( 3, false, TargetFlags.None )
|
||||
{
|
||||
m_Cotton = cotton;
|
||||
}
|
||||
|
||||
protected override void OnTarget( Mobile from, object targeted )
|
||||
{
|
||||
if ( m_Cotton.Deleted )
|
||||
return;
|
||||
|
||||
ISpinningWheel wheel = targeted as ISpinningWheel;
|
||||
|
||||
if ( wheel == null && targeted is AddonComponent )
|
||||
wheel = ((AddonComponent)targeted).Addon as ISpinningWheel;
|
||||
|
||||
if ( wheel is Item )
|
||||
{
|
||||
Item item = (Item)wheel;
|
||||
|
||||
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( new SpinCallback( Cotton.OnSpun ), from, m_Cotton.Hue );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage( 502658 ); // Use that on a spinning wheel.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
105
Scripts/Items/Resources/Tailor/Flax.cs
Normal file
105
Scripts/Items/Resources/Tailor/Flax.cs
Normal file
|
|
@ -0,0 +1,105 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
using Server.Targeting;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class Flax : Item
|
||||
{
|
||||
[Constructable]
|
||||
public Flax() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Flax( int amount ) : base( 0x1A9C )
|
||||
{
|
||||
Stackable = true;
|
||||
Weight = 1.0;
|
||||
Amount = amount;
|
||||
}
|
||||
|
||||
public Flax( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
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.
|
||||
}
|
||||
}
|
||||
|
||||
public static void OnSpun( ISpinningWheel wheel, Mobile from, int hue )
|
||||
{
|
||||
Item item = new SpoolOfThread( 6 );
|
||||
item.Hue = hue;
|
||||
|
||||
from.AddToBackpack( item );
|
||||
from.SendLocalizedMessage( 1010577 ); // You put the spools of thread in your backpack.
|
||||
}
|
||||
|
||||
private class PickWheelTarget : Target
|
||||
{
|
||||
private Flax m_Flax;
|
||||
|
||||
public PickWheelTarget( Flax flax ) : base( 3, false, TargetFlags.None )
|
||||
{
|
||||
m_Flax = flax;
|
||||
}
|
||||
|
||||
protected override void OnTarget( Mobile from, object targeted )
|
||||
{
|
||||
if ( m_Flax.Deleted )
|
||||
return;
|
||||
|
||||
ISpinningWheel wheel = targeted as ISpinningWheel;
|
||||
|
||||
if ( wheel == null && targeted is AddonComponent )
|
||||
wheel = ((AddonComponent)targeted).Addon as ISpinningWheel;
|
||||
|
||||
if ( wheel is Item )
|
||||
{
|
||||
Item item = (Item)wheel;
|
||||
|
||||
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( new SpinCallback( Flax.OnSpun ), from, m_Flax.Hue );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage( 502658 ); // Use that on a spinning wheel.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
292
Scripts/Items/Resources/Tailor/Hides.cs
Normal file
292
Scripts/Items/Resources/Tailor/Hides.cs
Normal file
|
|
@ -0,0 +1,292 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public abstract class BaseHides : Item, ICommodity
|
||||
{
|
||||
private CraftResource m_Resource;
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public CraftResource Resource
|
||||
{
|
||||
get{ return m_Resource; }
|
||||
set{ m_Resource = value; InvalidateProperties(); }
|
||||
}
|
||||
|
||||
int ICommodity.DescriptionNumber { get { return LabelNumber; } }
|
||||
bool ICommodity.IsDeedable { get { return true; } }
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 1 ); // version
|
||||
|
||||
writer.Write( (int) m_Resource );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch ( version )
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
m_Resource = (CraftResource)reader.ReadInt();
|
||||
break;
|
||||
}
|
||||
case 0:
|
||||
{
|
||||
OreInfo info = new OreInfo( reader.ReadInt(), reader.ReadInt(), reader.ReadString() );
|
||||
|
||||
m_Resource = CraftResources.GetFromOreInfo( info );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public BaseHides( CraftResource resource ) : this( resource, 1 )
|
||||
{
|
||||
}
|
||||
|
||||
public BaseHides( CraftResource resource, int amount ) : base( 0x1079 )
|
||||
{
|
||||
Stackable = true;
|
||||
Weight = 5.0;
|
||||
Amount = amount;
|
||||
Hue = CraftResources.GetHue( resource );
|
||||
|
||||
m_Resource = resource;
|
||||
}
|
||||
|
||||
public BaseHides( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
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 void GetProperties( ObjectPropertyList list )
|
||||
{
|
||||
base.GetProperties( list );
|
||||
|
||||
if ( !CraftResources.IsStandard( m_Resource ) )
|
||||
{
|
||||
int num = CraftResources.GetLocalizationNumber( m_Resource );
|
||||
|
||||
if ( num > 0 )
|
||||
list.Add( num );
|
||||
else
|
||||
list.Add( CraftResources.GetName( m_Resource ) );
|
||||
}
|
||||
}
|
||||
|
||||
public override int LabelNumber
|
||||
{
|
||||
get
|
||||
{
|
||||
if ( m_Resource >= CraftResource.SpinedLeather && m_Resource <= CraftResource.BarbedLeather )
|
||||
return 1049687 + (int)(m_Resource - CraftResource.SpinedLeather);
|
||||
|
||||
return 1047023;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[FlipableAttribute( 0x1079, 0x1078 )]
|
||||
public class Hides : BaseHides, IScissorable
|
||||
{
|
||||
[Constructable]
|
||||
public Hides() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Hides( int amount ) : base( CraftResource.RegularLeather, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public Hides( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
base.ScissorHelper( from, new Leather(), 1 );
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
[FlipableAttribute( 0x1079, 0x1078 )]
|
||||
public class SpinedHides : BaseHides, IScissorable
|
||||
{
|
||||
[Constructable]
|
||||
public SpinedHides() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public SpinedHides( int amount ) : base( CraftResource.SpinedLeather, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public SpinedHides( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
base.ScissorHelper( from, new SpinedLeather(), 1 );
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
[FlipableAttribute( 0x1079, 0x1078 )]
|
||||
public class HornedHides : BaseHides, IScissorable
|
||||
{
|
||||
[Constructable]
|
||||
public HornedHides() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public HornedHides( int amount ) : base( CraftResource.HornedLeather, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public HornedHides( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
base.ScissorHelper( from, new HornedLeather(), 1 );
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
[FlipableAttribute( 0x1079, 0x1078 )]
|
||||
public class BarbedHides : BaseHides, IScissorable
|
||||
{
|
||||
[Constructable]
|
||||
public BarbedHides() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public BarbedHides( int amount ) : base( CraftResource.BarbedLeather, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public BarbedHides( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
base.ScissorHelper( from, new BarbedLeather(), 1 );
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
241
Scripts/Items/Resources/Tailor/Leathers.cs
Normal file
241
Scripts/Items/Resources/Tailor/Leathers.cs
Normal file
|
|
@ -0,0 +1,241 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public abstract class BaseLeather : Item, ICommodity
|
||||
{
|
||||
private CraftResource m_Resource;
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public CraftResource Resource
|
||||
{
|
||||
get{ return m_Resource; }
|
||||
set{ m_Resource = value; InvalidateProperties(); }
|
||||
}
|
||||
|
||||
int ICommodity.DescriptionNumber { get { return LabelNumber; } }
|
||||
bool ICommodity.IsDeedable { get { return true; } }
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 1 ); // version
|
||||
|
||||
writer.Write( (int) m_Resource );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch ( version )
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
m_Resource = (CraftResource)reader.ReadInt();
|
||||
break;
|
||||
}
|
||||
case 0:
|
||||
{
|
||||
OreInfo info = new OreInfo( reader.ReadInt(), reader.ReadInt(), reader.ReadString() );
|
||||
|
||||
m_Resource = CraftResources.GetFromOreInfo( info );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public BaseLeather( CraftResource resource ) : this( resource, 1 )
|
||||
{
|
||||
}
|
||||
|
||||
public BaseLeather( CraftResource resource, int amount ) : base( 0x1081 )
|
||||
{
|
||||
Stackable = true;
|
||||
Weight = 1.0;
|
||||
Amount = amount;
|
||||
Hue = CraftResources.GetHue( resource );
|
||||
|
||||
m_Resource = resource;
|
||||
}
|
||||
|
||||
public BaseLeather( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
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 void GetProperties( ObjectPropertyList list )
|
||||
{
|
||||
base.GetProperties( list );
|
||||
|
||||
if ( !CraftResources.IsStandard( m_Resource ) )
|
||||
{
|
||||
int num = CraftResources.GetLocalizationNumber( m_Resource );
|
||||
|
||||
if ( num > 0 )
|
||||
list.Add( num );
|
||||
else
|
||||
list.Add( CraftResources.GetName( m_Resource ) );
|
||||
}
|
||||
}
|
||||
|
||||
public override int LabelNumber
|
||||
{
|
||||
get
|
||||
{
|
||||
if ( m_Resource >= CraftResource.SpinedLeather && m_Resource <= CraftResource.BarbedLeather )
|
||||
return 1049684 + (int)(m_Resource - CraftResource.SpinedLeather);
|
||||
|
||||
return 1047022;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[FlipableAttribute( 0x1081, 0x1082 )]
|
||||
public class Leather : BaseLeather
|
||||
{
|
||||
[Constructable]
|
||||
public Leather() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Leather( int amount ) : base( CraftResource.RegularLeather, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public Leather( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
[FlipableAttribute( 0x1081, 0x1082 )]
|
||||
public class SpinedLeather : BaseLeather
|
||||
{
|
||||
[Constructable]
|
||||
public SpinedLeather() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public SpinedLeather( int amount ) : base( CraftResource.SpinedLeather, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public SpinedLeather( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
[FlipableAttribute( 0x1081, 0x1082 )]
|
||||
public class HornedLeather : BaseLeather
|
||||
{
|
||||
[Constructable]
|
||||
public HornedLeather() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public HornedLeather( int amount ) : base( CraftResource.HornedLeather, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public HornedLeather( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
[FlipableAttribute( 0x1081, 0x1082 )]
|
||||
public class BarbedLeather : BaseLeather
|
||||
{
|
||||
[Constructable]
|
||||
public BarbedLeather() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public BarbedLeather( int amount ) : base( CraftResource.BarbedLeather, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public BarbedLeather( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
73
Scripts/Items/Resources/Tailor/UncutCloth.cs
Normal file
73
Scripts/Items/Resources/Tailor/UncutCloth.cs
Normal file
|
|
@ -0,0 +1,73 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[FlipableAttribute( 0x1765, 0x1767 )]
|
||||
public class UncutCloth : Item, IScissorable, IDyable, ICommodity
|
||||
{
|
||||
int ICommodity.DescriptionNumber { get { return LabelNumber; } }
|
||||
bool ICommodity.IsDeedable { get { return true; } }
|
||||
|
||||
public override double DefaultWeight
|
||||
{
|
||||
get { return 0.1; }
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public UncutCloth() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public UncutCloth( int amount ) : base( 0x1767 )
|
||||
{
|
||||
Stackable = true;
|
||||
Amount = amount;
|
||||
}
|
||||
|
||||
public UncutCloth( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public bool Dye( Mobile from, DyeTub sender )
|
||||
{
|
||||
if ( Deleted )
|
||||
return false;
|
||||
|
||||
Hue = sender.DyedHue;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
|
||||
public override void OnSingleClick( Mobile from )
|
||||
{
|
||||
int number = (Amount == 1) ? 1049124 : 1049123;
|
||||
|
||||
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;
|
||||
|
||||
base.ScissorHelper( from, new Bandage(), 1 );
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
158
Scripts/Items/Resources/Tailor/Wool.cs
Normal file
158
Scripts/Items/Resources/Tailor/Wool.cs
Normal file
|
|
@ -0,0 +1,158 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
using Server.Targeting;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class Wool : Item, IDyable
|
||||
{
|
||||
[Constructable]
|
||||
public Wool() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Wool( int amount ) : base( 0xDF8 )
|
||||
{
|
||||
Stackable = true;
|
||||
Weight = 4.0;
|
||||
Amount = amount;
|
||||
}
|
||||
|
||||
public Wool( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
public bool Dye( Mobile from, DyeTub sender )
|
||||
{
|
||||
if ( Deleted )
|
||||
return false;
|
||||
|
||||
Hue = sender.DyedHue;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
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.
|
||||
}
|
||||
}
|
||||
|
||||
public static void OnSpun( ISpinningWheel wheel, Mobile from, int hue )
|
||||
{
|
||||
Item item = new DarkYarn( 3 );
|
||||
item.Hue = hue;
|
||||
|
||||
from.AddToBackpack( item );
|
||||
from.SendLocalizedMessage( 1010576 ); // You put the balls of yarn in your backpack.
|
||||
}
|
||||
|
||||
private class PickWheelTarget : Target
|
||||
{
|
||||
private Wool m_Wool;
|
||||
|
||||
public PickWheelTarget( Wool wool ) : base( 3, false, TargetFlags.None )
|
||||
{
|
||||
m_Wool = wool;
|
||||
}
|
||||
|
||||
protected override void OnTarget( Mobile from, object targeted )
|
||||
{
|
||||
if ( m_Wool.Deleted )
|
||||
return;
|
||||
|
||||
ISpinningWheel wheel = targeted as ISpinningWheel;
|
||||
|
||||
if ( wheel == null && targeted is AddonComponent )
|
||||
wheel = ((AddonComponent)targeted).Addon as ISpinningWheel;
|
||||
|
||||
if ( wheel is Item )
|
||||
{
|
||||
Item item = (Item)wheel;
|
||||
|
||||
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();
|
||||
if ( m_Wool is TaintedWool ) wheel.BeginSpin( new SpinCallback( TaintedWool.OnSpun ), from, m_Wool.Hue );
|
||||
else wheel.BeginSpin( new SpinCallback( Wool.OnSpun ), from, m_Wool.Hue );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage( 502658 ); // Use that on a spinning wheel.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
public class TaintedWool : Wool
|
||||
{
|
||||
[Constructable]
|
||||
public TaintedWool() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public TaintedWool( int amount ) : base( 0x101F )
|
||||
{
|
||||
Stackable = true;
|
||||
Weight = 4.0;
|
||||
Amount = amount;
|
||||
}
|
||||
|
||||
public TaintedWool( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
|
||||
new public static 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.
|
||||
}
|
||||
}
|
||||
}
|
||||
235
Scripts/Items/Resources/Tailor/YarnsAndThreads.cs
Normal file
235
Scripts/Items/Resources/Tailor/YarnsAndThreads.cs
Normal file
|
|
@ -0,0 +1,235 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
using Server.Targeting;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
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( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
|
||||
public bool Dye( Mobile from, DyeTub sender )
|
||||
{
|
||||
if ( Deleted )
|
||||
return false;
|
||||
|
||||
Hue = sender.DyedHue;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
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;
|
||||
|
||||
ILoom loom = targeted as ILoom;
|
||||
|
||||
if ( loom == null && targeted is AddonComponent )
|
||||
loom = ((AddonComponent)targeted).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 ( targeted is Item )
|
||||
((Item)targeted).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.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class DarkYarn : BaseClothMaterial
|
||||
{
|
||||
[Constructable]
|
||||
public DarkYarn() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public DarkYarn( int amount ) : base( 0xE1D, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public DarkYarn( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class LightYarn : BaseClothMaterial
|
||||
{
|
||||
[Constructable]
|
||||
public LightYarn() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public LightYarn( int amount ) : base( 0xE1E, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public LightYarn( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class LightYarnUnraveled : BaseClothMaterial
|
||||
{
|
||||
[Constructable]
|
||||
public LightYarnUnraveled() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public LightYarnUnraveled( int amount ) : base( 0xE1F, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public LightYarnUnraveled( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class SpoolOfThread : BaseClothMaterial
|
||||
{
|
||||
[Constructable]
|
||||
public SpoolOfThread() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public SpoolOfThread( int amount ) : base( 0xFA0, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public SpoolOfThread( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue