Beispiel #1
0
        /// <summary>
        /// Split stack into two items
        /// </summary>
        public Result SplitStack(Item item, int quantity = 1)
        {
            SteamNative.SteamInventoryResult_t resultHandle = -1;
            if (!inventory.TransferItemQuantity(ref resultHandle, item.Id, (uint)quantity, ulong.MaxValue))
            {
                return(null);
            }

            return(new Result(this, resultHandle, true));
        }
Beispiel #2
0
        /// <summary>
        /// Stack source item onto dest item
        /// </summary>
        public Result Stack(Item source, Item dest, int quantity = 1)
        {
            SteamNative.SteamInventoryResult_t resultHandle = -1;
            if (!inventory.TransferItemQuantity(ref resultHandle, source.Id, (uint)quantity, dest.Id))
            {
                return(null);
            }

            return(new Result(this, resultHandle, true));
        }