Clean up: Bugs, LINQ, constructors, default values, and null checks (#18)

This commit is contained in:
Kamron Batman 2019-03-11 14:29:59 -07:00 committed by GitHub
parent e748af4430
commit 513e54f70e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
1094 changed files with 15913 additions and 21892 deletions

View file

@ -3,12 +3,7 @@ namespace Server.Items
public class BagOfAllReagents : Bag
{
[Constructible]
public BagOfAllReagents() : this(50)
{
}
[Constructible]
public BagOfAllReagents(int amount)
public BagOfAllReagents(int amount = 50)
{
DropItem(new BlackPearl(amount));
DropItem(new Bloodmoss(amount));
@ -43,4 +38,4 @@ namespace Server.Items
int version = reader.ReadInt();
}
}
}
}

View file

@ -3,12 +3,7 @@ namespace Server.Items
public class BagOfNecroReagents : Bag
{
[Constructible]
public BagOfNecroReagents() : this(50)
{
}
[Constructible]
public BagOfNecroReagents(int amount)
public BagOfNecroReagents(int amount = 50)
{
DropItem(new BatWing(amount));
DropItem(new GraveDust(amount));
@ -35,4 +30,4 @@ namespace Server.Items
int version = reader.ReadInt();
}
}
}
}

View file

@ -3,12 +3,7 @@ namespace Server.Items
public class BagOfReagents : Bag
{
[Constructible]
public BagOfReagents() : this(50)
{
}
[Constructible]
public BagOfReagents(int amount)
public BagOfReagents(int amount = 50)
{
DropItem(new BlackPearl(amount));
DropItem(new Bloodmoss(amount));
@ -38,4 +33,4 @@ namespace Server.Items
int version = reader.ReadInt();
}
}
}
}

View file

@ -2,11 +2,7 @@ namespace Server.Items
{
public abstract class BaseReagent : Item
{
public BaseReagent(int itemID) : this(itemID, 1)
{
}
public BaseReagent(int itemID, int amount) : base(itemID)
public BaseReagent(int itemID, int amount = 1) : base(itemID)
{
Stackable = true;
Amount = amount;

View file

@ -3,12 +3,7 @@ namespace Server.Items
public class BatWing : BaseReagent, ICommodity
{
[Constructible]
public BatWing() : this(1)
{
}
[Constructible]
public BatWing(int amount) : base(0xF78, amount)
public BatWing(int amount = 1) : base(0xF78, amount)
{
}
@ -34,4 +29,4 @@ namespace Server.Items
int version = reader.ReadInt();
}
}
}
}

View file

@ -3,12 +3,7 @@ namespace Server.Items
public class BlackPearl : BaseReagent, ICommodity
{
[Constructible]
public BlackPearl() : this(1)
{
}
[Constructible]
public BlackPearl(int amount) : base(0xF7A, amount)
public BlackPearl(int amount = 1) : base(0xF7A, amount)
{
}
@ -33,4 +28,4 @@ namespace Server.Items
int version = reader.ReadInt();
}
}
}
}

View file

@ -3,12 +3,7 @@ namespace Server.Items
public class Bloodmoss : BaseReagent, ICommodity
{
[Constructible]
public Bloodmoss() : this(1)
{
}
[Constructible]
public Bloodmoss(int amount) : base(0xF7B, amount)
public Bloodmoss(int amount = 1) : base(0xF7B, amount)
{
}
@ -34,4 +29,4 @@ namespace Server.Items
int version = reader.ReadInt();
}
}
}
}

View file

@ -3,12 +3,7 @@ namespace Server.Items
public class DaemonBlood : BaseReagent, ICommodity
{
[Constructible]
public DaemonBlood() : this(1)
{
}
[Constructible]
public DaemonBlood(int amount) : base(0xF7D, amount)
public DaemonBlood(int amount = 1) : base(0xF7D, amount)
{
}
@ -34,4 +29,4 @@ namespace Server.Items
int version = reader.ReadInt();
}
}
}
}

View file

@ -4,12 +4,7 @@ namespace Server.Items
public class DaemonBone : BaseReagent
{
[Constructible]
public DaemonBone() : this(1)
{
}
[Constructible]
public DaemonBone(int amount) : base(0xF80, amount)
public DaemonBone(int amount = 1) : base(0xF80, amount)
{
}
@ -34,4 +29,4 @@ namespace Server.Items
int version = reader.ReadInt();
}
}
}
}

View file

@ -3,12 +3,7 @@ namespace Server.Items
public class DeadWood : BaseReagent, ICommodity
{
[Constructible]
public DeadWood() : this(1)
{
}
[Constructible]
public DeadWood(int amount) : base(0xF90, amount)
public DeadWood(int amount = 1) : base(0xF90, amount)
{
}
@ -33,4 +28,4 @@ namespace Server.Items
int version = reader.ReadInt();
}
}
}
}

