diff --git a/Scripts/Items/Deeds/CommodityDeed.cs b/Scripts/Items/Deeds/CommodityDeed.cs index d0580512a..4e9b2525b 100644 --- a/Scripts/Items/Deeds/CommodityDeed.cs +++ b/Scripts/Items/Deeds/CommodityDeed.cs @@ -4,10 +4,10 @@ using Server.Network; namespace Server.Items { - public interface ICommodity + public interface ICommodity /* added IsDeedable prop so expansion-based deedables can determine true/false */ { - string Description{ get; } int DescriptionNumber{ get; } + bool IsDeedable { get; } } public class CommodityDeed : Item @@ -27,7 +27,7 @@ namespace Server.Items { InvalidateProperties(); - if ( m_Commodity == null && item is ICommodity ) + if ( m_Commodity == null && item is ICommodity && ((ICommodity)item).IsDeedable ) { m_Commodity = item; m_Commodity.Internalize(); @@ -45,7 +45,7 @@ namespace Server.Items { base.Serialize( writer ); - writer.Write( (int) 0 ); // version + writer.Write( (int) 1 ); // version writer.Write( m_Commodity ); } @@ -56,12 +56,16 @@ namespace Server.Items int version = reader.ReadInt(); + m_Commodity = reader.ReadItem(); + switch ( version ) { case 0: { - m_Commodity = reader.ReadItem(); - + if (m_Commodity != null) + { + Hue = 0x592; + } break; } } @@ -105,10 +109,12 @@ namespace Server.Items { base.GetProperties( list ); - if ( m_Commodity != null && m_Commodity is ICommodity ) - list.Add( 1060658, "#{0}\t{1}", ((ICommodity)m_Commodity).DescriptionNumber, m_Commodity.Amount ); // ~1_val~: ~2_val~ + if (m_Commodity != null && m_Commodity is ICommodity) + { + list.Add(1060658, "#{0}\t{1}", ((ICommodity)m_Commodity).DescriptionNumber, m_Commodity.Amount); // ~1_val~: ~2_val~ + } else - list.Add( 1060748 ); // unfilled + list.Add(1060748); // unfilled } public override void OnSingleClick( Mobile from ) @@ -116,7 +122,20 @@ namespace Server.Items base.OnSingleClick( from ); if ( m_Commodity != null && m_Commodity is ICommodity ) - from.Send( new UnicodeMessage( Serial, ItemID, MessageType.Label, 0x3B2, 3, "ENU", "", ((ICommodity)m_Commodity).Description ) ); + + from.Send(new MessageLocalizedAffix( + Serial, + ItemID, + MessageType.Label, + 0x3B2, + 3, + (m_Commodity.Name == null) ? ((ICommodity)m_Commodity).DescriptionNumber : 0, + (m_Commodity.Name != null) ? m_Commodity.Name : null, + AffixType.Append, + String.Format(": {0}", + m_Commodity.Amount), + null) + ); } public override void OnDoubleClick( Mobile from ) @@ -220,6 +239,7 @@ namespace Server.Items { if ( m_Deed.SetCommodity( (Item) targeted ) ) { + m_Deed.Hue = 0x592; number = 1047030; // The commodity deed has been filled. } else diff --git a/Scripts/Items/Resources/Arrows/Arrow.cs b/Scripts/Items/Resources/Arrows/Arrow.cs index 2def6ddba..801bed524 100644 --- a/Scripts/Items/Resources/Arrows/Arrow.cs +++ b/Scripts/Items/Resources/Arrows/Arrow.cs @@ -4,15 +4,8 @@ namespace Server.Items { public class Arrow : Item, ICommodity { - string ICommodity.Description - { - get - { - return String.Format( Amount == 1 ? "{0} arrow" : "{0} arrows", Amount ); - } - } - int ICommodity.DescriptionNumber { get { return LabelNumber; } } + bool ICommodity.IsDeedable { get { return true; } } public override double DefaultWeight { diff --git a/Scripts/Items/Resources/Arrows/Bolt.cs b/Scripts/Items/Resources/Arrows/Bolt.cs index f30259842..a6928997f 100644 --- a/Scripts/Items/Resources/Arrows/Bolt.cs +++ b/Scripts/Items/Resources/Arrows/Bolt.cs @@ -4,15 +4,8 @@ namespace Server.Items { public class Bolt : Item, ICommodity { - string ICommodity.Description - { - get - { - return String.Format( Amount == 1 ? "{0} bolt" : "{0} bolts", Amount ); - } - } - int ICommodity.DescriptionNumber { get { return LabelNumber; } } + bool ICommodity.IsDeedable { get { return true; } } public override double DefaultWeight { diff --git a/Scripts/Items/Resources/Arrows/Feather.cs b/Scripts/Items/Resources/Arrows/Feather.cs index d68391f9b..f37bb8443 100644 --- a/Scripts/Items/Resources/Arrows/Feather.cs +++ b/Scripts/Items/Resources/Arrows/Feather.cs @@ -5,15 +5,8 @@ namespace Server.Items { public class Feather : Item, ICommodity { - string ICommodity.Description - { - get - { - return String.Format( Amount == 1 ? "{0} feather" : "{0} feathers", Amount ); - } - } - int ICommodity.DescriptionNumber { get { return LabelNumber; } } + bool ICommodity.IsDeedable { get { return true; } } public override double DefaultWeight { diff --git a/Scripts/Items/Resources/Arrows/Shaft.cs b/Scripts/Items/Resources/Arrows/Shaft.cs index 34dd57e16..5e0254442 100644 --- a/Scripts/Items/Resources/Arrows/Shaft.cs +++ b/Scripts/Items/Resources/Arrows/Shaft.cs @@ -5,15 +5,8 @@ namespace Server.Items { public class Shaft : Item, ICommodity { - string ICommodity.Description - { - get - { - return String.Format( Amount == 1 ? "{0} shaft" : "{0} shafts", Amount ); - } - } - int ICommodity.DescriptionNumber { get { return LabelNumber; } } + bool ICommodity.IsDeedable { get { return true; } } public override double DefaultWeight { diff --git a/Scripts/Items/Resources/Blacksmithing/Ingots.cs b/Scripts/Items/Resources/Blacksmithing/Ingots.cs index f36746971..a5e7427de 100644 --- a/Scripts/Items/Resources/Blacksmithing/Ingots.cs +++ b/Scripts/Items/Resources/Blacksmithing/Ingots.cs @@ -20,15 +20,8 @@ namespace Server.Items get { return 0.1; } } - string ICommodity.Description - { - get - { - return String.Format( Amount == 1 ? "{0} {1} ingot" : "{0} {1} ingots", Amount, CraftResources.GetName( m_Resource ).ToLower() ); - } - } - int ICommodity.DescriptionNumber { get { return LabelNumber; } } + bool ICommodity.IsDeedable { get { return true; } } public override void Serialize( GenericWriter writer ) { diff --git a/Scripts/Items/Resources/Blacksmithing/Ore.cs b/Scripts/Items/Resources/Blacksmithing/Ore.cs index 41da8264c..0bca1adc6 100644 --- a/Scripts/Items/Resources/Blacksmithing/Ore.cs +++ b/Scripts/Items/Resources/Blacksmithing/Ore.cs @@ -18,15 +18,8 @@ namespace Server.Items set{ m_Resource = value; InvalidateProperties(); } } - string ICommodity.Description - { - get - { - return String.Format( "{0} {1} ore", Amount, CraftResources.GetName( m_Resource ).ToLower() ); - } - } - int ICommodity.DescriptionNumber { get { return LabelNumber; } } + bool ICommodity.IsDeedable { get { return true; } } public abstract BaseIngot GetIngot(); diff --git a/Scripts/Items/Resources/Blacksmithing/Scales.cs b/Scripts/Items/Resources/Blacksmithing/Scales.cs index ceed707b6..88f1f74aa 100644 --- a/Scripts/Items/Resources/Blacksmithing/Scales.cs +++ b/Scripts/Items/Resources/Blacksmithing/Scales.cs @@ -22,15 +22,8 @@ namespace Server.Items get { return 0.1; } } - string ICommodity.Description - { - get - { - return String.Format( Amount == 1 ? "{1}" : "{0} {1}", Amount, CraftResources.GetName( m_Resource ).ToLower() ); - } - } - int ICommodity.DescriptionNumber { get { return LabelNumber; } } + bool ICommodity.IsDeedable { get { return true; } } public override void Serialize( GenericWriter writer ) { diff --git a/Scripts/Items/Resources/Reagents/BatWing.cs b/Scripts/Items/Resources/Reagents/BatWing.cs index 764c8f93d..9bb287703 100644 --- a/Scripts/Items/Resources/Reagents/BatWing.cs +++ b/Scripts/Items/Resources/Reagents/BatWing.cs @@ -6,15 +6,8 @@ namespace Server.Items { public class BatWing : BaseReagent, ICommodity { - string ICommodity.Description - { - get - { - return String.Format( "{0} bat wing", Amount ); - } - } - int ICommodity.DescriptionNumber { get { return LabelNumber; } } + bool ICommodity.IsDeedable { get { return true; } } [Constructable] public BatWing() : this( 1 ) diff --git a/Scripts/Items/Resources/Reagents/BlackPearl.cs b/Scripts/Items/Resources/Reagents/BlackPearl.cs index 25418e6ba..2096bdf9a 100644 --- a/Scripts/Items/Resources/Reagents/BlackPearl.cs +++ b/Scripts/Items/Resources/Reagents/BlackPearl.cs @@ -6,15 +6,8 @@ namespace Server.Items { public class BlackPearl : BaseReagent, ICommodity { - string ICommodity.Description - { - get - { - return String.Format( "{0} black pearl", Amount ); - } - } - int ICommodity.DescriptionNumber { get { return LabelNumber; } } + bool ICommodity.IsDeedable { get { return true; } } [Constructable] public BlackPearl() : this( 1 ) @@ -30,8 +23,6 @@ namespace Server.Items { } - - public override void Serialize( GenericWriter writer ) { base.Serialize( writer ); diff --git a/Scripts/Items/Resources/Reagents/Bloodmoss.cs b/Scripts/Items/Resources/Reagents/Bloodmoss.cs index fa072b014..b8474fead 100644 --- a/Scripts/Items/Resources/Reagents/Bloodmoss.cs +++ b/Scripts/Items/Resources/Reagents/Bloodmoss.cs @@ -6,15 +6,8 @@ namespace Server.Items { public class Bloodmoss : BaseReagent, ICommodity { - string ICommodity.Description - { - get - { - return String.Format( "{0} bloodmoss", Amount ); - } - } - int ICommodity.DescriptionNumber { get { return LabelNumber; } } + bool ICommodity.IsDeedable { get { return true; } } [Constructable] public Bloodmoss() : this( 1 ) diff --git a/Scripts/Items/Resources/Reagents/DaemonBlood.cs b/Scripts/Items/Resources/Reagents/DaemonBlood.cs index 7cdfd5d33..3e0404ec2 100644 --- a/Scripts/Items/Resources/Reagents/DaemonBlood.cs +++ b/Scripts/Items/Resources/Reagents/DaemonBlood.cs @@ -6,15 +6,8 @@ namespace Server.Items { public class DaemonBlood : BaseReagent, ICommodity { - string ICommodity.Description - { - get - { - return String.Format( "{0} daemon blood", Amount ); - } - } - int ICommodity.DescriptionNumber { get { return LabelNumber; } } + bool ICommodity.IsDeedable { get { return true; } } [Constructable] public DaemonBlood() : this( 1 ) diff --git a/Scripts/Items/Resources/Reagents/DeadWood.cs b/Scripts/Items/Resources/Reagents/DeadWood.cs index 0940ecd85..cdadcb499 100644 --- a/Scripts/Items/Resources/Reagents/DeadWood.cs +++ b/Scripts/Items/Resources/Reagents/DeadWood.cs @@ -6,15 +6,8 @@ namespace Server.Items { public class DeadWood : BaseReagent, ICommodity { - string ICommodity.Description - { - get - { - return String.Format( "{0} dead wood", Amount ); - } - } - int ICommodity.DescriptionNumber { get { return LabelNumber; } } + bool ICommodity.IsDeedable { get { return true; } } [Constructable] public DeadWood() : this( 1 ) diff --git a/Scripts/Items/Resources/Reagents/Garlic.cs b/Scripts/Items/Resources/Reagents/Garlic.cs index 07e0b0365..84fbf4093 100644 --- a/Scripts/Items/Resources/Reagents/Garlic.cs +++ b/Scripts/Items/Resources/Reagents/Garlic.cs @@ -6,15 +6,8 @@ namespace Server.Items { public class Garlic : BaseReagent, ICommodity { - string ICommodity.Description - { - get - { - return String.Format( "{0} garlic", Amount ); - } - } - int ICommodity.DescriptionNumber { get { return LabelNumber; } } + bool ICommodity.IsDeedable { get { return true; } } [Constructable] public Garlic() : this( 1 ) diff --git a/Scripts/Items/Resources/Reagents/Ginseng.cs b/Scripts/Items/Resources/Reagents/Ginseng.cs index a712bbb09..7f544ce9a 100644 --- a/Scripts/Items/Resources/Reagents/Ginseng.cs +++ b/Scripts/Items/Resources/Reagents/Ginseng.cs @@ -6,16 +6,8 @@ namespace Server.Items { public class Ginseng : BaseReagent, ICommodity { - - string ICommodity.Description - { - get - { - return String.Format( "{0} ginseng", Amount ); - } - } - int ICommodity.DescriptionNumber { get { return LabelNumber; } } + bool ICommodity.IsDeedable { get { return true; } } [Constructable] public Ginseng() : this( 1 ) diff --git a/Scripts/Items/Resources/Reagents/GraveDust.cs b/Scripts/Items/Resources/Reagents/GraveDust.cs index 122c30216..371638389 100644 --- a/Scripts/Items/Resources/Reagents/GraveDust.cs +++ b/Scripts/Items/Resources/Reagents/GraveDust.cs @@ -6,15 +6,8 @@ namespace Server.Items { public class GraveDust : BaseReagent, ICommodity { - string ICommodity.Description - { - get - { - return String.Format( "{0} grave dust", Amount ); - } - } - int ICommodity.DescriptionNumber { get { return LabelNumber; } } + bool ICommodity.IsDeedable { get { return true; } } [Constructable] public GraveDust() : this( 1 ) diff --git a/Scripts/Items/Resources/Reagents/MandrakeRoot.cs b/Scripts/Items/Resources/Reagents/MandrakeRoot.cs index f502c2382..a3bd00db6 100644 --- a/Scripts/Items/Resources/Reagents/MandrakeRoot.cs +++ b/Scripts/Items/Resources/Reagents/MandrakeRoot.cs @@ -6,15 +6,8 @@ namespace Server.Items { public class MandrakeRoot : BaseReagent, ICommodity { - string ICommodity.Description - { - get - { - return String.Format( "{0} mandrake root", Amount ); - } - } - int ICommodity.DescriptionNumber { get { return LabelNumber; } } + bool ICommodity.IsDeedable { get { return true; } } [Constructable] public MandrakeRoot() : this( 1 ) diff --git a/Scripts/Items/Resources/Reagents/Nightshade.cs b/Scripts/Items/Resources/Reagents/Nightshade.cs index 93c2599ff..3a8cd4b9a 100644 --- a/Scripts/Items/Resources/Reagents/Nightshade.cs +++ b/Scripts/Items/Resources/Reagents/Nightshade.cs @@ -6,15 +6,8 @@ namespace Server.Items { public class Nightshade : BaseReagent, ICommodity { - string ICommodity.Description - { - get - { - return String.Format( "{0} nightshade", Amount ); - } - } - int ICommodity.DescriptionNumber { get { return LabelNumber; } } + bool ICommodity.IsDeedable { get { return true; } } [Constructable] public Nightshade() : this( 1 ) diff --git a/Scripts/Items/Resources/Reagents/NoxCrystal.cs b/Scripts/Items/Resources/Reagents/NoxCrystal.cs index 8f33c9ab3..4c8b1339c 100644 --- a/Scripts/Items/Resources/Reagents/NoxCrystal.cs +++ b/Scripts/Items/Resources/Reagents/NoxCrystal.cs @@ -6,15 +6,8 @@ namespace Server.Items { public class NoxCrystal : BaseReagent, ICommodity { - string ICommodity.Description - { - get - { - return String.Format( "{0} nox crystal", Amount ); - } - } - int ICommodity.DescriptionNumber { get { return LabelNumber; } } + bool ICommodity.IsDeedable { get { return true; } } [Constructable] public NoxCrystal() : this( 1 ) diff --git a/Scripts/Items/Resources/Reagents/PigIron.cs b/Scripts/Items/Resources/Reagents/PigIron.cs index ac5cee03c..999c212a5 100644 --- a/Scripts/Items/Resources/Reagents/PigIron.cs +++ b/Scripts/Items/Resources/Reagents/PigIron.cs @@ -6,15 +6,8 @@ namespace Server.Items { public class PigIron : BaseReagent, ICommodity { - string ICommodity.Description - { - get - { - return String.Format( "{0} pig iron", Amount ); - } - } - int ICommodity.DescriptionNumber { get { return LabelNumber; } } + bool ICommodity.IsDeedable { get { return true; } } [Constructable] public PigIron() : this( 1 ) diff --git a/Scripts/Items/Resources/Reagents/SpidersSilk.cs b/Scripts/Items/Resources/Reagents/SpidersSilk.cs index e74f0d720..cc3eef3ef 100644 --- a/Scripts/Items/Resources/Reagents/SpidersSilk.cs +++ b/Scripts/Items/Resources/Reagents/SpidersSilk.cs @@ -6,15 +6,8 @@ namespace Server.Items { public class SpidersSilk : BaseReagent, ICommodity { - string ICommodity.Description - { - get - { - return String.Format( "{0} spiders' silk", Amount ); - } - } - int ICommodity.DescriptionNumber { get { return LabelNumber; } } + bool ICommodity.IsDeedable { get { return true; } } [Constructable] public SpidersSilk() : this( 1 ) diff --git a/Scripts/Items/Resources/Reagents/SulfurousAsh.cs b/Scripts/Items/Resources/Reagents/SulfurousAsh.cs index 5043d6f8f..83a68c969 100644 --- a/Scripts/Items/Resources/Reagents/SulfurousAsh.cs +++ b/Scripts/Items/Resources/Reagents/SulfurousAsh.cs @@ -6,15 +6,8 @@ namespace Server.Items { public class SulfurousAsh : BaseReagent, ICommodity { - string ICommodity.Description - { - get - { - return String.Format( "{0} sulfurous ash", Amount ); - } - } - int ICommodity.DescriptionNumber { get { return LabelNumber; } } + bool ICommodity.IsDeedable { get { return true; } } [Constructable] public SulfurousAsh() : this( 1 ) diff --git a/Scripts/Items/Resources/Tailor/BoltOfCloth.cs b/Scripts/Items/Resources/Tailor/BoltOfCloth.cs index 7054b4357..6b429b722 100644 --- a/Scripts/Items/Resources/Tailor/BoltOfCloth.cs +++ b/Scripts/Items/Resources/Tailor/BoltOfCloth.cs @@ -7,15 +7,8 @@ namespace Server.Items [FlipableAttribute( 0xF95, 0xF96, 0xF97, 0xF98, 0xF99, 0xF9A, 0xF9B, 0xF9C )] public class BoltOfCloth : Item, IScissorable, IDyable, ICommodity { - string ICommodity.Description - { - get - { - return String.Format( Amount == 1 ? "{0} bolt of cloth" : "{0} bolts of cloth", Amount ); - } - } - int ICommodity.DescriptionNumber { get { return LabelNumber; } } + bool ICommodity.IsDeedable { get { return true; } } [Constructable] public BoltOfCloth() : this( 1 ) diff --git a/Scripts/Items/Resources/Tailor/Bone.cs b/Scripts/Items/Resources/Tailor/Bone.cs index 43cd42efc..38106d00e 100644 --- a/Scripts/Items/Resources/Tailor/Bone.cs +++ b/Scripts/Items/Resources/Tailor/Bone.cs @@ -5,15 +5,8 @@ namespace Server.Items { public class Bone : Item, ICommodity { - string ICommodity.Description - { - get - { - return String.Format( Amount == 1 ? "{0} bone" : "{0} bones", Amount ); - } - } - int ICommodity.DescriptionNumber { get { return LabelNumber; } } + bool ICommodity.IsDeedable { get { return true; } } [Constructable] public Bone() : this( 1 ) diff --git a/Scripts/Items/Resources/Tailor/Cloth.cs b/Scripts/Items/Resources/Tailor/Cloth.cs index 80d8a6970..c88f0cb4c 100644 --- a/Scripts/Items/Resources/Tailor/Cloth.cs +++ b/Scripts/Items/Resources/Tailor/Cloth.cs @@ -7,15 +7,8 @@ namespace Server.Items [FlipableAttribute( 0x1766, 0x1768 )] public class Cloth : Item, IScissorable, IDyable, ICommodity { - string ICommodity.Description - { - get - { - return String.Format( Amount == 1 ? "{0} piece of cloth" : "{0} pieces of cloth", Amount ); - } - } - int ICommodity.DescriptionNumber { get { return LabelNumber; } } + bool ICommodity.IsDeedable { get { return true; } } public override double DefaultWeight { diff --git a/Scripts/Items/Resources/Tailor/Hides.cs b/Scripts/Items/Resources/Tailor/Hides.cs index 50e67ad12..bfdf00722 100644 --- a/Scripts/Items/Resources/Tailor/Hides.cs +++ b/Scripts/Items/Resources/Tailor/Hides.cs @@ -15,15 +15,8 @@ namespace Server.Items set{ m_Resource = value; InvalidateProperties(); } } - string ICommodity.Description - { - get - { - return String.Format( Amount == 1 ? "{0} pile of hides" : "{0} piles of hides", Amount ); - } - } - int ICommodity.DescriptionNumber { get { return LabelNumber; } } + bool ICommodity.IsDeedable { get { return true; } } public override void Serialize( GenericWriter writer ) { diff --git a/Scripts/Items/Resources/Tailor/Leathers.cs b/Scripts/Items/Resources/Tailor/Leathers.cs index a0f3cb294..7998796d5 100644 --- a/Scripts/Items/Resources/Tailor/Leathers.cs +++ b/Scripts/Items/Resources/Tailor/Leathers.cs @@ -15,15 +15,8 @@ namespace Server.Items set{ m_Resource = value; InvalidateProperties(); } } - string ICommodity.Description - { - get - { - return String.Format( Amount == 1 ? "{0} piece of {1} leather" : "{0} pieces of {1} leather", Amount, CraftResources.GetName( m_Resource ).ToLower() ); - } - } - int ICommodity.DescriptionNumber { get { return LabelNumber; } } + bool ICommodity.IsDeedable { get { return true; } } public override void Serialize( GenericWriter writer ) { diff --git a/Scripts/Items/Resources/Tailor/UncutCloth.cs b/Scripts/Items/Resources/Tailor/UncutCloth.cs index e48b1aef5..b0f42d0e5 100644 --- a/Scripts/Items/Resources/Tailor/UncutCloth.cs +++ b/Scripts/Items/Resources/Tailor/UncutCloth.cs @@ -7,15 +7,8 @@ namespace Server.Items [FlipableAttribute( 0x1765, 0x1767 )] public class UncutCloth : Item, IScissorable, IDyable, ICommodity { - string ICommodity.Description - { - get - { - return String.Format( Amount == 1 ? "{0} piece of cloth" : "{0} pieces of cloth", Amount ); - } - } - int ICommodity.DescriptionNumber { get { return LabelNumber; } } + bool ICommodity.IsDeedable { get { return true; } } public override double DefaultWeight { diff --git a/Scripts/Items/Skill Items/Carpenter Items/Board.cs b/Scripts/Items/Skill Items/Carpenter Items/Board.cs index 9e83cea38..2567e49af 100644 --- a/Scripts/Items/Skill Items/Carpenter Items/Board.cs +++ b/Scripts/Items/Skill Items/Carpenter Items/Board.cs @@ -14,14 +14,6 @@ namespace Server.Items set { m_Resource = value; InvalidateProperties(); } } - string ICommodity.Description - { - get - { - return String.Format( Amount == 1 ? "{0} {1} board" : "{0} {1} boards", Amount, CraftResources.IsStandard( m_Resource ) ? String.Empty : CraftResources.GetName( m_Resource ).ToLower() ); - } - } - int ICommodity.DescriptionNumber { get @@ -40,6 +32,8 @@ namespace Server.Items } } + bool ICommodity.IsDeedable { get { return true; } } + [Constructable] public Board() : this( 1 ) diff --git a/Scripts/Items/Skill Items/Lumberjack/Log.cs b/Scripts/Items/Skill Items/Lumberjack/Log.cs index 984d3a473..c5c3dbeb8 100644 --- a/Scripts/Items/Skill Items/Lumberjack/Log.cs +++ b/Scripts/Items/Skill Items/Lumberjack/Log.cs @@ -15,16 +15,8 @@ namespace Server.Items set { m_Resource = value; InvalidateProperties(); } } - string ICommodity.Description - { - get - { - return String.Format( Amount == 1 ? "{0} {1} log" : "{0} {1} logs", Amount, CraftResources.IsStandard( m_Resource ) ? String.Empty : CraftResources.GetName( m_Resource ).ToLower() ); - } - } - int ICommodity.DescriptionNumber { get { return CraftResources.IsStandard( m_Resource ) ? LabelNumber : 1075062 + ( (int)m_Resource - (int)CraftResource.RegularWood ); } } - + bool ICommodity.IsDeedable { get { return true; } } [Constructable] public Log() : this( 1 ) { diff --git a/Scripts/Items/Skill Items/Magical/Misc/BlankScroll.cs b/Scripts/Items/Skill Items/Magical/Misc/BlankScroll.cs index 0c63b8250..7673b3c8f 100644 --- a/Scripts/Items/Skill Items/Magical/Misc/BlankScroll.cs +++ b/Scripts/Items/Skill Items/Magical/Misc/BlankScroll.cs @@ -17,22 +17,13 @@ namespace Server.Items Amount = amount; } - string ICommodity.Description - { - get - { - return String.Format( "blank scroll: {0}", Amount ); - } - } - int ICommodity.DescriptionNumber { get { return LabelNumber; } } - + bool ICommodity.IsDeedable { get { return (Core.ML); } } + public BlankScroll( Serial serial ) : base( serial ) { } - - public override void Serialize( GenericWriter writer ) { base.Serialize( writer ); diff --git a/Scripts/Items/Skill Items/Magical/Misc/Bottle.cs b/Scripts/Items/Skill Items/Magical/Misc/Bottle.cs index 6f8190b24..ae6d0927a 100644 --- a/Scripts/Items/Skill Items/Magical/Misc/Bottle.cs +++ b/Scripts/Items/Skill Items/Magical/Misc/Bottle.cs @@ -2,8 +2,11 @@ using System; namespace Server.Items { - public class Bottle : Item + public class Bottle : Item, ICommodity { + int ICommodity.DescriptionNumber { get { return LabelNumber; } } + bool ICommodity.IsDeedable { get { return (Core.ML); } } + [Constructable] public Bottle() : this( 1 ) { diff --git a/Scripts/Items/Skill Items/Magical/Potions/BasePotion.cs b/Scripts/Items/Skill Items/Magical/Potions/BasePotion.cs index b2d5f60b2..92853f018 100644 --- a/Scripts/Items/Skill Items/Magical/Potions/BasePotion.cs +++ b/Scripts/Items/Skill Items/Magical/Potions/BasePotion.cs @@ -35,7 +35,7 @@ namespace Server.Items ConfusionBlastGreater } - public abstract class BasePotion : Item, ICraftable + public abstract class BasePotion : Item, ICraftable, ICommodity { private PotionEffect m_PotionEffect; @@ -52,6 +52,9 @@ namespace Server.Items } } + int ICommodity.DescriptionNumber { get { return LabelNumber; } } + bool ICommodity.IsDeedable { get { return (Core.ML); } } + public override int LabelNumber{ get{ return 1041314 + (int)m_PotionEffect; } } public BasePotion( int itemID, PotionEffect effect ) : base( itemID ) diff --git a/Scripts/Items/Skill Items/Magical/Scrolls/SpellScroll.cs b/Scripts/Items/Skill Items/Magical/Scrolls/SpellScroll.cs index a3567b1ee..09d5a76b2 100644 --- a/Scripts/Items/Skill Items/Magical/Scrolls/SpellScroll.cs +++ b/Scripts/Items/Skill Items/Magical/Scrolls/SpellScroll.cs @@ -6,7 +6,7 @@ using Server.ContextMenus; namespace Server.Items { - public class SpellScroll : Item + public class SpellScroll : Item, ICommodity { private int m_SpellID; @@ -18,6 +18,9 @@ namespace Server.Items } } + int ICommodity.DescriptionNumber { get { return LabelNumber; } } + bool ICommodity.IsDeedable { get { return (Core.ML); } } + public SpellScroll( Serial serial ) : base( serial ) { } diff --git a/Scripts/Items/Skill Items/Specialized/Sand.cs b/Scripts/Items/Skill Items/Specialized/Sand.cs index f0493ef30..be9a9bcff 100644 --- a/Scripts/Items/Skill Items/Specialized/Sand.cs +++ b/Scripts/Items/Skill Items/Specialized/Sand.cs @@ -6,15 +6,8 @@ namespace Server.Items [FlipableAttribute( 0x11EA, 0x11EB )] public class Sand : Item, ICommodity { - string ICommodity.Description - { - get - { - return String.Format( Amount == 1 ? "{0} sand" : "{0} sand", Amount ); - } - } - int ICommodity.DescriptionNumber { get { return LabelNumber; } } + bool ICommodity.IsDeedable { get { return true; } } public override int LabelNumber{ get{ return 1044626; } } // sand diff --git a/Scripts/Items/Special/Solen Items/ZoogiFungus.cs b/Scripts/Items/Special/Solen Items/ZoogiFungus.cs index f0af9b50a..0337085bb 100644 --- a/Scripts/Items/Special/Solen Items/ZoogiFungus.cs +++ b/Scripts/Items/Special/Solen Items/ZoogiFungus.cs @@ -3,8 +3,11 @@ using Server; namespace Server.Items { - public class ZoogiFungus : Item + public class ZoogiFungus : Item, ICommodity { + int ICommodity.DescriptionNumber { get { return LabelNumber; } } + bool ICommodity.IsDeedable { get { return (Core.ML); } } + [Constructable] public ZoogiFungus() : this( 1 ) { @@ -18,8 +21,6 @@ namespace Server.Items Amount = amount; } - - public ZoogiFungus( Serial serial ) : base( serial ) { }