What I am trying to do here is build a drop table for a reward in my game which can be purchased in exchange of the game's virtual currency. The goal here that I am trying to achieve is I want to create a system where I can just define the Reward Items and their chances of Getting them (in percent ). When the user purchases the reward any three reward items will be granted to user based on the chance/Percent.
Since I am using the playfab's Catalog V2 there are no drop tables in there. The way I did it is I created an Azure function script in which I fetch a catalog bundle with my raw JSON data in it did the necessary calculations and Granted three rewards to the player. This process is costing me two API calls
But I also want to verify in the script that the user has enough virtual currencies to purchase the reward. I was wondering is there any better way of doing this or making a system like this If not how can I fetch the amount of a Specific virtual currency from the player's Inventory V2.