fix: Fixes FindItemsByType<T> that block recursion (#1453)
This commit is contained in:
parent
455b11de9c
commit
431e7fb8fe
1 changed files with 5 additions and 4 deletions
|
|
@ -418,10 +418,10 @@ public class Container : Item
|
||||||
{
|
{
|
||||||
return type switch
|
return type switch
|
||||||
{
|
{
|
||||||
TotalType.Gold => m_TotalGold,
|
TotalType.Gold => m_TotalGold,
|
||||||
TotalType.Items => m_TotalItems,
|
TotalType.Items => m_TotalItems,
|
||||||
TotalType.Weight => m_TotalWeight,
|
TotalType.Weight => m_TotalWeight,
|
||||||
_ => base.GetTotal(type)
|
_ => base.GetTotal(type)
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1732,7 +1732,8 @@ public class Container : Item
|
||||||
{
|
{
|
||||||
items.Add(typedItem);
|
items.Add(typedItem);
|
||||||
}
|
}
|
||||||
else if (recurse && item is Container itemContainer)
|
|
||||||
|
if (recurse && item is Container itemContainer)
|
||||||
{
|
{
|
||||||
queue.Enqueue(itemContainer);
|
queue.Enqueue(itemContainer);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue