question

John Peterson avatar image
John Peterson asked

Any way to get the actual definition of Bundle contents?

Dear PlayFab community,

I'm wondering if there's any way to get the definition of a Bundle's contents as described in the Dashboard. Essentially the ItemId and Amount. From what I can tell with the Server API, the Items are "expanded" in the ItemList, and there is no way to obtain the item count without doing some post-processing.

Thanks in advance!

apisCloudScript
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

It depends upon what you mean. Any call to GetCatalogItems will get you the complete list of all items in the catalog, and the bundles will be returned with info on the items, drop tables, and virtual currencies the contain. However, since drop tables are randomly determined, it's not possible to know what they'll be until the bundle is actually added to the player inventory.

2 comments
10 |1200

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

John Peterson avatar image John Peterson commented ·

Thanks, Brendan! I probably wasn't clear, but I was hoping for information that would give me the Bundle Item ID and the amount (just like it's represented in the Dashboard), rather than the amount of Item IDs in a list. So, like a { [ItemId: string]: number } dictionary, so to speak. Rather than a ItemIds[] that just repeated the same ItemId amount times.

But, I'm guessing that structure isn't readily available in the API.

0 Likes 0 ·
brendan avatar image brendan John Peterson commented ·

Correct, it's stored as a list of items. So, if an Item ID is in the bundle twice, it will be in the list twice.

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.