From 431e7fb8fe128a47fe7ecf15f300d0cf977afb50 Mon Sep 17 00:00:00 2001 From: Stefano Merotta <97297186+stefanomerotta@users.noreply.github.com> Date: Sun, 13 Aug 2023 00:37:13 +0200 Subject: [PATCH] fix: Fixes FindItemsByType that block recursion (#1453) --- Projects/Server/Items/Container.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Projects/Server/Items/Container.cs b/Projects/Server/Items/Container.cs index 379741ba3..73215494f 100644 --- a/Projects/Server/Items/Container.cs +++ b/Projects/Server/Items/Container.cs @@ -418,10 +418,10 @@ public class Container : Item { return type switch { - TotalType.Gold => m_TotalGold, - TotalType.Items => m_TotalItems, + TotalType.Gold => m_TotalGold, + TotalType.Items => m_TotalItems, TotalType.Weight => m_TotalWeight, - _ => base.GetTotal(type) + _ => base.GetTotal(type) }; } @@ -1732,7 +1732,8 @@ public class Container : Item { items.Add(typedItem); } - else if (recurse && item is Container itemContainer) + + if (recurse && item is Container itemContainer) { queue.Enqueue(itemContainer); }