question

andrespl avatar image
andrespl asked

Display number of stacks

I'd like to show the item number of stacks that the user has. I tried via GetUserInventoryRequest but it seems that the result List<ItemInstance> doesn't have the stacks of X item. Hope you can help me, thanks!

Player Inventory
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

·
Seth Du avatar image
Seth Du answered

For the stackable items, there is a property in the Inventory of GetUserInventoryResult named RemainingUses.

This property illustrates the stacking number of this item. As you can see from the property name, stackable items are usually designed for consumption.

Please be aware that no matter the item is durable or consumable, RemainingUses can always retrieve the number of stacks.

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.

andrespl avatar image andrespl commented ·

Thanks, it worked using that property :)

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.