/// <summary> /// Gives a curtain amount of <c>VirtualCurrency</c> according to the given amount and the definition of this pack. /// </summary> /// <param name="amount">amount the amount of the specific item to be given.</param> /// <param name="notify">notify of change in user's balance of current virtual item.</param> public override int Give(int amount, bool notify) { VirtualCurrency currency = null; try { currency = (VirtualCurrency)StoreInfo.GetItemByItemId(CurrencyItemId); } catch (VirtualItemNotFoundException) { SoomlaUtils.LogError(TAG, "VirtualCurrency with itemId: " + CurrencyItemId + " doesn't exist! Can't give this pack."); return(0); } return(VirtualCurrencyStorage.Add( currency, CurrencyAmount * amount, notify)); }
/// <summary> /// Gives a curtain amount of this currency. /// </summary> /// <param name="amount">amount the amount of the specific item to be given.</param> /// <param name="notify">notify of change in user's balance of current virtual item.</param> public override int Give(int amount, bool notify) { return(VirtualCurrencyStorage.Add(this, amount, notify)); }