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
|
|
@ -3,13 +3,7 @@ namespace Server.Items
|
|||
public class Blight : Item
|
||||
{
|
||||
[Constructible]
|
||||
public Blight()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public Blight(int amount)
|
||||
public Blight(int amount = 1)
|
||||
: base(0x3183)
|
||||
{
|
||||
Stackable = true;
|
||||
|
|
@ -39,13 +33,7 @@ namespace Server.Items
|
|||
public class LuminescentFungi : Item
|
||||
{
|
||||
[Constructible]
|
||||
public LuminescentFungi()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public LuminescentFungi(int amount)
|
||||
public LuminescentFungi(int amount = 1)
|
||||
: base(0x3191)
|
||||
{
|
||||
Stackable = true;
|
||||
|
|
@ -76,13 +64,7 @@ namespace Server.Items
|
|||
public class CapturedEssence : Item
|
||||
{
|
||||
[Constructible]
|
||||
public CapturedEssence()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public CapturedEssence(int amount)
|
||||
public CapturedEssence(int amount = 1)
|
||||
: base(0x318E)
|
||||
{
|
||||
Stackable = true;
|
||||
|
|
@ -112,12 +94,6 @@ namespace Server.Items
|
|||
|
||||
public class EyeOfTheTravesty : Item
|
||||
{
|
||||
[Constructible]
|
||||
public EyeOfTheTravesty()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public EyeOfTheTravesty(int amountFrom, int amountTo)
|
||||
: this(Utility.RandomMinMax(amountFrom, amountTo))
|
||||
|
|
@ -125,7 +101,7 @@ namespace Server.Items
|
|||
}
|
||||
|
||||
[Constructible]
|
||||
public EyeOfTheTravesty(int amount)
|
||||
public EyeOfTheTravesty(int amount = 1)
|
||||
: base(0x318D)
|
||||
{
|
||||
Stackable = true;
|
||||
|
|
@ -155,12 +131,6 @@ namespace Server.Items
|
|||
|
||||
public class Corruption : Item
|
||||
{
|
||||
[Constructible]
|
||||
public Corruption()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public Corruption(int amountFrom, int amountTo)
|
||||
: this(Utility.RandomMinMax(amountFrom, amountTo))
|
||||
|
|
@ -168,7 +138,7 @@ namespace Server.Items
|
|||
}
|
||||
|
||||
[Constructible]
|
||||
public Corruption(int amount)
|
||||
public Corruption(int amount = 1)
|
||||
: base(0x3184)
|
||||
{
|
||||
Stackable = true;
|
||||
|
|
@ -198,12 +168,6 @@ namespace Server.Items
|
|||
|
||||
public class DreadHornMane : Item
|
||||
{
|
||||
[Constructible]
|
||||
public DreadHornMane()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public DreadHornMane(int amountFrom, int amountTo)
|
||||
: this(Utility.RandomMinMax(amountFrom, amountTo))
|
||||
|
|
@ -211,7 +175,7 @@ namespace Server.Items
|
|||
}
|
||||
|
||||
[Constructible]
|
||||
public DreadHornMane(int amount)
|
||||
public DreadHornMane(int amount = 1)
|
||||
: base(0x318A)
|
||||
{
|
||||
Stackable = true;
|
||||
|
|
@ -241,12 +205,6 @@ namespace Server.Items
|
|||
|
||||
public class ParasiticPlant : Item
|
||||
{
|
||||
[Constructible]
|
||||
public ParasiticPlant()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public ParasiticPlant(int amountFrom, int amountTo)
|
||||
: this(Utility.RandomMinMax(amountFrom, amountTo))
|
||||
|
|
@ -254,7 +212,7 @@ namespace Server.Items
|
|||
}
|
||||
|
||||
[Constructible]
|
||||
public ParasiticPlant(int amount)
|
||||
public ParasiticPlant(int amount = 1)
|
||||
: base(0x3190)
|
||||
{
|
||||
Stackable = true;
|
||||
|
|
@ -284,12 +242,6 @@ namespace Server.Items
|
|||
|
||||
public class Muculent : Item
|
||||
{
|
||||
[Constructible]
|
||||
public Muculent()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public Muculent(int amountFrom, int amountTo)
|
||||
: this(Utility.RandomMinMax(amountFrom, amountTo))
|
||||
|
|
@ -297,7 +249,7 @@ namespace Server.Items
|
|||
}
|
||||
|
||||
[Constructible]
|
||||
public Muculent(int amount)
|
||||
public Muculent(int amount = 1)
|
||||
: base(0x3188)
|
||||
{
|
||||
Stackable = true;
|
||||
|
|
@ -327,12 +279,6 @@ namespace Server.Items
|
|||
|
||||
public class DiseasedBark : Item
|
||||
{
|
||||
[Constructible]
|
||||
public DiseasedBark()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public DiseasedBark(int amountFrom, int amountTo)
|
||||
: this(Utility.RandomMinMax(amountFrom, amountTo))
|
||||
|
|
@ -340,7 +286,7 @@ namespace Server.Items
|
|||
}
|
||||
|
||||
[Constructible]
|
||||
public DiseasedBark(int amount)
|
||||
public DiseasedBark(int amount = 1)
|
||||
: base(0x318B)
|
||||
{
|
||||
Stackable = true;
|
||||
|
|
@ -370,12 +316,6 @@ namespace Server.Items
|
|||
|
||||
public class BarkFragment : Item
|
||||
{
|
||||
[Constructible]
|
||||
public BarkFragment()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public BarkFragment(int amountFrom, int amountTo)
|
||||
: this(Utility.RandomMinMax(amountFrom, amountTo))
|
||||
|
|
@ -383,7 +323,7 @@ namespace Server.Items
|
|||
}
|
||||
|
||||
[Constructible]
|
||||
public BarkFragment(int amount)
|
||||
public BarkFragment(int amount = 1)
|
||||
: base(0x318F)
|
||||
{
|
||||
Stackable = true;
|
||||
|
|
@ -413,12 +353,6 @@ namespace Server.Items
|
|||
|
||||
public class GrizzledBones : Item
|
||||
{
|
||||
[Constructible]
|
||||
public GrizzledBones()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public GrizzledBones(int amountFrom, int amountTo)
|
||||
: this(Utility.RandomMinMax(amountFrom, amountTo))
|
||||
|
|
@ -426,7 +360,7 @@ namespace Server.Items
|
|||
}
|
||||
|
||||
[Constructible]
|
||||
public GrizzledBones(int amount)
|
||||
public GrizzledBones(int amount = 1)
|
||||
: base(0x318C)
|
||||
{
|
||||
Stackable = true;
|
||||
|
|
@ -459,12 +393,6 @@ namespace Server.Items
|
|||
|
||||
public class LardOfParoxysmus : Item
|
||||
{
|
||||
[Constructible]
|
||||
public LardOfParoxysmus()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public LardOfParoxysmus(int amountFrom, int amountTo)
|
||||
: this(Utility.RandomMinMax(amountFrom, amountTo))
|
||||
|
|
@ -472,7 +400,7 @@ namespace Server.Items
|
|||
}
|
||||
|
||||
[Constructible]
|
||||
public LardOfParoxysmus(int amount)
|
||||
public LardOfParoxysmus(int amount = 1)
|
||||
: base(0x3189)
|
||||
{
|
||||
Stackable = true;
|
||||
|
|
@ -501,12 +429,6 @@ namespace Server.Items
|
|||
|
||||
public class PerfectEmerald : Item
|
||||
{
|
||||
[Constructible]
|
||||
public PerfectEmerald()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public PerfectEmerald(int amountFrom, int amountTo)
|
||||
: this(Utility.RandomMinMax(amountFrom, amountTo))
|
||||
|
|
@ -514,7 +436,7 @@ namespace Server.Items
|
|||
}
|
||||
|
||||
[Constructible]
|
||||
public PerfectEmerald(int amount)
|
||||
public PerfectEmerald(int amount = 1)
|
||||
: base(0x3194)
|
||||
{
|
||||
Stackable = true;
|
||||
|
|
@ -543,12 +465,6 @@ namespace Server.Items
|
|||
|
||||
public class DarkSapphire : Item
|
||||
{
|
||||
[Constructible]
|
||||
public DarkSapphire()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public DarkSapphire(int amountFrom, int amountTo)
|
||||
: this(Utility.RandomMinMax(amountFrom, amountTo))
|
||||
|
|
@ -556,7 +472,7 @@ namespace Server.Items
|
|||
}
|
||||
|
||||
[Constructible]
|
||||
public DarkSapphire(int amount)
|
||||
public DarkSapphire(int amount = 1)
|
||||
: base(0x3192)
|
||||
{
|
||||
Stackable = true;
|
||||
|
|
@ -586,12 +502,6 @@ namespace Server.Items
|
|||
|
||||
public class Turquoise : Item
|
||||
{
|
||||
[Constructible]
|
||||
public Turquoise()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public Turquoise(int amountFrom, int amountTo)
|
||||
: this(Utility.RandomMinMax(amountFrom, amountTo))
|
||||
|
|
@ -599,7 +509,7 @@ namespace Server.Items
|
|||
}
|
||||
|
||||
[Constructible]
|
||||
public Turquoise(int amount)
|
||||
public Turquoise(int amount = 1)
|
||||
: base(0x3193)
|
||||
{
|
||||
Stackable = true;
|
||||
|
|
@ -629,12 +539,6 @@ namespace Server.Items
|
|||
|
||||
public class EcruCitrine : Item
|
||||
{
|
||||
[Constructible]
|
||||
public EcruCitrine()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public EcruCitrine(int amountFrom, int amountTo)
|
||||
: this(Utility.RandomMinMax(amountFrom, amountTo))
|
||||
|
|
@ -642,7 +546,7 @@ namespace Server.Items
|
|||
}
|
||||
|
||||
[Constructible]
|
||||
public EcruCitrine(int amount)
|
||||
public EcruCitrine(int amount = 1)
|
||||
: base(0x3195)
|
||||
{
|
||||
Stackable = true;
|
||||
|
|
@ -672,12 +576,6 @@ namespace Server.Items
|
|||
|
||||
public class WhitePearl : Item
|
||||
{
|
||||
[Constructible]
|
||||
public WhitePearl()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public WhitePearl(int amountFrom, int amountTo)
|
||||
: this(Utility.RandomMinMax(amountFrom, amountTo))
|
||||
|
|
@ -685,7 +583,7 @@ namespace Server.Items
|
|||
}
|
||||
|
||||
[Constructible]
|
||||
public WhitePearl(int amount)
|
||||
public WhitePearl(int amount = 1)
|
||||
: base(0x3196)
|
||||
{
|
||||
Stackable = true;
|
||||
|
|
@ -715,12 +613,6 @@ namespace Server.Items
|
|||
|
||||
public class FireRuby : Item
|
||||
{
|
||||
[Constructible]
|
||||
public FireRuby()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public FireRuby(int amountFrom, int amountTo)
|
||||
: this(Utility.RandomMinMax(amountFrom, amountTo))
|
||||
|
|
@ -728,7 +620,7 @@ namespace Server.Items
|
|||
}
|
||||
|
||||
[Constructible]
|
||||
public FireRuby(int amount)
|
||||
public FireRuby(int amount = 1)
|
||||
: base(0x3197)
|
||||
{
|
||||
Stackable = true;
|
||||
|
|
@ -758,12 +650,6 @@ namespace Server.Items
|
|||
|
||||
public class BlueDiamond : Item
|
||||
{
|
||||
[Constructible]
|
||||
public BlueDiamond()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public BlueDiamond(int amountFrom, int amountTo)
|
||||
: this(Utility.RandomMinMax(amountFrom, amountTo))
|
||||
|
|
@ -771,7 +657,7 @@ namespace Server.Items
|
|||
}
|
||||
|
||||
[Constructible]
|
||||
public BlueDiamond(int amount)
|
||||
public BlueDiamond(int amount = 1)
|
||||
: base(0x3198)
|
||||
{
|
||||
Stackable = true;
|
||||
|
|
@ -801,12 +687,6 @@ namespace Server.Items
|
|||
|
||||
public class BrilliantAmber : Item
|
||||
{
|
||||
[Constructible]
|
||||
public BrilliantAmber()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public BrilliantAmber(int amountFrom, int amountTo)
|
||||
: this(Utility.RandomMinMax(amountFrom, amountTo))
|
||||
|
|
@ -814,7 +694,7 @@ namespace Server.Items
|
|||
}
|
||||
|
||||
[Constructible]
|
||||
public BrilliantAmber(int amount)
|
||||
public BrilliantAmber(int amount = 1)
|
||||
: base(0x3199)
|
||||
{
|
||||
Stackable = true;
|
||||
|
|
@ -843,12 +723,6 @@ namespace Server.Items
|
|||
|
||||
public class Scourge : Item
|
||||
{
|
||||
[Constructible]
|
||||
public Scourge()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public Scourge(int amountFrom, int amountTo)
|
||||
: this(Utility.RandomMinMax(amountFrom, amountTo))
|
||||
|
|
@ -856,7 +730,7 @@ namespace Server.Items
|
|||
}
|
||||
|
||||
[Constructible]
|
||||
public Scourge(int amount)
|
||||
public Scourge(int amount = 1)
|
||||
: base(0x3185)
|
||||
{
|
||||
Stackable = true;
|
||||
|
|
@ -887,12 +761,6 @@ namespace Server.Items
|
|||
|
||||
public class Putrefication : Item
|
||||
{
|
||||
[Constructible]
|
||||
public Putrefication()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public Putrefication(int amountFrom, int amountTo)
|
||||
: this(Utility.RandomMinMax(amountFrom, amountTo))
|
||||
|
|
@ -900,7 +768,7 @@ namespace Server.Items
|
|||
}
|
||||
|
||||
[Constructible]
|
||||
public Putrefication(int amount)
|
||||
public Putrefication(int amount = 1)
|
||||
: base(0x3186)
|
||||
{
|
||||
Stackable = true;
|
||||
|
|
@ -931,12 +799,6 @@ namespace Server.Items
|
|||
|
||||
public class Taint : Item
|
||||
{
|
||||
[Constructible]
|
||||
public Taint()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public Taint(int amountFrom, int amountTo)
|
||||
: this(Utility.RandomMinMax(amountFrom, amountTo))
|
||||
|
|
@ -944,7 +806,7 @@ namespace Server.Items
|
|||
}
|
||||
|
||||
[Constructible]
|
||||
public Taint(int amount)
|
||||
public Taint(int amount = 1)
|
||||
: base(0x3187)
|
||||
{
|
||||
Stackable = true;
|
||||
|
|
@ -1003,12 +865,6 @@ namespace Server.Items
|
|||
|
||||
public class SwitchItem : Item
|
||||
{
|
||||
[Constructible]
|
||||
public SwitchItem()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public SwitchItem(int amountFrom, int amountTo)
|
||||
: this(Utility.RandomMinMax(amountFrom, amountTo))
|
||||
|
|
@ -1016,7 +872,7 @@ namespace Server.Items
|
|||
}
|
||||
|
||||
[Constructible]
|
||||
public SwitchItem(int amount)
|
||||
public SwitchItem(int amount = 1)
|
||||
: base(0x2F5F)
|
||||
{
|
||||
Stackable = true;
|
||||
|
|
@ -1042,4 +898,4 @@ namespace Server.Items
|
|||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue