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 <noreply@anthropic.com>
This commit is contained in:
Kamron Batman 2026-08-22 10:59:53 -07:00
parent 8534774e50
commit 724fe71156

View file

@ -5250,7 +5250,14 @@ public partial class Mobile : IHued, IComparable<Mobile>, 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);