question

taikasika avatar image
taikasika asked

ConsumeItem and stack removal proper practice

Hello, I've been making an inventory and just encountered this problem:

You can't consume from multiple items at the same time unlike RevokeInventoryItems, which still has a smaller limit of 25, but even that is something, so unless the player decides to log in and empty their whole inventory, it shouldn't be too much of a problem.

So about the ConsumeItem problem I've been thinking about:

If a player has, for example:

3 potions of samekind

3 mushrooms

3 rocks

3 random things

To me, it would be reasonable that if these items had been granted already, it is a possibility that there will be 4 API calls for consumption when updating the online inventory if the player has used 1 of each during gameplay. This could be an unknown number higher than 4, depending on the player.

Is there a better method of lowering the stacks / consuming several items at once?

apisPlayer DatasdksPlayer Inventorylimits
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

·
Made Wang avatar image
Made Wang answered

PlayFab requires you to call ConsumeItem separately for different items when consuming items, which is by design. If you want to consume multiple types of items at the same time, you can post a feature request for it.

1 comment
10 |1200

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

taikasika avatar image taikasika commented ·

Alright, thanks.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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

Error rendering WebPanel (widgets/consolidation-widget.ftl): org.hibernate.hql.internal.ast.QuerySyntaxException: AvailableConsolidation is not mapped [from AvailableConsolidation up where up.node = :node]