diff --git a/Projects/Server/Items/Item.cs b/Projects/Server/Items/Item.cs index 767efa6df..4875452dc 100644 --- a/Projects/Server/Items/Item.cs +++ b/Projects/Server/Items/Item.cs @@ -3348,6 +3348,16 @@ public class Item : IHued, IComparable, ISpawnable, IObjectPropertyListEnt } } + private static readonly HashSet _excludedProperties = new() + { + "Parent", + "Next", + "Previous", + "OnLinkList" + }; + + public virtual bool DupeExcludedProperty(string propertyName) => _excludedProperties.Contains(propertyName); + public virtual void OnAfterDuped(Item newItem) { } diff --git a/Projects/UOContent/Commands/Dupe.cs b/Projects/UOContent/Commands/Dupe.cs index 0911a5389..56b0f46d1 100644 --- a/Projects/UOContent/Commands/Dupe.cs +++ b/Projects/UOContent/Commands/Dupe.cs @@ -51,7 +51,7 @@ namespace Server.Commands try { // Do not set the parent since it screws up mobile/container totals and weights. - if (p.CanRead && p.CanWrite && p.Name != "Parent") + if (p.CanRead && p.CanWrite && !src.DupeExcludedProperty(p.Name) && !dest.DupeExcludedProperty(p.Name)) { p.SetValue(dest, p.GetValue(src, null), null); }