public override void SendTCP(GSPacketIn pkg) { base.SendTCP(pkg); this.m_sentCount++; this.m_lastSent = pkg.Code; this.m_lastSentTime = DateTime.Now; this.m_actionInterval = TickHelper.GetTickCount() - this.m_lastSentTick; this.m_lastSentTick = TickHelper.GetTickCount(); /*if (this.m_log != null) * { * this.m_log.WriteLine(Marshal.ToHexDump(string.Format("player [{0}]:{1} sent:", this.Account, DateTime.Now), pkg.Buffer, 0, pkg.Length)); * }*/ }
public BotPlayer(string account, int interval, string ip, int port) : base(ip, port, false, new byte[0x2000], new byte[0x2000]) { this.Account = account; this.Password = "******"; this.m_isHost = false; this.m_timer = new System.Timers.Timer((double)interval); this.m_timer.Elapsed += new ElapsedEventHandler(this.m_timer_Elapsed); this.m_queue = new Queue <PlayerExecutable>(); this.m_state = ePlayerState.Init; this.m_lastSentTick = TickHelper.GetTickCount(); this.m_actionInterval = 0L; this.m_recvCount = 0; this.m_sentCount = 0; base.Strict = true; base.Encryted = true; //this.m_log = new StreamWriter(System.IO.File.Create(string.Format("./logs/{0}.log", account))); }