public override void Decode() { if (Client.CState == 1) { 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(); Unknown1 = reader.ReadString(); OpenUDID = reader.ReadString(); MacAddress = reader.ReadString(); DeviceModel = reader.ReadString(); LocaleKey = reader.ReadInt32(); Language = 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(); Unknown4 = reader.ReadByte(); Unknown5 = reader.ReadString(); Unknown6 = reader.ReadString(); ClientVersion = reader.ReadString(); } } }
public KickAllianceMemberCommand(CoCSharpPacketReader br) { m_vAvatarId = br.ReadInt64WithEndian(); br.ReadByte(); m_vMessage = br.ReadScString(); br.ReadInt32WithEndian(); }
public JoinAllianceCommand(CoCSharpPacketReader br) { br.ReadInt64(); br.ReadString(); br.ReadInt32(); br.ReadByte(); br.ReadInt32(); br.ReadInt32(); br.ReadInt32(); }
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(); Unknown1 = 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(); Unknown4 = reader.ReadByte(); Unknown5 = reader.ReadString(); Unknown6 = reader.ReadString(); ClientVersion = reader.ReadString(); } } catch (Exception e) { //Debugger.WriteLine("[UCS] Exception occured when reading packet", e); Client.CState = 0; } } }
public RequestAllianceUnitsCommand(CoCSharpPacketReader br) { Unknown1 = br.ReadUInt32WithEndian(); FlagHasRequestMessage = br.ReadByte(); if (FlagHasRequestMessage == 0x01) { Message = br.ReadScString(); } else { Message = "I need reinforcements !"; } }
public UpgradeMultipleBuildingsCommand(CoCSharpPacketReader br) { m_vIsAltResource = br.ReadByte(); m_vBuildingIdList = new List <int>(); var buildingCount = br.ReadInt32WithEndian(); for (var i = 0; i < buildingCount; i++) { var buildingId = br.ReadInt32WithEndian(); m_vBuildingIdList.Add(buildingId); } br.ReadInt32WithEndian(); }
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(); } }
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); } } }
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(); } } }
public ToggleHeroSleepCommand(CoCSharpPacketReader br) { BuildingId = br.ReadUInt32WithEndian(); //buildingId - 0x1DCD6500; FlagSleep = br.ReadByte(); Unknown1 = br.ReadUInt32WithEndian(); }
public UpgradeBuildingCommand(CoCSharpPacketReader br) { BuildingId = br.ReadInt32WithEndian(); Unknown2 = br.ReadByte(); Unknown1 = br.ReadUInt32WithEndian(); }