Block swap in scav inventory on post-raid transfer screen

This commit is contained in:
Tyfon
2024-05-19 14:28:01 -07:00
parent 8343c1fb75
commit 9ee4e79ee2
2 changed files with 10 additions and 1 deletions

View File

@@ -114,7 +114,7 @@ namespace UIFixes
}
}
// method_9 activates/decactives the product game objects based on the search. Need to resort the list due to above patch
// method_9 activates/deactivates the product game objects based on the search. Need to resort the list due to above patch
public class OnSearchChangePatch : ModulePatch
{
protected override MethodBase GetTargetMethod()

View File

@@ -99,6 +99,15 @@ namespace UIFixes
return false;
}
// TODO: Remove in 3.9.0 when server bug is fixed
// If on the scav inventory screen (aka post-raid scav transfer), swap must be blocked not only between the scav inventory and the stash (normally blocked anyway),
// but even within the scav inventory itself, due to the server not handling it.
if ((itemContext.ViewType == EItemViewType.ScavInventory || targetItemContext.ViewType == EItemViewType.ScavInventory)
&& (itemContext.Item.Owner.ID != PatchConstants.BackEndSession.Profile.Id || targetItemContext.Item.Owner.ID != PatchConstants.BackEndSession.Profile.Id))
{
return false;
}
if (itemContext.Item == targetItemContext.Item || targetItemContext.Item.GetAllParentItems().Contains(itemContext.Item))
{
return false;