diff --git a/Patches/SwapPatch.cs b/Patches/SwapPatch.cs index d890caf..de28a0a 100644 --- a/Patches/SwapPatch.cs +++ b/Patches/SwapPatch.cs @@ -46,6 +46,8 @@ namespace UIFixes // The most recent GridItemView that was hovered - needed to forcibly update hover state after swap private static GridItemView LastHoveredGridItemView; + private static EOwnerType[] BannedOwnerTypes = [EOwnerType.Mail, EOwnerType.Trader]; + public static void Enable() { GridItemAddressType = PatchConstants.EftTypes.First(t => typeof(ItemAddress).IsAssignableFrom(t) && t.GetProperty("Grid") != null); // GClass2769 @@ -92,6 +94,11 @@ namespace UIFixes return false; } + if (BannedOwnerTypes.Contains(itemContext.Item.Owner.OwnerType) || BannedOwnerTypes.Contains(targetItemContext.Item.Owner.OwnerType)) + { + return false; + } + if (itemContext.Item == targetItemContext.Item || targetItemContext.Item.GetAllParentItems().Contains(itemContext.Item)) { return false;