fix: Fixes duping bags (#2148)

### Summary

Fixes duping items in a container not working properly.
This commit is contained in:
Kamron Batman 2025-04-07 22:27:41 -07:00 committed by GitHub
parent 2c6f1854fa
commit 0a4579f298
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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);
}