Hello,
I'm trying to figure out what the parameter UpgradeFromItems (inside of an ItemPurchaseRequest) is for.
What I try to achieve is like a typical upgrade where you use 5 basic runes + 100 gold, and you get 1 advanced rune.
I'm using StartPurchase in order to do all in a single transaction with the server, so i can avoid interruptions by losing internet connection and causing an incomplete upgrade.
Any thoughts?
Thank you
Answer by Brendan · Dec 13, 2016 at 07:39 PM
It's a leftover from a previous revision of the purchasing code, and it was fairly narrow in terms of usage, as it was specific to a particular scenario. All it does is check that the number of items in the UpgradeFromItems array matches the quantity of the ItemId being purchased. What you're looking for is more of a crafting/alchemy system, which we have a backlog item for (https://community.playfab.com/idea/643/208258617-Crafting.html). Right now, you could do this using Cloud Script - get the player inventory, check that it has the items in question, then add the advanced rune and remove the basic runes+gold.
Yeah I had some problems with the execution time with cloudscript, but i'll check it again.
Thanks for your reply
any update on this? is Cloud Script still the best way to do this?