Example #1
0
        public bool AcceptOffer(Offer offer)
        {
            OfferAccepted?.Invoke(this, offer);

            var tradeOffer = new TradeOffer.TradeOffer(session, offer);
            var accepted   = tradeOffer.Accept();

            return(accepted.Accepted);
        }
Example #2
0
        private TradeOffer.TradeOffer FormTradeOffer(List <GenericInventory.Item> outItems, List <GenericInventory.Item> theirItems, int accountIdOther = 0)
        {
            var itemsToGive    = ConvertToCecon(outItems);
            var itemsToReceive = ConvertToCecon(theirItems);

            var offer = new Offer();

            if (accountIdOther != 0)
            {
                offer.AccountIdOther = accountIdOther;
            }
            offer.ItemsToGive    = itemsToGive;
            offer.ItemsToReceive = itemsToReceive;

            var tradeOffer = new TradeOffer.TradeOffer(session, offer);

            return(tradeOffer);
        }
Example #3
0
        public TradeOffer NewOffer(SteamID other)
        {
            var offer = new TradeOffer(session, other);

            return(offer);
        }
Example #4
0
        public bool DeclineOffer(Offer offer)
        {
            var tradeOffer = new TradeOffer.TradeOffer(session, offer);

            return(tradeOffer.Decline());
        }
Example #5
0
 public bool CandelOffer(Offer offer)
 {
     TradeOffer.TradeOffer tradeOffer = new TradeOffer.TradeOffer(session, offer);
     return(tradeOffer.Cancel());
 }