/// <summary>
        /// Initializes a new instance of the <see cref="PacketClanMemberListReadResult" /> class.
        /// </summary>
        /// <param name="packet">The packet.</param>
        public PacketClanMemberListReadResult(L2RPacket packet)
        {
            using (StreamWriter fileStream = new StreamWriter(@"Output\GuildMemberList.csv", true))
            {
                // Parses the header of the PktGuildMemberListReadresult
                // First two bytes are not used.
                packet.Skip(2);

                ClanID      = packet.ReadUInt64();
                MemberCount = packet.ReadUInt16();

                // Parses the PktGuildMemberListReadresult
                while (packet.Remaining > 0)
                {
                    PacketClanMemberItem item = new PacketClanMemberItem
                    {
                        PlayerID          = packet.ReadUInt64(),
                        PlayerName        = packet.ReadString(),
                        ClanRole          = CSV.guildMemberGrade.guildMemberGradeName(packet.ReadByte()),
                        Race              = CSV.race.RaceName(packet.ReadInt32()),
                        PlayerClass       = CSV.Class.className(packet.ReadUInt16()),
                        UnkA              = packet.ReadByte(),
                        UnkB              = packet.ReadByte(),
                        Level             = packet.ReadUInt16(),
                        Offline           = Misc.Misc.CalcTime(packet.ReadUInt64()),
                        Contribution      = packet.ReadUInt32(),
                        TotalContribution = packet.ReadUInt32(),
                        IGreet            = packet.ReadByte(),
                        TheyGreet         = packet.ReadByte(),
                        Checkin           = packet.ReadByte(),
                        PlayerCP          = packet.ReadUInt32(),
                        Unk1              = packet.ReadUInt32(),
                        RewardCount       = packet.ReadByte(),
                        WorldID           = CSV.world.worldName(packet.ReadUInt16()),
                        introLength       = packet.ReadUInt16(),
                        Introduction      = packet.ReadString()
                    };
                    packet.Skip(1);

                    Members.Add(item);

                    fileStream.WriteLineAsync(item.PlayerID + "," + item.PlayerName + "," + item.Level + "," + item.PlayerCP + "," +
                                              item.ClanRole + "," + item.PlayerClass + "," + item.Offline + "," + item.Contribution + "," + item.TotalContribution + ", " +
                                              item.Checkin + "," + item.RewardCount + "," + item.WorldID + "," + item.Introduction);
                }
                fileStream.WriteLineAsync("\n\n");
            };
        }
Example #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="PacketPlayerKillNotify" /> class.
        /// </summary>
        /// <param name="packet">The packet.</param>
        public PacketPlayerKillNotify(L2RPacket packet)
        {
            using (StreamWriter fileStreamer = new StreamWriter(@"Output\GuildPvp.Txt", true))
            {
                ClanName    = packet.ReadString();
                PlayerName  = packet.ReadString();
                Clan2Name   = packet.ReadString();
                Player2Name = packet.ReadString();
                var region = GetRegionByCode(packet.ReadInt32());
                Region  = region.Key;
                Channel = region.Value;
                var Unknown = packet.ReadByte();

                // Unknown Int32, Unknown byte
                fileStreamer.WriteLineAsync(PlayerName + "(" + ClanName + ") Killed " + Player2Name + "(" + Clan2Name + ").");
            }
        }