View file

@ -3,13 +3,7 @@
public class DragonsBlood : BaseReagent, ICommodity
{
[Constructible]
public DragonsBlood()
: this(1)
{
}
[Constructible]
public DragonsBlood(int amount)
public DragonsBlood(int amount = 1)
: base(0x4077, amount)
{
}
@ -36,4 +30,4 @@
int version = reader.ReadInt();
}
}
}
}

View file

@ -3,12 +3,7 @@ namespace Server.Items
public class Garlic : BaseReagent, ICommodity
{
[Constructible]
public Garlic() : this(1)
{
}
[Constructible]
public Garlic(int amount) : base(0xF84, amount)
public Garlic(int amount = 1) : base(0xF84, amount)
{
}
@ -34,4 +29,4 @@ namespace Server.Items
int version = reader.ReadInt();
}
}
}
}

View file

@ -3,12 +3,7 @@ namespace Server.Items
public class Ginseng : BaseReagent, ICommodity
{
[Constructible]
public Ginseng() : this(1)
{
}
[Constructible]
public Ginseng(int amount) : base(0xF85, amount)
public Ginseng(int amount = 1) : base(0xF85, amount)
{
}
@ -34,4 +29,4 @@ namespace Server.Items
int version = reader.ReadInt();
}
}
}
}

View file

@ -3,12 +3,7 @@ namespace Server.Items
public class GraveDust : BaseReagent, ICommodity
{
[Constructible]
public GraveDust() : this(1)
{
}
[Constructible]
public GraveDust(int amount) : base(0xF8F, amount)
public GraveDust(int amount = 1) : base(0xF8F, amount)
{
}
@ -34,4 +29,4 @@ namespace Server.Items
int version = reader.ReadInt();
}
}
}
}

View file

@ -3,12 +3,7 @@ namespace Server.Items
public class MandrakeRoot : BaseReagent, ICommodity
{
[Constructible]
public MandrakeRoot() : this(1)
{
}
[Constructible]
public MandrakeRoot(int amount) : base(0xF86, amount)
public MandrakeRoot(int amount = 1) : base(0xF86, amount)
{
}
@ -34,4 +29,4 @@ namespace Server.Items
int version = reader.ReadInt();
}
}
}
}

View file

@ -3,12 +3,7 @@ namespace Server.Items
public class Nightshade : BaseReagent, ICommodity
{
[Constructible]
public Nightshade() : this(1)
{
}
[Constructible]
public Nightshade(int amount) : base(0xF88, amount)
public Nightshade(int amount = 1) : base(0xF88, amount)
{
}
@ -34,4 +29,4 @@ namespace Server.Items
int version = reader.ReadInt();
}
}
}
}

View file

@ -3,12 +3,7 @@ namespace Server.Items
public class NoxCrystal : BaseReagent, ICommodity
{
[Constructible]
public NoxCrystal() : this(1)
{
}
[Constructible]
public NoxCrystal(int amount) : base(0xF8E, amount)
public NoxCrystal(int amount = 1) : base(0xF8E, amount)
{
}
@ -34,4 +29,4 @@ namespace Server.Items
int version = reader.ReadInt();
}
}
}
}

View file

@ -3,12 +3,7 @@ namespace Server.Items
public class PigIron : BaseReagent, ICommodity
{
[Constructible]
public PigIron() : this(1)
{
}
[Constructible]
public PigIron(int amount) : base(0xF8A, amount)
public PigIron(int amount = 1) : base(0xF8A, amount)
{
}
@ -34,4 +29,4 @@ namespace Server.Items
int version = reader.ReadInt();
}
}
}
}

View file

@ -3,12 +3,7 @@ namespace Server.Items
public class SpidersSilk : BaseReagent, ICommodity
{
[Constructible]
public SpidersSilk() : this(1)
{
}
[Constructible]
public SpidersSilk(int amount) : base(0xF8D, amount)
public SpidersSilk(int amount = 1) : base(0xF8D, amount)
{
}
@ -34,4 +29,4 @@ namespace Server.Items
int version = reader.ReadInt();
}
}
}
}

View file

@ -3,12 +3,7 @@ namespace Server.Items
public class SulfurousAsh : BaseReagent, ICommodity
{
[Constructible]
public SulfurousAsh() : this(1)
{
}
[Constructible]
public SulfurousAsh(int amount) : base(0xF8C, amount)
public SulfurousAsh(int amount = 1) : base(0xF8C, amount)
{
}
@ -34,4 +29,4 @@ namespace Server.Items
int version = reader.ReadInt();
}
}
}
}