Hi,
We're currently trying to find a solution for giving gifts to players that allow us to send multiple (e.g., more than 100) items. We read a lot of issues on the forum (especially this one https://community.playfab.com/questions/5168/how-to-grant-multiple-stackable-items-in-one-api-c.html) and it seems to be two main solutions:
- Creating a bundle with the gifts contents and send it to the player
- Using a FOR-loop to create an array with multiple items with the same ID and use Grant function with this array
Both of them fail to accommodate our needs, so we came up with an alternative that might work and I want to confirm if it's a way to go.
- Our solution: using cloud script, we'll Grant items to the player (using GrantItemsToUsers) and set the amount of each item on its individual custom data. This will require our items to be non-stackable.
{ "CatalogVersion": "5", "ItemGrants": [ { "PlayFabId": "20394883", "ItemId": "card_land_01", "Annotation": "Card Land 01", "Data": { "Amount": 500 } } ] }
This strategy will make the inventory only a "temporary bag" for the gifts, since the client code will interpret each item with its custom data and add them to our local Storage, which is saved as a Player Data (Title) on PlayFab.
I want to know if there's any major problems with this approach or any recommendations.
Thank you all!