From 14ef1ab7e52df6638c7c559dc8f413ab7ad7a0ec Mon Sep 17 00:00:00 2001 From: Kamron Batman <3953314+kamronbatman@users.noreply.github.com> Date: Sun, 5 Feb 2023 12:09:08 -0800 Subject: [PATCH] fix: Do not double fetch root parent (#1333) --- Projects/Server/Maps/Map.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Projects/Server/Maps/Map.cs b/Projects/Server/Maps/Map.cs index 6761d2a53..10d0edf19 100644 --- a/Projects/Server/Maps/Map.cs +++ b/Projects/Server/Maps/Map.cs @@ -1057,9 +1057,11 @@ public sealed class Map : IComparable, ISpanFormattable, ISpanParsable } else if (o is Item item) { - if (item.RootParent != null) + // Calculate the height based on the container, not the item inside. + var rootParent = item.RootParent; + if (rootParent != null) { - p = GetPoint(item.RootParent, eye); + p = GetPoint(rootParent, eye); } else {