Exemplo n.º 1
0
 public void SendCorePacket(WorldPacket packet)
 {
     try
     {
         uint[] @in = new uint[2];
         uint   num = (uint)(packet.Length % 8L);
         num = (num == 0) ? 0 : (8 - num);
         for (uint i = 0; i < num; i++)
         {
             packet.InputByte(0);
         }
         uint length = (uint)packet.Length;
         @in[0] = length;
         @in[1] = packet.Opcode;
         this._Crypt.encryptSend(ref @in);
         this._writer.Write(@in[0]);
         this._writer.Write(@in[1]);
         for (uint j = 0; j < packet.Length; j += 8)
         {
             @in[0] = BitConverter.ToUInt32(packet.ToArray(), (int)j);
             @in[1] = BitConverter.ToUInt32(packet.ToArray(), ((int)j) + 4);
             this._Crypt.encryptSend(ref @in);
             this._writer.Write(@in[0]);
             this._writer.Write(@in[1]);
         }
         this._writer.Flush();
     }
     catch (Exception)
     {
     }
 }
Exemplo n.º 2
0
 private void SendCorePacket(WorldPacket packet)
 {
     try
     {
         uint[] @in = new uint[2];
         uint num = (uint) (packet.Length % 8L);
         num = (num == 0) ? 0 : (8 - num);
         for (uint i = 0; i < num; i++)
         {
             packet.InputByte(0);
         }
         uint length = (uint) packet.Length;
         @in[0] = length;
         @in[1] = packet.Opcode;
         this._Crypt.encryptSend(ref @in);
         this._writer.Write(@in[0]);
         this._writer.Write(@in[1]);
         for (uint j = 0; j < packet.Length; j += 8)
         {
             @in[0] = BitConverter.ToUInt32(packet.ToArray(), (int) j);
             @in[1] = BitConverter.ToUInt32(packet.ToArray(), ((int) j) + 4);
             this._Crypt.encryptSend(ref @in);
             this._writer.Write(@in[0]);
             this._writer.Write(@in[1]);
         }
         this._writer.Flush();
     }
     catch (Exception)
     {
     }
 }