Fixes expressions that are always true, null, or flase.

This commit is contained in:
Kamron Batman 2018-09-15 10:08:25 -07:00
parent 970fd563b2
commit 7321fa1b63
6 changed files with 14 additions and 29 deletions

View file

@ -1081,17 +1081,7 @@ namespace Server.Items
return -1;
}
public int ConsumeTotal(Type[][] types, int[] amounts)
{
return ConsumeTotal(types, amounts, true, null);
}
public int ConsumeTotal(Type[][] types, int[] amounts, bool recurse)
{
return ConsumeTotal(types, amounts, recurse, null);
}
public int ConsumeTotal(Type[][] types, int[] amounts, bool recurse, OnItemConsumed callback)
public int ConsumeTotal(Type[][] types, int[] amounts, bool recurse = true, OnItemConsumed callback = null)
{
if (types.Length != amounts.Length)
throw new ArgumentException();
@ -1507,12 +1497,7 @@ namespace Server.Items
#region Non-Generic FindItem[s] by Type
public Item[] FindItemsByType(Type type)
{
return FindItemsByType(type, true);
}
public Item[] FindItemsByType(Type type, bool recurse)
public Item[] FindItemsByType(Type type, bool recurse = true)
{
if (m_FindItemsList.Count > 0)
m_FindItemsList.Clear();