Example #1
0
        public override void OnTradeTimeout()
        {
            Log.Warn("Trade timeout.");
            Bot.GetOtherInventory(OtherSID);

            int ItemsLeft = 0;

            if (ManageCrates)
            {
                ItemsLeft = GetTradeItems(Bot.OtherInventory, TransferCrates).Count;
            }
            else
            {
                ItemsLeft = GetTradeItems(Bot.OtherInventory, 0).Count;
            }

            if (ItemsLeft > 0)
            {
                Log.Debug("Still has items to trade");
                //errorOcccured = true;
            }
            else
            {
                Log.Debug("No items in inventory, removing");
                if (TradeReadyBots.Contains(OtherSID))
                {
                    TradeReadyBots.Remove(OtherSID);
                }
            }
            if (OtherSID != MainSID && OtherSID != CrateSID)
            {
                CancelTrade();
                OnTradeClose();
            }
        }
Example #2
0
 public AdminUserHandler(Bot bot, SteamID sid)
     : base(bot, sid)
 {
     Bot.GetInventory();
     Bot.GetOtherInventory(OtherSID);
 }