Example #1
0
 public override void OnRecvPacket(GSPacketIn pkg)
 {
     if (this.m_packetProcessor == null)
     {
         this.m_packetLib       = AbstractPacketLib.CreatePacketLibForVersion(1, this);
         this.m_packetProcessor = new PacketProcessor(this);
     }
     if (this.m_player != null)
     {
         pkg.ClientID = this.m_player.PlayerId;
         pkg.WriteHeader();
     }
     this.m_packetProcessor.HandlePacket(pkg);
 }
Example #2
0
 /// <summary>
 /// 收到协议包
 /// </summary>
 /// <param name="pkg"></param>
 public override void OnRecvPacket(GSPacketIn pkg)
 {
     if (m_packetProcessor == null)
     {
         m_packetLib       = AbstractPacketLib.CreatePacketLibForVersion(1, this);
         m_packetProcessor = new PacketProcessor(this);
     }
     if (m_player != null)
     {
         pkg.ClientID = m_player.PlayerId;
         pkg.WriteHeader();
     }
     //LogMsg(Marshal.ToHexDump("recevie:", pkg.Buffer, 0, pkg.Length));
     m_packetProcessor.HandlePacket(pkg);
 }