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

@ -7,17 +7,8 @@ namespace Server.Items
{
public class SpellScroll : Item, ICommodity
{
public SpellScroll(Serial serial) : base(serial)
{
}
[Constructible]
public SpellScroll(int spellID, int itemID) : this(spellID, itemID, 1)
{
}
[Constructible]
public SpellScroll(int spellID, int itemID, int amount) : base(itemID)
public SpellScroll(int spellID, int itemID, int amount = 1) : base(itemID)
{
Stackable = true;
Weight = 1.0;
@ -26,6 +17,10 @@ namespace Server.Items
SpellID = spellID;
}
public SpellScroll(Serial serial) : base(serial)
{
}
public int SpellID{ get; private set; }
int ICommodity.DescriptionNumber => LabelNumber;
@ -84,4 +79,4 @@ namespace Server.Items
from.SendLocalizedMessage(502345); // This spell has been temporarily disabled.
}
}
}
}