Exemplo n.º 1
0
        /// <summary>
        /// Reads the <see cref="AllianceDataResponseMessage"/> from the specified <see cref="MessageReader"/>.
        /// </summary>
        /// <param name="reader">
        /// <see cref="MessageReader"/> that will be used to read the <see cref="AllianceDataResponseMessage"/>.
        /// </param>
        /// <exception cref="ArgumentNullException"><paramref name="reader"/> is null.</exception>
        public override void ReadMessage(MessageReader reader)
        {
            ThrowIfReaderNull(reader);

            Clan = new ClanCompleteMessageComponent();
            Clan.ReadMessageComponent(reader);

            Description = reader.ReadString();

            Unknown1 = reader.ReadInt32();

            if (reader.ReadBoolean())
            {
                WarId = reader.ReadInt64();
            }

            Unknown2 = reader.ReadInt32();
            Unknown3 = reader.ReadByte();

            var count = reader.ReadInt32();

            Members = new ClanMemberMessageComponent[count];
            for (int i = 0; i < count; i++)
            {
                var member = new ClanMemberMessageComponent();
                member.ReadMessageComponent(reader);
                Members[i] = member;
            }

            Unknown4 = reader.ReadInt32();
            Unknown5 = reader.ReadInt32();
        }
Exemplo n.º 2
0
        /// <summary>
        /// Reads the <see cref="JoinableAllianceListResponseMessage"/> from the specified <see cref="MessageReader"/>.
        /// </summary>
        /// <param name="reader">
        /// <see cref="MessageReader"/> that will be used to read the <see cref="JoinableAllianceListResponseMessage"/>.
        /// </param>
        public override void ReadMessage(MessageReader reader)
        {
            var count = reader.ReadInt32();

            Clans = new ClanCompleteMessageComponent[count];
            for (int i = 0; i < Clans.Length; i++)
            {
                var clan = new ClanCompleteMessageComponent();
                clan.ReadMessageComponent(reader);
                Clans[i] = clan;
            }
        }
        /// <summary>
        /// Reads the <see cref="AllianceFullEntryMessage"/> from the specified <see cref="MessageReader"/>.
        /// </summary>
        /// <param name="reader">
        /// <see cref="MessageReader"/> that will be used to read the <see cref="AllianceFullEntryMessage"/>.
        /// </param>
        /// <exception cref="ArgumentNullException"><paramref name="reader"/> is null.</exception>
        public override void ReadMessage(MessageReader reader)
        {
            ThrowIfReaderNull(reader);

            Description = reader.ReadString();
            Unknown1    = reader.ReadInt32();
            Unknown2    = reader.ReadInt32();

            if (reader.ReadBoolean())
            {
                WarId = reader.ReadInt64();
            }

            Clan = new ClanCompleteMessageComponent();
            Clan.ReadMessageComponent(reader);
        }
Exemplo n.º 4
0
        /// <summary>
        /// Reads the <see cref="AllianceSearchResponseMessage"/> from the specified <see cref="MessageReader"/>.
        /// </summary>
        /// <param name="reader">
        /// <see cref="MessageReader"/> that will be used to read the <see cref="AllianceSearchResponseMessage"/>.
        /// </param>
        /// <exception cref="ArgumentNullException"><paramref name="reader"/> is null.</exception>
        public override void ReadMessage(MessageReader reader)
        {
            ThrowIfReaderNull(reader);

            TextSearch = reader.ReadString();

            var count = reader.ReadInt32();

            Clans = new ClanCompleteMessageComponent[count];
            for (int i = 0; i < Clans.Length; i++)
            {
                var clan = new ClanCompleteMessageComponent();
                clan.ReadMessageComponent(reader);
                Clans[i] = clan;
            }
        }