Hi, I've just started testing Playfab today and when I try to use GrantItemsToUser (already specify the catalog version for it), nothing are added to inventory if that item do not exist in primary catalog.
This is my code.
handlers.AddRandomEquipments = function(args, context) //not working at all { var weaponTypes = ["armor","boots","gloves","helmet","weapon"]; var weaponTier = 1; var randomType = Math.floor(Math.random() * weaponTypes.length); var weaponShortCode = randomType + "." + weaponTier; //This is not primary catalog var request = server.GrantItemsToUser({PlayFabId: currentPlayerId, ItemIds: [weaponShortCode], CatalogVersion: "weaponData"}); } handlers.AddMonster = function(args, context) //working correctly { //this is primary catalog var monsterShortCode = args.monsterShortCode; var request = server.GrantItemsToUser({PlayFabId: currentPlayerId, ItemIds: [monsterShortCode], CatalogVersion: "monsterData"}); }
I want to use different catalog in order to make it easier to classify items by types that's why it's quite annoying to put all the item types in the same catalog. Are there any workaround or best practice for this?
Thank you.