public void Deserialize(IDataReader reader) { Alliances = new AllianceInformations[reader.ReadShort()]; for (var i = 0; i < Alliances.Length; i++) { (Alliances[i] = new AllianceInformations()).Deserialize(reader); } AllianceNbMembers = new UInt16[reader.ReadShort()]; for (var i = 0; i < AllianceNbMembers.Length; i++) { AllianceNbMembers[i] = (UInt16)reader.ReadVarShort(); } AllianceRoundWeigth = new UInt32[reader.ReadShort()]; for (var i = 0; i < AllianceRoundWeigth.Length; i++) { AllianceRoundWeigth[i] = (UInt32)reader.ReadVarInt(); } AllianceMatchScore = new Byte[reader.ReadShort()]; for (var i = 0; i < AllianceMatchScore.Length; i++) { AllianceMatchScore[i] = reader.ReadByte(); } AllianceMapWinner = new BasicAllianceInformations(); AllianceMapWinner.Deserialize(reader); AllianceMapWinnerScore = (UInt32)reader.ReadVarInt(); AllianceMapMyAllianceScore = (UInt32)reader.ReadVarInt(); NextTickTime = reader.ReadDouble(); }
public override void Deserialize(ICustomDataInput reader) { var countAlliances = reader.ReadShort(); Alliances = new List <AllianceInformations>(); for (short i = 0; i < countAlliances; i++) { AllianceInformations type = new AllianceInformations(); type.Deserialize(reader); Alliances.Add(type); } var countAllianceNbMembers = reader.ReadShort(); AllianceNbMembers = new List <short>(); for (short i = 0; i < countAllianceNbMembers; i++) { AllianceNbMembers.Add(reader.ReadVarShort()); } var countAllianceRoundWeigth = reader.ReadShort(); AllianceRoundWeigth = new List <int>(); for (short i = 0; i < countAllianceRoundWeigth; i++) { AllianceRoundWeigth.Add(reader.ReadVarInt()); } var countAllianceMatchScore = reader.ReadShort(); AllianceMatchScore = new List <byte>(); for (short i = 0; i < countAllianceMatchScore; i++) { AllianceMatchScore.Add(reader.ReadByte()); } var countAllianceMapWinners = reader.ReadShort(); AllianceMapWinners = new List <BasicAllianceInformations>(); for (short i = 0; i < countAllianceMapWinners; i++) { BasicAllianceInformations type = new BasicAllianceInformations(); type.Deserialize(reader); AllianceMapWinners.Add(type); } AllianceMapWinnerScore = reader.ReadVarInt(); AllianceMapMyAllianceScore = reader.ReadVarInt(); NextTickTime = reader.ReadDouble(); }
public override void Deserialize(IDataReader reader) { var alliancesCount = reader.ReadUShort(); Alliances = new List <AllianceInformations>(); for (var alliancesIndex = 0; alliancesIndex < alliancesCount; alliancesIndex++) { var objectToAdd = new AllianceInformations(); objectToAdd.Deserialize(reader); Alliances.Add(objectToAdd); } var allianceNbMembersCount = reader.ReadUShort(); AllianceNbMembers = new List <ushort>(); for (var allianceNbMembersIndex = 0; allianceNbMembersIndex < allianceNbMembersCount; allianceNbMembersIndex++) { AllianceNbMembers.Add(reader.ReadVarUhShort()); } var allianceRoundWeigthCount = reader.ReadUShort(); AllianceRoundWeigth = new List <uint>(); for (var allianceRoundWeigthIndex = 0; allianceRoundWeigthIndex < allianceRoundWeigthCount; allianceRoundWeigthIndex++) { AllianceRoundWeigth.Add(reader.ReadVarUhInt()); } var allianceMatchScoreCount = reader.ReadUShort(); AllianceMatchScore = new List <byte>(); for (var allianceMatchScoreIndex = 0; allianceMatchScoreIndex < allianceMatchScoreCount; allianceMatchScoreIndex++) { AllianceMatchScore.Add(reader.ReadByte()); } var allianceMapWinnersCount = reader.ReadUShort(); AllianceMapWinners = new List <BasicAllianceInformations>(); for (var allianceMapWinnersIndex = 0; allianceMapWinnersIndex < allianceMapWinnersCount; allianceMapWinnersIndex++) { var objectToAdd = new BasicAllianceInformations(); objectToAdd.Deserialize(reader); AllianceMapWinners.Add(objectToAdd); } AllianceMapWinnerScore = reader.ReadVarUhInt(); AllianceMapMyAllianceScore = reader.ReadVarUhInt(); NextTickTime = reader.ReadDouble(); }
public override void Deserialize(ICustomDataInput reader) { int alliancesCount = reader.ReadUShort(); int alliancesIndex; m_alliances = new System.Collections.Generic.List <AllianceInformations>(); for (alliancesIndex = 0; (alliancesIndex < alliancesCount); alliancesIndex = (alliancesIndex + 1)) { AllianceInformations objectToAdd = new AllianceInformations(); objectToAdd.Deserialize(reader); m_alliances.Add(objectToAdd); } int allianceNbMembersCount = reader.ReadUShort(); int allianceNbMembersIndex; m_allianceNbMembers = new System.Collections.Generic.List <ushort>(); for (allianceNbMembersIndex = 0; (allianceNbMembersIndex < allianceNbMembersCount); allianceNbMembersIndex = (allianceNbMembersIndex + 1)) { m_allianceNbMembers.Add(reader.ReadVarUhShort()); } int allianceRoundWeigthCount = reader.ReadUShort(); int allianceRoundWeigthIndex; m_allianceRoundWeigth = new System.Collections.Generic.List <uint>(); for (allianceRoundWeigthIndex = 0; (allianceRoundWeigthIndex < allianceRoundWeigthCount); allianceRoundWeigthIndex = (allianceRoundWeigthIndex + 1)) { m_allianceRoundWeigth.Add(reader.ReadVarUhInt()); } int allianceMatchScoreCount = reader.ReadUShort(); int allianceMatchScoreIndex; m_allianceMatchScore = new System.Collections.Generic.List <byte>(); for (allianceMatchScoreIndex = 0; (allianceMatchScoreIndex < allianceMatchScoreCount); allianceMatchScoreIndex = (allianceMatchScoreIndex + 1)) { m_allianceMatchScore.Add(reader.ReadByte()); } m_allianceMapWinner = new BasicAllianceInformations(); m_allianceMapWinner.Deserialize(reader); m_allianceMapWinnerScore = reader.ReadVarUhInt(); m_allianceMapMyAllianceScore = reader.ReadVarUhInt(); m_nextTickTime = reader.ReadDouble(); }
public override void Deserialize(IDataReader reader) { base.Deserialize(reader); AllianceInfos = new BasicAllianceInformations(); AllianceInfos.Deserialize(reader); }
public override void Deserialize(ICustomDataInput reader) { base.Deserialize(reader); m_allianceInfos = new BasicAllianceInformations(); m_allianceInfos.Deserialize(reader); }
public override void Deserialize(IDataReader reader) { uint num1 = (uint)reader.ReadUShort(); for (int index = 0; (long)index < (long)num1; ++index) { AllianceInformations allianceInformations = new AllianceInformations(); allianceInformations.Deserialize(reader); this.alliances.Add(allianceInformations); } uint num2 = (uint)reader.ReadUShort(); for (int index = 0; (long)index < (long)num2; ++index) { uint num3 = (uint)reader.ReadVarUhShort(); if (num3 < 0U) { throw new Exception("Forbidden value (" + (object)num3 + ") on elements of allianceNbMembers."); } this.allianceNbMembers.Add(num3); } uint num4 = (uint)reader.ReadUShort(); for (int index = 0; (long)index < (long)num4; ++index) { uint num3 = reader.ReadVarUhInt(); if (num3 < 0U) { throw new Exception("Forbidden value (" + (object)num3 + ") on elements of allianceRoundWeigth."); } this.allianceRoundWeigth.Add(num3); } uint num5 = (uint)reader.ReadUShort(); for (int index = 0; (long)index < (long)num5; ++index) { uint num3 = (uint)reader.ReadByte(); if (num3 < 0U) { throw new Exception("Forbidden value (" + (object)num3 + ") on elements of allianceMatchScore."); } this.allianceMatchScore.Add(num3); } uint num6 = (uint)reader.ReadUShort(); for (int index = 0; (long)index < (long)num6; ++index) { BasicAllianceInformations allianceInformations = new BasicAllianceInformations(); allianceInformations.Deserialize(reader); this.allianceMapWinners.Add(allianceInformations); } this.allianceMapWinnerScore = reader.ReadVarUhInt(); if (this.allianceMapWinnerScore < 0U) { throw new Exception("Forbidden value (" + (object)this.allianceMapWinnerScore + ") on element of KohUpdateMessage.allianceMapWinnerScore."); } this.allianceMapMyAllianceScore = reader.ReadVarUhInt(); if (this.allianceMapMyAllianceScore < 0U) { throw new Exception("Forbidden value (" + (object)this.allianceMapMyAllianceScore + ") on element of KohUpdateMessage.allianceMapMyAllianceScore."); } this.nextTickTime = reader.ReadDouble(); if (this.nextTickTime < 0.0 || this.nextTickTime > 9.00719925474099E+15) { throw new Exception("Forbidden value (" + (object)this.nextTickTime + ") on element of KohUpdateMessage.nextTickTime."); } }