From 0a4579f29857a8207ecfc0e358fd7a49d3c70b6c Mon Sep 17 00:00:00 2001 From: Kamron Batman <3953314+kamronbatman@users.noreply.github.com> Date: Mon, 7 Apr 2025 22:27:41 -0700 Subject: [PATCH] fix: Fixes duping bags (#2148) ### Summary Fixes duping items in a container not working properly. --- Projects/UOContent/Commands/Dupe.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Projects/UOContent/Commands/Dupe.cs b/Projects/UOContent/Commands/Dupe.cs index e38a114f3..2d715714e 100644 --- a/Projects/UOContent/Commands/Dupe.cs +++ b/Projects/UOContent/Commands/Dupe.cs @@ -120,6 +120,18 @@ public static class Dupe for (var j = 0; j < src.Items.Count; j++) { + c = src.Items[j].GetType().GetConstructor(out var paramCount); + if (c == null) + { + continue; + } + + args = paramCount == 0 ? null : new object[paramCount]; + if (args != null) + { + Array.Fill(args, Type.Missing); + } + var subItem = DoDupe(src.Items[j], c, args, from); newItem.AddItem(subItem); }