I'm trying to reward a random item (1 of 320) to a user depending on whether that user owns that item or not using cloud scripting.
Would it be better to compare the user's inventory to the catalog in question in my cloud script instead of using a random drop table and generate a random award based on the leftover items? And if so, how would I go about that after first retrieving them like this:
var userInventory = server.GetUserInventory(
{
PlayFabId: currentPlayerId,
CatalogVersion: "Purchasable"
});
var catalogItems = server.GetCatalogItems(
{
CatalogVersion: "Purchasable"
});
Thanks in advance.