Beispiel #1
0
 public Trade(TradeOffers tradeOffers, SteamID partnerId, SteamWeb steamWeb)
 {
     this.TradeOffers       = tradeOffers;
     this.partnerId         = partnerId;
     this.steamWeb          = steamWeb;
     tradeStatus            = new TradeStatus();
     tradeStatus.version    = 1;
     tradeStatus.newversion = true;
     tradeStatus.me         = new TradeStatusUser(ref tradeStatus);
     tradeStatus.them       = new TradeStatusUser(ref tradeStatus);
 }
 public override void OnTradeOfferReceived(TradeOffers.TradeOffer tradeOffer)
 {
     if (IsAdmin)
     {
         TradeOffers.AcceptTrade(tradeOffer.Id);
     }
     else
     {
         TradeOffers.DeclineTrade(tradeOffer.Id);
     }
 }
        public override void OnTradeOfferAccepted(TradeOffers.TradeOffer tradeOffer)
        {
            var tradeOfferId = tradeOffer.Id;
            var myItems = tradeOffer.ItemsToGive;
            var userItems = tradeOffer.ItemsToReceive;

            Log.Info("Trade offer #{0} accepted. Items to give: {1}, Items to receive: {2}", tradeOfferId, myItems.Length, userItems.Length);

            // myItems is now in user inventory
            // userItems is now in bot inventory
        }
 public abstract void OnTradeOfferReceived(TradeOffers.TradeOffer tradeOffer);
 public abstract void OnTradeOfferDeclined(TradeOffers.TradeOffer tradeOffer);
 public abstract void OnTradeOfferAccepted(TradeOffers.TradeOffer tradeOffer);
 public Trade(TradeOffers tradeOffers, SteamID partnerId, SteamWeb steamWeb)
 {
     this.TradeOffers = tradeOffers;
     this.partnerId = partnerId;
     this.steamWeb = steamWeb;
     tradeStatus = new TradeStatus();
     tradeStatus.version = 1;
     tradeStatus.newversion = true;
     tradeStatus.me = new TradeStatusUser(ref tradeStatus);
     tradeStatus.them = new TradeStatusUser(ref tradeStatus);
 }
 public override void OnTradeOfferDeclined(TradeOffers.TradeOffer tradeOffer)
 {
 }