public override void Deserialize(IDataReader reader) { m_infos = ProtocolTypeManager.GetInstance <AllianceFactSheetInformations>(reader.ReadUShort()); m_infos.Deserialize(reader); int guildsCount = reader.ReadUShort(); int guildsIndex; m_guilds = new System.Collections.Generic.List <GuildInAllianceInformations>(); for (guildsIndex = 0; (guildsIndex < guildsCount); guildsIndex = (guildsIndex + 1)) { GuildInAllianceInformations objectToAdd = new GuildInAllianceInformations(); objectToAdd.Deserialize(reader); m_guilds.Add(objectToAdd); } int controlledSubareaIdsCount = reader.ReadUShort(); int controlledSubareaIdsIndex; m_controlledSubareaIds = new System.Collections.Generic.List <ushort>(); for (controlledSubareaIdsIndex = 0; (controlledSubareaIdsIndex < controlledSubareaIdsCount); controlledSubareaIdsIndex = (controlledSubareaIdsIndex + 1)) { m_controlledSubareaIds.Add(reader.ReadVarUhShort()); } m_leaderCharacterId = reader.ReadVarUhLong(); m_leaderCharacterName = reader.ReadUTF(); }
public override void Deserialize(ICustomDataInput reader) { var infosTypeId = reader.ReadShort(); Infos = new AllianceFactSheetInformations(); Infos.Deserialize(reader); var countGuilds = reader.ReadShort(); Guilds = new List <GuildInAllianceInformations>(); for (short i = 0; i < countGuilds; i++) { GuildInAllianceInformations type = new GuildInAllianceInformations(); type.Deserialize(reader); Guilds.Add(type); } var countControlledSubareaIds = reader.ReadShort(); ControlledSubareaIds = new List <short>(); for (short i = 0; i < countControlledSubareaIds; i++) { ControlledSubareaIds.Add(reader.ReadVarShort()); } LeaderCharacterId = reader.ReadVarLong(); LeaderCharacterName = reader.ReadUTF(); }
public override void Deserialize(IDataReader reader) { this.infos = ProtocolTypeManager.GetInstance <AllianceFactSheetInformations>((uint)reader.ReadUShort()); this.infos.Deserialize(reader); uint num1 = (uint)reader.ReadUShort(); for (int index = 0; (long)index < (long)num1; ++index) { GuildInAllianceInformations allianceInformations = new GuildInAllianceInformations(); allianceInformations.Deserialize(reader); this.guilds.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 controlledSubareaIds."); } this.controlledSubareaIds.Add(num3); } this.leaderCharacterId = (double)reader.ReadVarUhLong(); if (this.leaderCharacterId < 0.0 || this.leaderCharacterId > 9.00719925474099E+15) { throw new Exception("Forbidden value (" + (object)this.leaderCharacterId + ") on element of AllianceFactsMessage.leaderCharacterId."); } this.leaderCharacterName = reader.ReadUTF(); }
public override void Deserialize(IDataReader reader) { Infos = ProtocolTypeManager.GetInstance <AllianceFactSheetInformations>(reader.ReadUShort()); Infos.Deserialize(reader); var guildsCount = reader.ReadUShort(); Guilds = new List <GuildInAllianceInformations>(); for (var guildsIndex = 0; guildsIndex < guildsCount; guildsIndex++) { var objectToAdd = new GuildInAllianceInformations(); objectToAdd.Deserialize(reader); Guilds.Add(objectToAdd); } var controlledSubareaIdsCount = reader.ReadUShort(); ControlledSubareaIds = new List <ushort>(); for (var controlledSubareaIdsIndex = 0; controlledSubareaIdsIndex < controlledSubareaIdsCount; controlledSubareaIdsIndex++) { ControlledSubareaIds.Add(reader.ReadVarUhShort()); } LeaderCharacterId = reader.ReadVarUhLong(); LeaderCharacterName = reader.ReadUTF(); }
public void Deserialize(IDataReader reader) { Infos = new AllianceFactSheetInformations(); Infos.Deserialize(reader); Guilds = new GuildInAllianceInformations[reader.ReadShort()]; for (var i = 0; i < Guilds.Length; i++) { (Guilds[i] = new GuildInAllianceInformations()).Deserialize(reader); } ControlledSubareaIds = new UInt16[reader.ReadShort()]; for (var i = 0; i < ControlledSubareaIds.Length; i++) { ControlledSubareaIds[i] = (UInt16)reader.ReadVarShort(); } LeaderCharacterId = reader.ReadVarLong(); LeaderCharacterName = reader.ReadUTF(); }
public override void Serialize(IDataWriter writer) { writer.WriteUShort(((ushort)(m_infos.TypeID))); m_infos.Serialize(writer); writer.WriteShort(((short)(m_guilds.Count))); int guildsIndex; for (guildsIndex = 0; (guildsIndex < m_guilds.Count); guildsIndex = (guildsIndex + 1)) { GuildInAllianceInformations objectToSend = m_guilds[guildsIndex]; objectToSend.Serialize(writer); } writer.WriteShort(((short)(m_controlledSubareaIds.Count))); int controlledSubareaIdsIndex; for (controlledSubareaIdsIndex = 0; (controlledSubareaIdsIndex < m_controlledSubareaIds.Count); controlledSubareaIdsIndex = (controlledSubareaIdsIndex + 1)) { writer.WriteVarShort(m_controlledSubareaIds[controlledSubareaIdsIndex]); } writer.WriteVarLong(m_leaderCharacterId); writer.WriteUTF(m_leaderCharacterName); }
public override void Deserialize(IDataReader reader) { Infos = ProtocolTypeManager.GetInstance(reader.ReadUShort()); Infos.Deserialize(reader); var GuildsCount = reader.ReadShort(); Guilds = new List <GuildInAllianceInformations>(); for (var i = 0; i < GuildsCount; i++) { var objectToAdd = new GuildInAllianceInformations(); objectToAdd.Deserialize(reader); Guilds.Add(objectToAdd); } var ControlledSubareaIdsCount = reader.ReadShort(); ControlledSubareaIds = new List <short>(); for (var i = 0; i < ControlledSubareaIdsCount; i++) { ControlledSubareaIds.Add(reader.ReadVarShort()); } LeaderCharacterId = reader.ReadVarUhLong(); LeaderCharacterName = reader.ReadUTF(); }