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
|
|
@ -10,7 +10,7 @@ namespace Server.Items
|
|||
|
||||
public class CommodityDeed : Item
|
||||
{
|
||||
public CommodityDeed(Item commodity) : base(0x14F0)
|
||||
public CommodityDeed(Item commodity = null) : base(0x14F0)
|
||||
{
|
||||
Weight = 1.0;
|
||||
Hue = 0x47;
|
||||
|
|
@ -20,11 +20,6 @@ namespace Server.Items
|
|||
LootType = LootType.Blessed;
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public CommodityDeed() : this(null)
|
||||
{
|
||||
}
|
||||
|
||||
public CommodityDeed(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
|
@ -167,7 +162,7 @@ namespace Server.Items
|
|||
number = 1047024; // To claim the resources ....
|
||||
}
|
||||
}
|
||||
else if (cox != null && !cox.IsSecure)
|
||||
else if (cox?.IsSecure == false)
|
||||
{
|
||||
number = 1080525; // The commodity deed box must be secured before you can use it.
|
||||
}
|
||||
|
|
@ -215,7 +210,7 @@ namespace Server.Items
|
|||
|
||||
// Veteran Rewards mods
|
||||
if (box != null && m_Deed.IsChildOf(box) && item.IsChildOf(box) ||
|
||||
cox != null && cox.IsSecure && item.IsChildOf(cox))
|
||||
cox?.IsSecure != true && item.IsChildOf(cox))
|
||||
{
|
||||
if (m_Deed.SetCommodity(item))
|
||||
{
|
||||
|
|
@ -245,4 +240,4 @@ namespace Server.Items
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue