Beispiel #1
0
 public override void Decode()
 {
     using (CoCSharpPacketReader br = new CoCSharpPacketReader(new MemoryStream(GetData())))
     {
         m_vAllianceName        = br.ReadString();
         m_vAllianceDescription = br.ReadString();
         m_vAllianceBadgeData   = br.ReadInt32WithEndian();
         m_vAllianceType        = br.ReadInt32WithEndian();
         m_vRequiredScore       = br.ReadInt32WithEndian();
         m_vWarFrequency        = br.ReadInt32WithEndian();
         m_vAllianceOrigin      = br.ReadInt32WithEndian();
         m_vWarLogPublic        = br.ReadByte();
     }
 }
Beispiel #2
0
 public JoinAllianceCommand(CoCSharpPacketReader br)
 {
     br.ReadInt64();
     br.ReadString();
     br.ReadInt32();
     br.ReadByte();
     br.ReadInt32();
     br.ReadInt32();
     br.ReadInt32();
 }
Beispiel #3
0
 public override void Decode()
 {
     using (CoCSharpPacketReader coCSharpPacketReader = new CoCSharpPacketReader(new MemoryStream(base.GetData())))
     {
         this.Unknown1     = coCSharpPacketReader.ReadInt32();
         this.Unknown2     = coCSharpPacketReader.ReadInt32();
         this.MajorVersion = coCSharpPacketReader.ReadInt32();
         this.Unknown4     = coCSharpPacketReader.ReadInt32();
         this.MinorVersion = coCSharpPacketReader.ReadInt32();
         this.Hash         = coCSharpPacketReader.ReadString();
         this.Unknown6     = coCSharpPacketReader.ReadInt32();
         this.Unknown7     = coCSharpPacketReader.ReadInt32();
     }
     if (this.MajorVersion == 2 && this.MinorVersion == 1507)
     {
         base.Client.CState = 1;
         return;
     }
     base.Client.CState = 0;
 }
Beispiel #4
0
 public override void Decode()
 {
     using (var reader = new CoCSharpPacketReader(new MemoryStream(GetData())))
     {
         Unknown1     = reader.ReadInt32();
         Unknown2     = reader.ReadInt32();
         MajorVersion = reader.ReadInt32();
         Unknown4     = reader.ReadInt32();
         MinorVersion = reader.ReadInt32();
         Hash         = reader.ReadString();
         Unknown6     = reader.ReadInt32();
         Unknown7     = reader.ReadInt32();
     }
     if (MajorVersion == 8)
     {
         Client.CState = 1; // Clash of Clans 8.x
     }
     else
     {
         Client.CState = 0; // Old Clash of Clans client
     }
 }
Beispiel #5
0
        public override void Decode()
        {
            using (var reader = new CoCSharpPacketReader(new MemoryStream(GetData())))
            {
                Unknown1     = reader.ReadInt32();
                Unknown2     = reader.ReadInt32();
                MajorVersion = reader.ReadInt32();
                Unknown4     = reader.ReadInt32();
                MinorVersion = reader.ReadInt32();
                Hash         = reader.ReadString();
                Unknown6     = reader.ReadInt32();
                Unknown7     = reader.ReadInt32();
            }

            if (MajorVersion == 2 && MinorVersion == 1507)
            {
                Client.CState = 1;
            }
            else
            {
                Client.CState = 0;
            }
        }
