question

yogev avatar image
yogev asked

Best way to update remaining usages of an item from azure function

Hey, what is the best way to update the remaining usages of an item from Azure function?

I am not sure if calling ConsumeItem 4 times is a waste of resources and calls

apis
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

Neils Shi avatar image
Neils Shi answered

As you mentioned, players can call API ConsumeItem to decrease the remaining usage of consumable items. Or you may also consider use API ModifyItemUses to modify the number of remaining uses of player's inventory item via Azure Function, this allows you to update (Increase or decrease) the remaining usage of consumable items. In addition, if you want to modify the remaining usage of the same ItemInstanceId item, you can specify the number of changes via setting the parameter “UsesToAdd” or “ConsumeCount”. If you want to modify the remaining usage of the different ItemInstanceId items, then you need to call multiple APIs, and each API request modifies one instance item.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.