Try to block swapping to traders even if other mods allow it
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user