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
|
|
@ -8,11 +8,7 @@ namespace Server.Items
|
|||
{
|
||||
private CraftResource m_Resource;
|
||||
|
||||
public BaseOre(CraftResource resource) : this(resource, 1)
|
||||
{
|
||||
}
|
||||
|
||||
public BaseOre(CraftResource resource, int amount) : base(RandomSize())
|
||||
public BaseOre(CraftResource resource, int amount = 1) : base(RandomSize())
|
||||
{
|
||||
Stackable = true;
|
||||
Amount = amount;
|
||||
|
|
@ -423,16 +419,11 @@ namespace Server.Items
|
|||
public class IronOre : BaseOre
|
||||
{
|
||||
[Constructible]
|
||||
public IronOre() : this(1)
|
||||
public IronOre(int amount = 1) : base(CraftResource.Iron, amount)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public IronOre(int amount) : base(CraftResource.Iron, amount)
|
||||
{
|
||||
}
|
||||
|
||||
public IronOre(bool fixedSize) : this(1)
|
||||
public IronOre(bool fixedSize) : this()
|
||||
{
|
||||
if (fixedSize)
|
||||
ItemID = 0x19B8;
|
||||
|
|
@ -465,12 +456,7 @@ namespace Server.Items
|
|||
public class DullCopperOre : BaseOre
|
||||
{
|
||||
[Constructible]
|
||||
public DullCopperOre() : this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public DullCopperOre(int amount) : base(CraftResource.DullCopper, amount)
|
||||
public DullCopperOre(int amount = 1) : base(CraftResource.DullCopper, amount)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -501,12 +487,7 @@ namespace Server.Items
|
|||
public class ShadowIronOre : BaseOre
|
||||
{
|
||||
[Constructible]
|
||||
public ShadowIronOre() : this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public ShadowIronOre(int amount) : base(CraftResource.ShadowIron, amount)
|
||||
public ShadowIronOre(int amount = 1) : base(CraftResource.ShadowIron, amount)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -537,12 +518,7 @@ namespace Server.Items
|
|||
public class CopperOre : BaseOre
|
||||
{
|
||||
[Constructible]
|
||||
public CopperOre() : this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public CopperOre(int amount) : base(CraftResource.Copper, amount)
|
||||
public CopperOre(int amount = 1) : base(CraftResource.Copper, amount)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -573,12 +549,7 @@ namespace Server.Items
|
|||
public class BronzeOre : BaseOre
|
||||
{
|
||||
[Constructible]
|
||||
public BronzeOre() : this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public BronzeOre(int amount) : base(CraftResource.Bronze, amount)
|
||||
public BronzeOre(int amount = 1) : base(CraftResource.Bronze, amount)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -609,12 +580,7 @@ namespace Server.Items
|
|||
public class GoldOre : BaseOre
|
||||
{
|
||||
[Constructible]
|
||||
public GoldOre() : this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public GoldOre(int amount) : base(CraftResource.Gold, amount)
|
||||
public GoldOre(int amount = 1) : base(CraftResource.Gold, amount)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -645,12 +611,7 @@ namespace Server.Items
|
|||
public class AgapiteOre : BaseOre
|
||||
{
|
||||
[Constructible]
|
||||
public AgapiteOre() : this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public AgapiteOre(int amount) : base(CraftResource.Agapite, amount)
|
||||
public AgapiteOre(int amount = 1) : base(CraftResource.Agapite, amount)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -681,12 +642,7 @@ namespace Server.Items
|
|||
public class VeriteOre : BaseOre
|
||||
{
|
||||
[Constructible]
|
||||
public VeriteOre() : this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public VeriteOre(int amount) : base(CraftResource.Verite, amount)
|
||||
public VeriteOre(int amount = 1) : base(CraftResource.Verite, amount)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -717,12 +673,7 @@ namespace Server.Items
|
|||
public class ValoriteOre : BaseOre
|
||||
{
|
||||
[Constructible]
|
||||
public ValoriteOre() : this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public ValoriteOre(int amount) : base(CraftResource.Valorite, amount)
|
||||
public ValoriteOre(int amount = 1) : base(CraftResource.Valorite, amount)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -749,4 +700,4 @@ namespace Server.Items
|
|||
return new ValoriteIngot();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue