BUG: Fix limited items being rejected

This was causing items to be rejected incorrectly when people had their
permission set to owner, lover, whitelist because it probably meant <= 3
rather than < 3. However, I don't see why this check is useful at all:
it's already established that the item is limited so the player needs
to be whitelisted in order for it to be permitted, regardless of what
their item permission is set to (as I understand) so I think the correct
fix is to remove the check altogether.

As far as I know, owners and lovers can't override limited items, so
I think the line above excluding owners and lovers might want to be
deleted too.
This commit is contained in:
EllieThePink 2025-03-25 22:30:09 +00:00
parent 4e79439d91
commit 2e5cc6c6dc

View file

@ -570,8 +570,8 @@ function ValidationIsItemBlockedOrLimited(C, sourceMemberNumber, groupName, asse
if (InventoryIsPermissionBlocked(C, assetName, groupName, type)) return true;
if (!InventoryIsPermissionLimited(C, assetName, groupName, type)) return false;
if (C.IsLoverOfMemberNumber(sourceMemberNumber) || C.IsOwnedByMemberNumber(sourceMemberNumber)) return false;
// If item permission is "Owner, Lover, whitelist & Dominants" or below, the source must be on their whitelist
if (C.ItemPermission < 3 && C.WhiteList.includes(sourceMemberNumber)) return false;
// The item is limited so if the source is on their whitelist, it's permitted
if (C.WhiteList.includes(sourceMemberNumber)) return false;
// Otherwise, the item is limited, and the source doesn't have permission
return true;
}