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

@ -24,32 +24,16 @@ namespace Server.Items
private uint m_KeyVal;
[Constructible]
public Key() : this(KeyType.Iron, 0)
public Key(uint val = 0) : this(KeyType.Iron, val)
{
}
[Constructible]
public Key(KeyType type) : this(type, 0)
{
}
[Constructible]
public Key(uint val) : this(KeyType.Iron, val)
{
}
[Constructible]
public Key(KeyType type, uint LockVal) : this(type, LockVal, null)
{
m_KeyVal = LockVal;
}
public Key(KeyType type, uint LockVal, Item link) : base((int)type)
public Key(KeyType type, uint val = 0, Item link = null) : base((int)type)
{
Weight = 1.0;
MaxRange = 3;
m_KeyVal = LockVal;
m_KeyVal = val;
Link = link;
}
@ -404,4 +388,4 @@ namespace Server.Items
}
}
}
}
}