示例#1
0
        private IPacket GetLogonChallenge()
        {
            var          result = new AuthPacket(RMSG.AUTH_LOGON_CHALLENGE);
            BinaryWriter w      = result.CreateWriter();

            w.Write((byte)0);
            w.Write((byte)0);
            w.Write(bi_B.getBytes().Reverse());
            w.Write((byte)1);
            w.Write(bi_g.getBytes().Reverse());
            w.Write((byte)32);
            w.Write(bi_N.getBytes().Reverse());
            w.Write(bi_s.getBytes().Reverse());
            w.Write(new byte[16]);
            w.Write((byte)0);
            return(result);
        }
示例#2
0
        private IPacket GetRealmList()
        {
            var result = new AuthPacket(RMSG.REALM_LIST);

            BinaryWriter w = result.CreateWriter();

            w.Write(1);
            w.Write((ushort)_realmList.Count);
            foreach (WorldServerInfo info in _realmList)
            {
                w.Write((byte)info.Type);
                w.Write((byte)(info.Locked ? 1 : 0));
                w.Write((byte)info.Status);
                w.WriteCString(info.Name);
                w.WriteCString(info.Address);
                w.Write(info.Population);
                w.Write(info.CharactersCount);
                w.Write(info.Language);
                w.Write(info.Unk);
            }
            w.Write((ushort)2);
            return(result);
        }
示例#3
0
        private IPacket GetRealmList()
        {
            var result = new AuthPacket(RMSG.REALM_LIST);

            BinaryWriter w = result.CreateWriter();
            w.Write(1);
            w.Write((ushort)_realmList.Count);
            foreach(WorldServerInfo info in _realmList) {
                w.Write((byte)info.Type);
                w.Write((byte)(info.Locked ? 1 : 0));
                w.Write((byte)info.Status);
                w.WriteCString(info.Name);
                w.WriteCString(info.Address);
                w.Write(info.Population);
                w.Write(info.CharactersCount);
                w.Write(info.Language);
                w.Write(info.Unk);
            }
            w.Write((ushort)2);
            return result;
        }
示例#4
0
 private IPacket GetLogonChallenge()
 {
     var result = new AuthPacket(RMSG.AUTH_LOGON_CHALLENGE);
     BinaryWriter w = result.CreateWriter();
     w.Write((byte)0);
     w.Write((byte)0);
     w.Write(bi_B.getBytes().Reverse());
     w.Write((byte)1);
     w.Write(bi_g.getBytes().Reverse());
     w.Write((byte)32);
     w.Write(bi_N.getBytes().Reverse());
     w.Write(bi_s.getBytes().Reverse());
     w.Write(new byte[16]);
     w.Write((byte)0);
     return result;
 }
示例#5
0
 private static IPacket GetXferData(byte[] buff, int index, int count)
 {
     var result = new AuthPacket(RMSG.XFER_DATA);
     BinaryWriter w = result.CreateWriter();
     w.Write(buff, index, count);
     return result;
 }
示例#6
0
 private static IPacket GetLogonProof(byte[] M2)
 {
     var result = new AuthPacket(RMSG.AUTH_LOGON_PROOF);
     BinaryWriter w = result.CreateWriter();
     w.Write((byte)0);
     w.Write(M2);
     w.Write((ushort)0);
     w.Write((uint)0);
     w.Write((uint)0);
     return result;
 }