From 724fe711562c2aab8f57e41f351b434ae1f9c3ab Mon Sep 17 00:00:00 2001 From: Kamron Batman <3953314+kamronbatman@users.noreply.github.com> Date: Sat, 22 Aug 2026 10:59:53 -0700 Subject: [PATCH] perf: keep LiftItemDupe's parented remainder off the decay scheduler The explicit Map assignment ran while the remainder was still parentless, so splitting a container stack transiently registered it for decay only for AddItem to unregister it one call later. Both AddItem overloads assign Parent before Map, so the assignment was redundant for parented remainders; keep it only for the ground case, where it places and enrolls the item. The only code between the old assignment and AddItem is OnAfterDuped, and no override reads the new item's Map. Co-Authored-By: Claude Fable 5 --- Projects/Server/Mobiles/Mobile.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Projects/Server/Mobiles/Mobile.cs b/Projects/Server/Mobiles/Mobile.cs index 6755c244b..236f34c1a 100644 --- a/Projects/Server/Mobiles/Mobile.cs +++ b/Projects/Server/Mobiles/Mobile.cs @@ -5250,7 +5250,14 @@ public partial class Mobile : IHued, IComparable, ISpawnable, IObjectPro item.PlayerConstructed = oldItem.PlayerConstructed; item.Amount = oldAmount - amount; - item.Map = oldItem.Map; + + // A parented remainder gets its map from AddItem below (parent first, then map), which + // keeps the split off the decay scheduler; a ground remainder is placed - and enrolled - + // by the Map setter here. + if (oldItem.Parent == null) + { + item.Map = oldItem.Map; + } oldItem.OnAfterDuped(item);