question

Juan Manuel Martinez avatar image
Juan Manuel Martinez asked

GrantItemsToUsers result unitprice

Hi there,

So the question is, what do I have to do in order to know what it is the UnitPrice returned by any GrantItemsToXXX. I thought it was the price define inside the item, but it always return 0, even if the item has a price of 300.

I've been looking around and i found the data model retrieved as a result of the above API call.

UnitCurrency String Currency type for the cost of the catalog item.
UnitPrice uint32 Cost of the catalog item in the given currency.

Well, didn't know about UnitCurrency, but like I said, it is a Result Data model, not a request. I would like to know how UnitPrice works.

Any help?

Thanks,

Juan

In-Game Economy
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

·
brendan avatar image
brendan answered

The GrantItemsToUser(s) calls don't return a UnityPrice, as they're not being purchased - they're being granted to the user outside a purchase call. The issue is that GrantedItemInstance derives from ItemInstance, which includes the UnitPrice. I'll open a bug to get that clarified in the docs.

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.