/// <summary> /// Constructor /// </summary> /// <param name="baseItem">Item base</param> public PurchasableVirtualItemDecorator(PurchasableVirtualItem baseItem) : base(baseItem) { PurchaseType purchaseInfo = baseItem.PurchaseType; if (purchaseInfo is PurchaseWithVirtualItem) { Price = (purchaseInfo as PurchaseWithVirtualItem).Amount; CoinID = (purchaseInfo as PurchaseWithVirtualItem).ItemId; } else { Price = (purchaseInfo as PurchaseWithMarket).MarketItem.Price; CoinID = MarketAssets.REAL_MONEY_ID; } }
/// <summary> /// Disparado al recibir un reembolso /// </summary> /// <param name="pvi">Item reembolsado</param> public void OnMarketRefund(PurchasableVirtualItem pvi) { }
/// <summary> /// Disparado al comenzar una compra en el mercado /// </summary> /// <param name="pvi">Item a comprar</param> public void OnMarketPurchaseStarted(PurchasableVirtualItem pvi) { }
/// <summary> /// Disparado al cancelar una compra /// </summary> /// <param name="pvi">Item cancelado</param> public void OnMarketPurchaseCancelled(PurchasableVirtualItem pvi) { }
/// <summary> /// Disparado al comenzar una compra de un item /// </summary> /// <param name="pvi">Item a comprar</param> public void OnItemPurchaseStarted(PurchasableVirtualItem pvi) { }