Hi, I was able to successfully setup granting characters for users using PlayFabClientAPI.GrantCharacterToUser() by deducting a character unlock token from their inventory. However, for my project I would like to have multiple unlock token types, one for each class of character. For instance, let's say I have two classes, "Tank" and "Healer" and want to have unlock tokens for each. If you have an unlock token for the Tank class, then you will not be able to use it to unlock a Healer. I think I have an idea of how I can do this, but wanted to check here to make sure it is the optimal solution.
I assume I will first check if the user has a "TankToken" with GetUserInventory, then if they have the token in inventory, I would call PlayFabServerAPI.GrantCharacterToUser to grant the character to the user account, then I would deduct the TankToken from their inventory with RevokeInventoryItem. I know there is more to this, but I am just paraphrasing to keep things concise.
I will still have a Universal Unlock Token I will grant players when they first start the game so they can unlock a character in any class. This token will have "Is a token for character creation" = true. I also assume that the other class specific tokens should have this set to false since I will be deducting the tokens with RevokeInventoryItem. I guess one way of looking at it is these class specific tokens are like keys that instead of unlocking chests, they unlock a character in that class.
Let me know if I am on the right path.
Thanks,
Kevin