Hi, Im trying to implement some lootbox logic in a Cloud script (with azure funcs) which works most of the time but I am being hit by rate limits so not all of my inventory changes are being made, which is understandable as I am making a lot of api requests. But Im not sure how to implement lootbox logic in V2 with out the drop tables from V1.
I have 3 currencies that are being used in this script:
Lootboxes: how many lootboxes the user has
Coins: used as a compensation for duplicate items
NumOfLootboxesOpenedSinceLastEpic: for tracking how many lootboxes have been opened since they got an epic item.
At present my script performs these api requests:
Fetches users currency, to see if we can open a lootbox.
Checks users inventory to see if they already have these items.
Adds all 4 items (with 4 individual api calls as it doesnt seem possible to group these into a single api call even though the method is called AddInventoryItemsAsync).
Subtracts 1 from Lootboxes balance.
Adds 1 to NumOfLootboxesOpenedSinceLastEpic
Adds X Coins for any duplicates.
As you can see this is a lot of api requests but I feel like its not possible otherwise, I might switch to a system that pregenerates the lootboxes as that would reduce the need for tracking the number of lootboxes per epic item, but the bulk of the api calls is still from when I am adding the 4 items to the users inventory and I cant see any way around this?