Clean up: Bugs, LINQ, constructors, default values, and null checks (#18)
This commit is contained in:
parent
e748af4430
commit
513e54f70e
1094 changed files with 15913 additions and 21892 deletions
|
|
@ -31,11 +31,7 @@ namespace Server.Items
|
|||
protected CraftResource m_Resource;
|
||||
private int m_StrReq = -1;
|
||||
|
||||
public BaseClothing(int itemID, Layer layer) : this(itemID, layer, 0)
|
||||
{
|
||||
}
|
||||
|
||||
public BaseClothing(int itemID, Layer layer, int hue) : base(itemID)
|
||||
public BaseClothing(int itemID, Layer layer, int hue = 0) : base(itemID)
|
||||
{
|
||||
Layer = layer;
|
||||
Hue = hue;
|
||||
|
|
@ -172,7 +168,7 @@ namespace Server.Items
|
|||
|
||||
CraftContext context = craftSystem.GetContext(from);
|
||||
|
||||
if (context != null && context.DoNotColor)
|
||||
if (context?.DoNotColor == true)
|
||||
Hue = 0;
|
||||
|
||||
return quality;
|
||||
|
|
@ -210,18 +206,12 @@ namespace Server.Items
|
|||
|
||||
CraftItem item = system.CraftItems.SearchFor(GetType());
|
||||
|
||||
if (item != null && item.Resources.Count == 1 && item.Resources.GetAt(0).Amount >= 2)
|
||||
if (item?.Resources.Count == 1 && item.Resources.GetAt(0).Amount >= 2)
|
||||
try
|
||||
{
|
||||
Type resourceType = null;
|
||||
|
||||
CraftResourceInfo info = CraftResources.GetInfo(m_Resource);
|
||||
|
||||
if (info != null && info.ResourceTypes.Length > 0)
|
||||
resourceType = info.ResourceTypes[0];
|
||||
|
||||
if (resourceType == null)
|
||||
resourceType = item.Resources.GetAt(0).ItemType;
|
||||
Type resourceType = info.ResourceTypes?[0] ?? item.Resources.GetAt(0).ItemType;
|
||||
|
||||
Item res = (Item)Activator.CreateInstance(resourceType);
|
||||
|
||||
|
|
@ -573,12 +563,7 @@ namespace Server.Items
|
|||
|
||||
private string GetNameString()
|
||||
{
|
||||
string name = Name;
|
||||
|
||||
if (name == null)
|
||||
name = $"#{LabelNumber}";
|
||||
|
||||
return name;
|
||||
return Name ?? $"#{LabelNumber}";
|
||||
}
|
||||
|
||||
public override void AddNameProperty(ObjectPropertyList list)
|
||||
|
|
@ -1070,4 +1055,4 @@ namespace Server.Items
|
|||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,11 +4,7 @@ namespace Server.Items
|
|||
{
|
||||
public abstract class BaseCloak : BaseClothing
|
||||
{
|
||||
public BaseCloak(int itemID) : this(itemID, 0)
|
||||
{
|
||||
}
|
||||
|
||||
public BaseCloak(int itemID, int hue) : base(itemID, Layer.Cloak, hue)
|
||||
public BaseCloak(int itemID, int hue = 0) : base(itemID, Layer.Cloak, hue)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -35,12 +31,7 @@ namespace Server.Items
|
|||
public class Cloak : BaseCloak, IArcaneEquip
|
||||
{
|
||||
[Constructible]
|
||||
public Cloak() : this(0)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public Cloak(int hue) : base(0x1515, hue)
|
||||
public Cloak(int hue = 0) : base(0x1515, hue)
|
||||
{
|
||||
Weight = 5.0;
|
||||
}
|
||||
|
|
@ -169,17 +160,7 @@ namespace Server.Items
|
|||
private int m_LabelNumber;
|
||||
|
||||
[Constructible]
|
||||
public RewardCloak() : this(0)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public RewardCloak(int hue) : this(hue, 0)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public RewardCloak(int hue, int labelNumber) : base(0x1515, hue)
|
||||
public RewardCloak(int hue = 0, int labelNumber = 0) : base(0x1515, hue)
|
||||
{
|
||||
Weight = 5.0;
|
||||
LootType = LootType.Blessed;
|
||||
|
|
@ -292,12 +273,7 @@ namespace Server.Items
|
|||
public class FurCape : BaseCloak
|
||||
{
|
||||
[Constructible]
|
||||
public FurCape() : this(0)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public FurCape(int hue) : base(0x230A, hue)
|
||||
public FurCape(int hue = 0) : base(0x230A, hue)
|
||||
{
|
||||
Weight = 4.0;
|
||||
}
|
||||
|
|
@ -320,4 +296,4 @@ namespace Server.Items
|
|||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,11 +8,7 @@ namespace Server.Items
|
|||
{
|
||||
public abstract class BaseHat : BaseClothing, IShipwreckedItem
|
||||
{
|
||||
public BaseHat(int itemID) : this(itemID, 0)
|
||||
{
|
||||
}
|
||||
|
||||
public BaseHat(int itemID, int hue) : base(itemID, Layer.Helm, hue)
|
||||
public BaseHat(int itemID, int hue = 0) : base(itemID, Layer.Helm, hue)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -81,12 +77,7 @@ namespace Server.Items
|
|||
public class Kasa : BaseHat
|
||||
{
|
||||
[Constructible]
|
||||
public Kasa() : this(0)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public Kasa(int hue) : base(0x2798, hue)
|
||||
public Kasa(int hue = 0) : base(0x2798, hue)
|
||||
{
|
||||
Weight = 3.0;
|
||||
}
|
||||
|
|
@ -123,12 +114,7 @@ namespace Server.Items
|
|||
public class ClothNinjaHood : BaseHat
|
||||
{
|
||||
[Constructible]
|
||||
public ClothNinjaHood() : this(0)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public ClothNinjaHood(int hue) : base(0x278F, hue)
|
||||
public ClothNinjaHood(int hue = 0) : base(0x278F, hue)
|
||||
{
|
||||
Weight = 2.0;
|
||||
}
|
||||
|
|
@ -165,12 +151,7 @@ namespace Server.Items
|
|||
public class FlowerGarland : BaseHat
|
||||
{
|
||||
[Constructible]
|
||||
public FlowerGarland() : this(0)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public FlowerGarland(int hue) : base(0x2306, hue)
|
||||
public FlowerGarland(int hue = 0) : base(0x2306, hue)
|
||||
{
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
|
@ -206,12 +187,7 @@ namespace Server.Items
|
|||
public class FloppyHat : BaseHat
|
||||
{
|
||||
[Constructible]
|
||||
public FloppyHat() : this(0)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public FloppyHat(int hue) : base(0x1713, hue)
|
||||
public FloppyHat(int hue = 0) : base(0x1713, hue)
|
||||
{
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
|
@ -247,12 +223,7 @@ namespace Server.Items
|
|||
public class WideBrimHat : BaseHat
|
||||
{
|
||||
[Constructible]
|
||||
public WideBrimHat() : this(0)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public WideBrimHat(int hue) : base(0x1714, hue)
|
||||
public WideBrimHat(int hue = 0) : base(0x1714, hue)
|
||||
{
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
|
@ -288,12 +259,7 @@ namespace Server.Items
|
|||
public class Cap : BaseHat
|
||||
{
|
||||
[Constructible]
|
||||
public Cap() : this(0)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public Cap(int hue) : base(0x1715, hue)
|
||||
public Cap(int hue = 0) : base(0x1715, hue)
|
||||
{
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
|
@ -329,12 +295,7 @@ namespace Server.Items
|
|||
public class SkullCap : BaseHat
|
||||
{
|
||||
[Constructible]
|
||||
public SkullCap() : this(0)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public SkullCap(int hue) : base(0x1544, hue)
|
||||
public SkullCap(int hue = 0) : base(0x1544, hue)
|
||||
{
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
|
@ -370,12 +331,7 @@ namespace Server.Items
|
|||
public class Bandana : BaseHat
|
||||
{
|
||||
[Constructible]
|
||||
public Bandana() : this(0)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public Bandana(int hue) : base(0x1540, hue)
|
||||
public Bandana(int hue = 0) : base(0x1540, hue)
|
||||
{
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
|
@ -411,12 +367,7 @@ namespace Server.Items
|
|||
public class BearMask : BaseHat
|
||||
{
|
||||
[Constructible]
|
||||
public BearMask() : this(0)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public BearMask(int hue) : base(0x1545, hue)
|
||||
public BearMask(int hue = 0) : base(0x1545, hue)
|
||||
{
|
||||
Weight = 5.0;
|
||||
}
|
||||
|
|
@ -458,12 +409,7 @@ namespace Server.Items
|
|||
public class DeerMask : BaseHat
|
||||
{
|
||||
[Constructible]
|
||||
public DeerMask() : this(0)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public DeerMask(int hue) : base(0x1547, hue)
|
||||
public DeerMask(int hue = 0) : base(0x1547, hue)
|
||||
{
|
||||
Weight = 4.0;
|
||||
}
|
||||
|
|
@ -505,12 +451,7 @@ namespace Server.Items
|
|||
public class HornedTribalMask : BaseHat
|
||||
{
|
||||
[Constructible]
|
||||
public HornedTribalMask() : this(0)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public HornedTribalMask(int hue) : base(0x1549, hue)
|
||||
public HornedTribalMask(int hue = 0) : base(0x1549, hue)
|
||||
{
|
||||
Weight = 2.0;
|
||||
}
|
||||
|
|
@ -552,12 +493,7 @@ namespace Server.Items
|
|||
public class TribalMask : BaseHat
|
||||
{
|
||||
[Constructible]
|
||||
public TribalMask() : this(0)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public TribalMask(int hue) : base(0x154B, hue)
|
||||
public TribalMask(int hue = 0) : base(0x154B, hue)
|
||||
{
|
||||
Weight = 2.0;
|
||||
}
|
||||
|
|
@ -599,12 +535,7 @@ namespace Server.Items
|
|||
public class TallStrawHat : BaseHat
|
||||
{
|
||||
[Constructible]
|
||||
public TallStrawHat() : this(0)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public TallStrawHat(int hue) : base(0x1716, hue)
|
||||
public TallStrawHat(int hue = 0) : base(0x1716, hue)
|
||||
{
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
|
@ -640,12 +571,7 @@ namespace Server.Items
|
|||
public class StrawHat : BaseHat
|
||||
{
|
||||
[Constructible]
|
||||
public StrawHat() : this(0)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public StrawHat(int hue) : base(0x1717, hue)
|
||||
public StrawHat(int hue = 0) : base(0x1717, hue)
|
||||
{
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
|
@ -681,12 +607,7 @@ namespace Server.Items
|
|||
public class OrcishKinMask : BaseHat
|
||||
{
|
||||
[Constructible]
|
||||
public OrcishKinMask() : this(0x8A4)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public OrcishKinMask(int hue) : base(0x141B, hue)
|
||||
public OrcishKinMask(int hue = 0x8A4) : base(0x141B, hue)
|
||||
{
|
||||
Weight = 2.0;
|
||||
}
|
||||
|
|
@ -755,9 +676,7 @@ namespace Server.Items
|
|||
public class SavageMask : BaseHat
|
||||
{
|
||||
[Constructible]
|
||||
public SavageMask() : this(GetRandomHue())
|
||||
{
|
||||
}
|
||||
public SavageMask() : this(GetRandomHue()) {}
|
||||
|
||||
[Constructible]
|
||||
public SavageMask(int hue) : base(0x154B, hue)
|
||||
|
|
@ -815,12 +734,7 @@ namespace Server.Items
|
|||
public class WizardsHat : BaseHat
|
||||
{
|
||||
[Constructible]
|
||||
public WizardsHat() : this(0)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public WizardsHat(int hue) : base(0x1718, hue)
|
||||
public WizardsHat(int hue = 0) : base(0x1718, hue)
|
||||
{
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
|
@ -856,12 +770,7 @@ namespace Server.Items
|
|||
public class MagicWizardsHat : BaseHat
|
||||
{
|
||||
[Constructible]
|
||||
public MagicWizardsHat() : this(0)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public MagicWizardsHat(int hue) : base(0x1718, hue)
|
||||
public MagicWizardsHat(int hue = 0) : base(0x1718, hue)
|
||||
{
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
|
@ -903,12 +812,7 @@ namespace Server.Items
|
|||
public class Bonnet : BaseHat
|
||||
{
|
||||
[Constructible]
|
||||
public Bonnet() : this(0)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public Bonnet(int hue) : base(0x1719, hue)
|
||||
public Bonnet(int hue = 0) : base(0x1719, hue)
|
||||
{
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
|
@ -944,12 +848,7 @@ namespace Server.Items
|
|||
public class FeatheredHat : BaseHat
|
||||
{
|
||||
[Constructible]
|
||||
public FeatheredHat() : this(0)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public FeatheredHat(int hue) : base(0x171A, hue)
|
||||
public FeatheredHat(int hue = 0) : base(0x171A, hue)
|
||||
{
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
|
@ -985,12 +884,7 @@ namespace Server.Items
|
|||
public class TricorneHat : BaseHat
|
||||
{
|
||||
[Constructible]
|
||||
public TricorneHat() : this(0)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public TricorneHat(int hue) : base(0x171B, hue)
|
||||
public TricorneHat(int hue = 0) : base(0x171B, hue)
|
||||
{
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
|
@ -1026,12 +920,7 @@ namespace Server.Items
|
|||
public class JesterHat : BaseHat
|
||||
{
|
||||
[Constructible]
|
||||
public JesterHat() : this(0)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public JesterHat(int hue) : base(0x171C, hue)
|
||||
public JesterHat(int hue = 0) : base(0x171C, hue)
|
||||
{
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
|
@ -1063,4 +952,4 @@ namespace Server.Items
|
|||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,11 +2,7 @@ namespace Server.Items
|
|||
{
|
||||
public abstract class BaseMiddleTorso : BaseClothing
|
||||
{
|
||||
public BaseMiddleTorso(int itemID) : this(itemID, 0)
|
||||
{
|
||||
}
|
||||
|
||||
public BaseMiddleTorso(int itemID, int hue) : base(itemID, Layer.MiddleTorso, hue)
|
||||
public BaseMiddleTorso(int itemID, int hue = 0) : base(itemID, Layer.MiddleTorso, hue)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -33,12 +29,7 @@ namespace Server.Items
|
|||
public class BodySash : BaseMiddleTorso
|
||||
{
|
||||
[Constructible]
|
||||
public BodySash() : this(0)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public BodySash(int hue) : base(0x1541, hue)
|
||||
public BodySash(int hue = 0) : base(0x1541, hue)
|
||||
{
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
|
@ -66,12 +57,7 @@ namespace Server.Items
|
|||
public class FullApron : BaseMiddleTorso
|
||||
{
|
||||
[Constructible]
|
||||
public FullApron() : this(0)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public FullApron(int hue) : base(0x153d, hue)
|
||||
public FullApron(int hue = 0) : base(0x153d, hue)
|
||||
{
|
||||
Weight = 4.0;
|
||||
}
|
||||
|
|
@ -99,12 +85,7 @@ namespace Server.Items
|
|||
public class Doublet : BaseMiddleTorso
|
||||
{
|
||||
[Constructible]
|
||||
public Doublet() : this(0)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public Doublet(int hue) : base(0x1F7B, hue)
|
||||
public Doublet(int hue = 0) : base(0x1F7B, hue)
|
||||
{
|
||||
Weight = 2.0;
|
||||
}
|
||||
|
|
@ -132,12 +113,7 @@ namespace Server.Items
|
|||
public class Surcoat : BaseMiddleTorso
|
||||
{
|
||||
[Constructible]
|
||||
public Surcoat() : this(0)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public Surcoat(int hue) : base(0x1FFD, hue)
|
||||
public Surcoat(int hue = 0) : base(0x1FFD, hue)
|
||||
{
|
||||
Weight = 6.0;
|
||||
}
|
||||
|
|
@ -168,12 +144,7 @@ namespace Server.Items
|
|||
public class Tunic : BaseMiddleTorso
|
||||
{
|
||||
[Constructible]
|
||||
public Tunic() : this(0)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public Tunic(int hue) : base(0x1FA1, hue)
|
||||
public Tunic(int hue = 0) : base(0x1FA1, hue)
|
||||
{
|
||||
Weight = 5.0;
|
||||
}
|
||||
|
|
@ -201,12 +172,7 @@ namespace Server.Items
|
|||
public class FormalShirt : BaseMiddleTorso
|
||||
{
|
||||
[Constructible]
|
||||
public FormalShirt() : this(0)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public FormalShirt(int hue) : base(0x2310, hue)
|
||||
public FormalShirt(int hue = 0) : base(0x2310, hue)
|
||||
{
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
|
@ -237,12 +203,7 @@ namespace Server.Items
|
|||
public class JesterSuit : BaseMiddleTorso
|
||||
{
|
||||
[Constructible]
|
||||
public JesterSuit() : this(0)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public JesterSuit(int hue) : base(0x1F9F, hue)
|
||||
public JesterSuit(int hue = 0) : base(0x1F9F, hue)
|
||||
{
|
||||
Weight = 4.0;
|
||||
}
|
||||
|
|
@ -270,12 +231,7 @@ namespace Server.Items
|
|||
public class JinBaori : BaseMiddleTorso
|
||||
{
|
||||
[Constructible]
|
||||
public JinBaori() : this(0)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public JinBaori(int hue) : base(0x27A1, hue)
|
||||
public JinBaori(int hue = 0) : base(0x27A1, hue)
|
||||
{
|
||||
Weight = 3.0;
|
||||
}
|
||||
|
|
@ -298,4 +254,4 @@ namespace Server.Items
|
|||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,11 +2,7 @@ namespace Server.Items
|
|||
{
|
||||
public abstract class BaseOuterLegs : BaseClothing
|
||||
{
|
||||
public BaseOuterLegs(int itemID) : this(itemID, 0)
|
||||
{
|
||||
}
|
||||
|
||||
public BaseOuterLegs(int itemID, int hue) : base(itemID, Layer.OuterLegs, hue)
|
||||
public BaseOuterLegs(int itemID, int hue = 0) : base(itemID, Layer.OuterLegs, hue)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -33,12 +29,7 @@ namespace Server.Items
|
|||
public class FurSarong : BaseOuterLegs
|
||||
{
|
||||
[Constructible]
|
||||
public FurSarong() : this(0)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public FurSarong(int hue) : base(0x230C, hue)
|
||||
public FurSarong(int hue = 0) : base(0x230C, hue)
|
||||
{
|
||||
Weight = 3.0;
|
||||
}
|
||||
|
|
@ -69,12 +60,7 @@ namespace Server.Items
|
|||
public class Skirt : BaseOuterLegs
|
||||
{
|
||||
[Constructible]
|
||||
public Skirt() : this(0)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public Skirt(int hue) : base(0x1516, hue)
|
||||
public Skirt(int hue = 0) : base(0x1516, hue)
|
||||
{
|
||||
Weight = 4.0;
|
||||
}
|
||||
|
|
@ -102,12 +88,7 @@ namespace Server.Items
|
|||
public class Kilt : BaseOuterLegs
|
||||
{
|
||||
[Constructible]
|
||||
public Kilt() : this(0)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public Kilt(int hue) : base(0x1537, hue)
|
||||
public Kilt(int hue = 0) : base(0x1537, hue)
|
||||
{
|
||||
Weight = 2.0;
|
||||
}
|
||||
|
|
@ -135,12 +116,7 @@ namespace Server.Items
|
|||
public class Hakama : BaseOuterLegs
|
||||
{
|
||||
[Constructible]
|
||||
public Hakama() : this(0)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public Hakama(int hue) : base(0x279A, hue)
|
||||
public Hakama(int hue = 0) : base(0x279A, hue)
|
||||
{
|
||||
Weight = 2.0;
|
||||
}
|
||||
|
|
@ -163,4 +139,4 @@ namespace Server.Items
|
|||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,11 +5,7 @@ namespace Server.Items
|
|||
{
|
||||
public abstract class BaseOuterTorso : BaseClothing
|
||||
{
|
||||
public BaseOuterTorso(int itemID) : this(itemID, 0)
|
||||
{
|
||||
}
|
||||
|
||||
public BaseOuterTorso(int itemID, int hue) : base(itemID, Layer.OuterTorso, hue)
|
||||
public BaseOuterTorso(int itemID, int hue = 0) : base(itemID, Layer.OuterTorso, hue)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -36,12 +32,7 @@ namespace Server.Items
|
|||
public class GildedDress : BaseOuterTorso
|
||||
{
|
||||
[Constructible]
|
||||
public GildedDress() : this(0)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public GildedDress(int hue) : base(0x230E, hue)
|
||||
public GildedDress(int hue = 0) : base(0x230E, hue)
|
||||
{
|
||||
Weight = 3.0;
|
||||
}
|
||||
|
|
@ -69,12 +60,7 @@ namespace Server.Items
|
|||
public class FancyDress : BaseOuterTorso
|
||||
{
|
||||
[Constructible]
|
||||
public FancyDress() : this(0)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public FancyDress(int hue) : base(0x1F00, hue)
|
||||
public FancyDress(int hue = 0) : base(0x1F00, hue)
|
||||
{
|
||||
Weight = 3.0;
|
||||
}
|
||||
|
|
@ -233,17 +219,7 @@ namespace Server.Items
|
|||
private int m_LabelNumber;
|
||||
|
||||
[Constructible]
|
||||
public RewardRobe() : this(0)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public RewardRobe(int hue) : this(hue, 0)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public RewardRobe(int hue, int labelNumber) : base(0x1F03, hue)
|
||||
public RewardRobe(int hue = 0, int labelNumber = 0) : base(0x1F03, hue)
|
||||
{
|
||||
Weight = 3.0;
|
||||
LootType = LootType.Blessed;
|
||||
|
|
@ -358,17 +334,7 @@ namespace Server.Items
|
|||
private int m_LabelNumber;
|
||||
|
||||
[Constructible]
|
||||
public RewardDress() : this(0)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public RewardDress(int hue) : this(hue, 0)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public RewardDress(int hue, int labelNumber) : base(0x1F01, hue)
|
||||
public RewardDress(int hue = 0, int labelNumber = 0) : base(0x1F01, hue)
|
||||
{
|
||||
Weight = 2.0;
|
||||
LootType = LootType.Blessed;
|
||||
|
|
@ -481,12 +447,7 @@ namespace Server.Items
|
|||
public class Robe : BaseOuterTorso, IArcaneEquip
|
||||
{
|
||||
[Constructible]
|
||||
public Robe() : this(0)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public Robe(int hue) : base(0x1F03, hue)
|
||||
public Robe(int hue = 0) : base(0x1F03, hue)
|
||||
{
|
||||
Weight = 3.0;
|
||||
}
|
||||
|
|
@ -609,12 +570,7 @@ namespace Server.Items
|
|||
public class MonkRobe : BaseOuterTorso
|
||||
{
|
||||
[Constructible]
|
||||
public MonkRobe() : this(0x21E)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public MonkRobe(int hue) : base(0x2687, hue)
|
||||
public MonkRobe(int hue = 0x21E) : base(0x2687, hue)
|
||||
{
|
||||
Weight = 1.0;
|
||||
StrRequirement = 0;
|
||||
|
|
@ -652,12 +608,7 @@ namespace Server.Items
|
|||
public class PlainDress : BaseOuterTorso
|
||||
{
|
||||
[Constructible]
|
||||
public PlainDress() : this(0)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public PlainDress(int hue) : base(0x1F01, hue)
|
||||
public PlainDress(int hue = 0) : base(0x1F01, hue)
|
||||
{
|
||||
Weight = 2.0;
|
||||
}
|
||||
|
|
@ -688,12 +639,7 @@ namespace Server.Items
|
|||
public class Kamishimo : BaseOuterTorso
|
||||
{
|
||||
[Constructible]
|
||||
public Kamishimo() : this(0)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public Kamishimo(int hue) : base(0x2799, hue)
|
||||
public Kamishimo(int hue = 0) : base(0x2799, hue)
|
||||
{
|
||||
Weight = 3.0;
|
||||
}
|
||||
|
|
@ -721,12 +667,7 @@ namespace Server.Items
|
|||
public class HakamaShita : BaseOuterTorso
|
||||
{
|
||||
[Constructible]
|
||||
public HakamaShita() : this(0)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public HakamaShita(int hue) : base(0x279C, hue)
|
||||
public HakamaShita(int hue = 0) : base(0x279C, hue)
|
||||
{
|
||||
Weight = 3.0;
|
||||
}
|
||||
|
|
@ -754,12 +695,7 @@ namespace Server.Items
|
|||
public class MaleKimono : BaseOuterTorso
|
||||
{
|
||||
[Constructible]
|
||||
public MaleKimono() : this(0)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public MaleKimono(int hue) : base(0x2782, hue)
|
||||
public MaleKimono(int hue = 0) : base(0x2782, hue)
|
||||
{
|
||||
Weight = 3.0;
|
||||
}
|
||||
|
|
@ -789,12 +725,7 @@ namespace Server.Items
|
|||
public class FemaleKimono : BaseOuterTorso
|
||||
{
|
||||
[Constructible]
|
||||
public FemaleKimono() : this(0)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public FemaleKimono(int hue) : base(0x2783, hue)
|
||||
public FemaleKimono(int hue = 0) : base(0x2783, hue)
|
||||
{
|
||||
Weight = 3.0;
|
||||
}
|
||||
|
|
@ -824,12 +755,7 @@ namespace Server.Items
|
|||
public class MaleElvenRobe : BaseOuterTorso
|
||||
{
|
||||
[Constructible]
|
||||
public MaleElvenRobe() : this(0)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public MaleElvenRobe(int hue) : base(0x2FB9, hue)
|
||||
public MaleElvenRobe(int hue = 0) : base(0x2FB9, hue)
|
||||
{
|
||||
Weight = 2.0;
|
||||
}
|
||||
|
|
@ -859,12 +785,7 @@ namespace Server.Items
|
|||
public class FemaleElvenRobe : BaseOuterTorso
|
||||
{
|
||||
[Constructible]
|
||||
public FemaleElvenRobe() : this(0)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public FemaleElvenRobe(int hue) : base(0x2FBA, hue)
|
||||
public FemaleElvenRobe(int hue = 0) : base(0x2FBA, hue)
|
||||
{
|
||||
Weight = 2.0;
|
||||
}
|
||||
|
|
@ -891,4 +812,4 @@ namespace Server.Items
|
|||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,11 +2,7 @@ namespace Server.Items
|
|||
{
|
||||
public abstract class BasePants : BaseClothing
|
||||
{
|
||||
public BasePants(int itemID) : this(itemID, 0)
|
||||
{
|
||||
}
|
||||
|
||||
public BasePants(int itemID, int hue) : base(itemID, Layer.Pants, hue)
|
||||
public BasePants(int itemID, int hue = 0) : base(itemID, Layer.Pants, hue)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -33,12 +29,7 @@ namespace Server.Items
|
|||
public class ShortPants : BasePants
|
||||
{
|
||||
[Constructible]
|
||||
public ShortPants() : this(0)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public ShortPants(int hue) : base(0x152E, hue)
|
||||
public ShortPants(int hue = 0) : base(0x152E, hue)
|
||||
{
|
||||
Weight = 2.0;
|
||||
}
|
||||
|
|
@ -66,12 +57,7 @@ namespace Server.Items
|
|||
public class LongPants : BasePants
|
||||
{
|
||||
[Constructible]
|
||||
public LongPants() : this(0)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public LongPants(int hue) : base(0x1539, hue)
|
||||
public LongPants(int hue = 0) : base(0x1539, hue)
|
||||
{
|
||||
Weight = 2.0;
|
||||
}
|
||||
|
|
@ -99,12 +85,7 @@ namespace Server.Items
|
|||
public class TattsukeHakama : BasePants
|
||||
{
|
||||
[Constructible]
|
||||
public TattsukeHakama() : this(0)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public TattsukeHakama(int hue) : base(0x279B, hue)
|
||||
public TattsukeHakama(int hue = 0) : base(0x279B, hue)
|
||||
{
|
||||
Weight = 2.0;
|
||||
}
|
||||
|
|
@ -132,12 +113,7 @@ namespace Server.Items
|
|||
public class ElvenPants : BasePants
|
||||
{
|
||||
[Constructible]
|
||||
public ElvenPants() : this(0)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public ElvenPants(int hue) : base(0x2FC3, hue)
|
||||
public ElvenPants(int hue = 0) : base(0x2FC3, hue)
|
||||
{
|
||||
Weight = 2.0;
|
||||
}
|
||||
|
|
@ -162,4 +138,4 @@ namespace Server.Items
|
|||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,11 +2,7 @@ namespace Server.Items
|
|||
{
|
||||
public abstract class BaseShirt : BaseClothing
|
||||
{
|
||||
public BaseShirt(int itemID) : this(itemID, 0)
|
||||
{
|
||||
}
|
||||
|
||||
public BaseShirt(int itemID, int hue) : base(itemID, Layer.Shirt, hue)
|
||||
public BaseShirt(int itemID, int hue = 0) : base(itemID, Layer.Shirt, hue)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -33,12 +29,7 @@ namespace Server.Items
|
|||
public class FancyShirt : BaseShirt
|
||||
{
|
||||
[Constructible]
|
||||
public FancyShirt() : this(0)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public FancyShirt(int hue) : base(0x1EFD, hue)
|
||||
public FancyShirt(int hue = 0) : base(0x1EFD, hue)
|
||||
{
|
||||
Weight = 2.0;
|
||||
}
|
||||
|
|
@ -66,12 +57,7 @@ namespace Server.Items
|
|||
public class Shirt : BaseShirt
|
||||
{
|
||||
[Constructible]
|
||||
public Shirt() : this(0)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public Shirt(int hue) : base(0x1517, hue)
|
||||
public Shirt(int hue = 0) : base(0x1517, hue)
|
||||
{
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
|
@ -102,12 +88,7 @@ namespace Server.Items
|
|||
public class ClothNinjaJacket : BaseShirt
|
||||
{
|
||||
[Constructible]
|
||||
public ClothNinjaJacket() : this(0)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public ClothNinjaJacket(int hue) : base(0x2794, hue)
|
||||
public ClothNinjaJacket(int hue = 0) : base(0x2794, hue)
|
||||
{
|
||||
Weight = 5.0;
|
||||
Layer = Layer.InnerTorso;
|
||||
|
|
@ -135,12 +116,7 @@ namespace Server.Items
|
|||
public class ElvenShirt : BaseShirt
|
||||
{
|
||||
[Constructible]
|
||||
public ElvenShirt() : this(0)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public ElvenShirt(int hue) : base(0x3175, hue)
|
||||
public ElvenShirt(int hue = 0) : base(0x3175, hue)
|
||||
{
|
||||
Weight = 2.0;
|
||||
}
|
||||
|
|
@ -170,12 +146,7 @@ namespace Server.Items
|
|||
public class ElvenDarkShirt : BaseShirt
|
||||
{
|
||||
[Constructible]
|
||||
public ElvenDarkShirt() : this(0)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public ElvenDarkShirt(int hue) : base(0x3176, hue)
|
||||
public ElvenDarkShirt(int hue = 0) : base(0x3176, hue)
|
||||
{
|
||||
Weight = 2.0;
|
||||
}
|
||||
|
|
@ -200,4 +171,4 @@ namespace Server.Items
|
|||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,11 +2,7 @@ namespace Server.Items
|
|||
{
|
||||
public abstract class BaseShoes : BaseClothing
|
||||
{
|
||||
public BaseShoes(int itemID) : this(itemID, 0)
|
||||
{
|
||||
}
|
||||
|
||||
public BaseShoes(int itemID, int hue) : base(itemID, Layer.Shoes, hue)
|
||||
public BaseShoes(int itemID, int hue = 0) : base(itemID, Layer.Shoes, hue)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -57,12 +53,7 @@ namespace Server.Items
|
|||
public class FurBoots : BaseShoes
|
||||
{
|
||||
[Constructible]
|
||||
public FurBoots() : this(0)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public FurBoots(int hue) : base(0x2307, hue)
|
||||
public FurBoots(int hue = 0) : base(0x2307, hue)
|
||||
{
|
||||
Weight = 3.0;
|
||||
}
|
||||
|
|
@ -90,12 +81,7 @@ namespace Server.Items
|
|||
public class Boots : BaseShoes
|
||||
{
|
||||
[Constructible]
|
||||
public Boots() : this(0)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public Boots(int hue) : base(0x170B, hue)
|
||||
public Boots(int hue = 0) : base(0x170B, hue)
|
||||
{
|
||||
Weight = 3.0;
|
||||
}
|
||||
|
|
@ -125,12 +111,7 @@ namespace Server.Items
|
|||
public class ThighBoots : BaseShoes, IArcaneEquip
|
||||
{
|
||||
[Constructible]
|
||||
public ThighBoots() : this(0)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public ThighBoots(int hue) : base(0x1711, hue)
|
||||
public ThighBoots(int hue = 0) : base(0x1711, hue)
|
||||
{
|
||||
Weight = 4.0;
|
||||
}
|
||||
|
|
@ -256,12 +237,7 @@ namespace Server.Items
|
|||
public class Shoes : BaseShoes
|
||||
{
|
||||
[Constructible]
|
||||
public Shoes() : this(0)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public Shoes(int hue) : base(0x170F, hue)
|
||||
public Shoes(int hue = 0) : base(0x170F, hue)
|
||||
{
|
||||
Weight = 2.0;
|
||||
}
|
||||
|
|
@ -291,12 +267,7 @@ namespace Server.Items
|
|||
public class Sandals : BaseShoes
|
||||
{
|
||||
[Constructible]
|
||||
public Sandals() : this(0)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public Sandals(int hue) : base(0x170D, hue)
|
||||
public Sandals(int hue = 0) : base(0x170D, hue)
|
||||
{
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
|
@ -331,12 +302,7 @@ namespace Server.Items
|
|||
public class NinjaTabi : BaseShoes
|
||||
{
|
||||
[Constructible]
|
||||
public NinjaTabi() : this(0)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public NinjaTabi(int hue) : base(0x2797, hue)
|
||||
public NinjaTabi(int hue = 0) : base(0x2797, hue)
|
||||
{
|
||||
Weight = 2.0;
|
||||
}
|
||||
|
|
@ -364,12 +330,7 @@ namespace Server.Items
|
|||
public class SamuraiTabi : BaseShoes
|
||||
{
|
||||
[Constructible]
|
||||
public SamuraiTabi() : this(0)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public SamuraiTabi(int hue) : base(0x2796, hue)
|
||||
public SamuraiTabi(int hue = 0) : base(0x2796, hue)
|
||||
{
|
||||
Weight = 2.0;
|
||||
}
|
||||
|
|
@ -397,12 +358,7 @@ namespace Server.Items
|
|||
public class Waraji : BaseShoes
|
||||
{
|
||||
[Constructible]
|
||||
public Waraji() : this(0)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public Waraji(int hue) : base(0x2796, hue)
|
||||
public Waraji(int hue = 0) : base(0x2796, hue)
|
||||
{
|
||||
Weight = 2.0;
|
||||
}
|
||||
|
|
@ -430,12 +386,7 @@ namespace Server.Items
|
|||
public class ElvenBoots : BaseShoes
|
||||
{
|
||||
[Constructible]
|
||||
public ElvenBoots() : this(0)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public ElvenBoots(int hue) : base(0x2FC4, hue)
|
||||
public ElvenBoots(int hue = 0) : base(0x2FC4, hue)
|
||||
{
|
||||
Weight = 2.0;
|
||||
}
|
||||
|
|
@ -467,4 +418,4 @@ namespace Server.Items
|
|||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,11 +2,7 @@ namespace Server.Items
|
|||
{
|
||||
public abstract class BaseWaist : BaseClothing
|
||||
{
|
||||
public BaseWaist(int itemID) : this(itemID, 0)
|
||||
{
|
||||
}
|
||||
|
||||
public BaseWaist(int itemID, int hue) : base(itemID, Layer.Waist, hue)
|
||||
public BaseWaist(int itemID, int hue = 0) : base(itemID, Layer.Waist, hue)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -33,12 +29,7 @@ namespace Server.Items
|
|||
public class HalfApron : BaseWaist
|
||||
{
|
||||
[Constructible]
|
||||
public HalfApron() : this(0)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public HalfApron(int hue) : base(0x153b, hue)
|
||||
public HalfApron(int hue = 0) : base(0x153b, hue)
|
||||
{
|
||||
Weight = 2.0;
|
||||
}
|
||||
|
|
@ -66,12 +57,7 @@ namespace Server.Items
|
|||
public class Obi : BaseWaist
|
||||
{
|
||||
[Constructible]
|
||||
public Obi() : this(0)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public Obi(int hue) : base(0x27A0, hue)
|
||||
public Obi(int hue = 0) : base(0x27A0, hue)
|
||||
{
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
|
@ -99,12 +85,7 @@ namespace Server.Items
|
|||
public class WoodlandBelt : BaseWaist
|
||||
{
|
||||
[Constructible]
|
||||
public WoodlandBelt() : this(0)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public WoodlandBelt(int hue) : base(0x2B68, hue)
|
||||
public WoodlandBelt(int hue = 0) : base(0x2B68, hue)
|
||||
{
|
||||
Weight = 4.0;
|
||||
}
|
||||
|
|
@ -141,4 +122,4 @@ namespace Server.Items
|
|||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue