Quantity is always 0, although I know for sure that there are more items in the bundle. And if you don’t check for quantity, the cards will spawn, but if you do, then they won’t. So DataProvider works correctly because it returns list of bundles. But ItemReferences return 0 Amount
private List<GamePassWindowData.GamePassReward> SetCards(CatalogItem item)
{
var cards = DataProvider.GetItemsFromBundle(item.Id)
.SelectMany(bundleItem =>
{
int level = GetLevelFromItem(bundleItem);
int quantity = bundleItem.ItemReferences?.Sum(itemRef => itemRef.Amount) ?? 0;
return Enumerable.Repeat(new GamePassWindowData.GamePassReward
{
Level = level,
Amount = quantity
}, quantity);
})
.ToList();
return cards;
}