Пример #1
0
        public bool SendTradeOffer(List <FullRgItem> items, string partnerId, string tradeToken, out string offerId)
        {
            var offer = new TradeOffer.TradeOffer(this.OfferSession, new SteamID(ulong.Parse(partnerId)));

            foreach (var item in items)
            {
                offer.Items.AddMyItem(item.Asset.Appid, long.Parse(item.Asset.Contextid),
                                      long.Parse(item.Asset.Assetid), long.Parse(item.Asset.Amount));
            }

            return(offer.SendWithToken(out offerId, tradeToken));
        }
Пример #2
0
        public string SendTradeOffer(FullRgItem[] items, SteamID partnerId, string tradeToken)
        {
            var offer = new TradeOffer.TradeOffer(this.OfferSession, partnerId);

            foreach (var item in items)
            {
                offer.Items.AddMyItem(
                    item.Asset.Appid,
                    item.Asset.Contextid,
                    item.Asset.Assetid,
                    long.Parse(item.Asset.Amount));
            }

            return(offer.SendWithToken(tradeToken));
        }