Formatting #2 (#59)

This commit is contained in:
Kamron Batman 2019-10-05 00:37:03 -07:00 committed by GitHub
parent 096d39609e
commit 8e9221bb5a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
400 changed files with 3688 additions and 5969 deletions

View file

@ -381,19 +381,13 @@ namespace Server.Items
public override int GetTotal(TotalType type)
{
switch (type)
return type switch
{
case TotalType.Gold:
return m_TotalGold;
case TotalType.Items:
return m_TotalItems;
case TotalType.Weight:
return m_TotalWeight;
}
return base.GetTotal(type);
TotalType.Gold => m_TotalGold,
TotalType.Items => m_TotalItems,
TotalType.Weight => m_TotalWeight,
_ => base.GetTotal(type)
};
}
public override void UpdateTotal(Item sender, TotalType type, int delta)
@ -1562,10 +1556,8 @@ namespace Server.Items
Item item = items[i];
if (item is T typedItem)
{
if (predicate?.Invoke(typedItem) == true)
list.Add(typedItem);
}
if (recurse && item is Container)
RecurseFindItemsByType(item, true, list, predicate);