public List <string> GetCatalogGroupsByItem(CatalogItemModel item) { return(new List <string> { item.IsVirtualCurrency() ? CURRENCY_GROUP : ITEMS_GROUP }); }
private IEnumerator VirtualCurrencyPurchaseFinished(CatalogItemModel virtualItem) { var refreshDelay = virtualItem.IsVirtualCurrency() ? PLAYFAB_VIRTUAL_CURRENCY_ACCRUAL_TIMEOUT : 0.0F; yield return(new WaitForSeconds(refreshDelay)); UserInventory.Instance.Refresh(); }
private void PutItemToInventory(CatalogItemModel item) { if (item.IsVirtualCurrency()) { var vcItem = UserCatalog.Instance.Currencies.First(i => i.Sku.Equals(item.Sku)); IncreaseVirtualCurrencyBalance(vcItem.CurrencySku, vcItem.Amount); } else { var inventoryItem = GetInventoryItemBy(item); PutVirtualItemToInventory(inventoryItem); } }
public static ItemGroups GetBy(CatalogItemModel virtualItem) { if (virtualItem.IsVirtualCurrency()) { return(ItemGroups.Currency); } var result = ItemGroups.All; if (virtualItem.IsConsumable) { result |= ItemGroups.PowerUps; } else { result |= ItemGroups.Premium; } return(result); }