Soomla.Store.UpgradeVG.Give C# (CSharp) Method

Give() public method

Assigns the current upgrade to the associated VirtualGood (mGood).
public Give ( int amount, bool notify ) : int
amount int NOT USED HERE!
notify bool notify of change in user's balance of current virtual item.
return int
		public override int Give(int amount, bool notify) {
			SoomlaUtils.LogDebug(TAG, "Assigning " + Name + " to: " + GoodItemId);
			
			VirtualGood good = null;
			try {
				good = (VirtualGood) StoreInfo.GetItemByItemId(GoodItemId);
			} catch (VirtualItemNotFoundException) {
				SoomlaUtils.LogError(TAG, "VirtualGood with itemId: " + GoodItemId +
				                     " doesn't exist! Can't upgrade.");
				return 0;
			}
			
			VirtualGoodsStorage.AssignCurrentUpgrade(good, this, notify);
			
			return base.Give(amount, notify);
		}