question

Plauto de Abreu Neto avatar image
Plauto de Abreu Neto asked

PurchaseItem UnitPrice for Stackable Items

So I wanted to understand what is being returned in the UnitPrice when I call the PurchaseItem method for a Stackable Item.

Looks like if I edit the cost of the item, and after that Purchase another one of that Item, the value I'm getting in the UnitPrice is the one from when the first item in the Stack was purchased at, and not the current price paid for the item. Is that by design?

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

·
Rick Chen avatar image
Rick Chen answered

The purchase of the stackable item works like this:

When a player purchases the very first item, the system creates a stack base for the instance and it keeps information such as UnitPrice in this stack base.

When the player purchases this item again, the system adds up the remaining uses for the stack base without updating other information. And purchasing item always gets the stack base information.

That is why the UnitPrice displays the original price when the player purchases again with a new price.

I will consult the corresponding team to find out whether it is a bug or by design.

10 |1200

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

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.