Beispiel #6
0
 public override void Decode()
 {
     if (Client.CState == 1)
     {
         try
         {
             using (var reader = new CoCSharpPacketReader(new MemoryStream(GetData())))
             {
                 UserID         = reader.ReadInt64();
                 UserToken      = reader.ReadString();
                 MajorVersion   = reader.ReadInt32();
                 ContentVersion = reader.ReadInt32();
                 MinorVersion   = reader.ReadInt32();
                 MasterHash     = reader.ReadString();
                 reader.ReadString();
                 OpenUDID                     = reader.ReadString();
                 MacAddress                   = reader.ReadString();
                 DeviceModel                  = reader.ReadString();
                 LocaleKey                    = reader.ReadInt32();
                 Region                       = reader.ReadString();
                 AdvertisingGUID              = reader.ReadString();
                 OSVersion                    = reader.ReadString();
                 Unknown2                     = reader.ReadByte();
                 Unknown3                     = reader.ReadString();
                 AndroidDeviceID              = reader.ReadString();
                 FacebookDistributionID       = reader.ReadString();
                 IsAdvertisingTrackingEnabled = reader.ReadBoolean();
                 VendorGUID                   = reader.ReadString();
                 Seed = reader.ReadInt32();
                 reader.ReadByte();
                 reader.ReadString();
                 reader.ReadString();
                 ClientVersion = reader.ReadString();
             }
         }
         catch (Exception e)
         {
             Client.CState = 0;
         }
     }
 }
Beispiel #7
0
        public override void Decode()
        {
            if (Client.CState == 1)
            {
                using (var reader = new CoCSharpPacketReader(new MemoryStream(GetData())))
                {
                    UserID = reader.ReadInt64();
                    Console.WriteLine("UserID -> " + UserID);
                    UserToken = reader.ReadString();

                    Unknown = reader.ReadInt32();
                    Console.WriteLine("Unknown -> " + Unknown);

                    MasterHash = reader.ReadString();
                    Console.WriteLine("MasterHash -> " + MasterHash);
                    Unknown1 = reader.ReadString();
                    Console.WriteLine("Unknown1 -> " + Unknown1);
                    OpenUDID = reader.ReadString();
                    Console.WriteLine("OpenUDID -> " + OpenUDID);
                    MacAddress = reader.ReadString();
                    Console.WriteLine("MacAddress -> " + MacAddress);
                    DeviceModel = reader.ReadString();
                    Console.WriteLine("DeviceModel -> " + DeviceModel);

                    AdvertisingGUID = reader.ReadString();
                    Console.WriteLine("AdvertisingGUID -> " + AdvertisingGUID);
                    OSVersion = reader.ReadString();
                    Console.WriteLine("OSVersion -> " + OSVersion);
                    Unknown2 = reader.ReadByte();
                    Console.WriteLine("Unknown2 -> " + Unknown2);
                    Unknown3 = reader.ReadString();
                    Console.WriteLine("Unknown3 -> " + Unknown3);
                    AndroidDeviceID = reader.ReadString();
                    Console.WriteLine("AndroidDeviceID -> " + AndroidDeviceID);
                    Language = reader.ReadString();
                    Console.WriteLine("Language -> " + Language);
                }
            }
        }
Beispiel #8
0
 public override void Decode()
 {
     if (base.Client.CState == 1)
     {
         using (CoCSharpPacketReader coCSharpPacketReader = new CoCSharpPacketReader(new MemoryStream(base.GetData())))
         {
             this.UserID          = coCSharpPacketReader.ReadInt64();
             this.UserToken       = coCSharpPacketReader.ReadString();
             this.Unknown         = coCSharpPacketReader.ReadInt32();
             this.MasterHash      = coCSharpPacketReader.ReadString();
             this.Unknown1        = coCSharpPacketReader.ReadString();
             this.OpenUDID        = coCSharpPacketReader.ReadString();
             this.MacAddress      = coCSharpPacketReader.ReadString();
             this.DeviceModel     = coCSharpPacketReader.ReadString();
             this.AdvertisingGUID = coCSharpPacketReader.ReadString();
             this.OSVersion       = coCSharpPacketReader.ReadString();
             this.Unknown2        = coCSharpPacketReader.ReadByte();
             this.Unknown3        = coCSharpPacketReader.ReadString();
             this.AndroidDeviceID = coCSharpPacketReader.ReadString();
             this.Language        = coCSharpPacketReader.ReadString();
         }
     }
 }