/// <summary>
        /// Initializes a new instance of the <see cref="PacketGuildAgitQuestListresult" /> class.
        /// </summary>
        /// <param name="packet">The packet.</param>
        public PacketGuildAgitQuestListresult(IL2RPacket packet)
        {
            using (StreamWriter stm = new StreamWriter(@"Output\QuestList.csv", true))
            {
                stm.WriteLineAsync("QuestId,State,PlayerId,Player,Rank,CompletedAt");

                packet.Skip(2);

                byte[] unkHeader = packet.ReadBytes(4);
                uint   numQuests = packet.ReadUInt16();

                for (int i = 0; i < numQuests; i++)
                {
                    uint questId = packet.ReadUInt32();

                    byte[] unk = packet.ReadBytes(4);

                    string   state         = Enum.QuestState.Enum(packet.ReadByte());
                    ulong    playerId      = packet.ReadUInt64();
                    string   player        = packet.ReadString();
                    string   rank          = CSV.guildMemberGrade.guildMemberGradeName(packet.ReadByte());
                    DateTime completedTime = DateTime.Now;//packet.ReadDate();

                    stm.WriteLineAsync(questId + "," + state + "," + playerId + "," + player + "," + rank + "," + completedTime);
                }
            }
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="PacketBagListReadResult"/> class.
        /// </summary>
        /// <param name="packet">The packet.</param>
        public PacketBagListReadResult(IL2RPacket packet)
        {
            packet.Skip(2);

            ushort BagCount = packet.ReadUInt16();

            for (int i = 0; i < BagCount; i++)
            {
                BagInfoList.Add(new PacketBagInfo(packet));
            }
        }
Esempio n. 3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="PacketChatGuildWriteResult"/> class.
        /// </summary>
        /// <param name="packet">The packet.</param>
        public PacketChatGuildWriteResult(IL2RPacket packet)
        {
            packet.Skip(2);

            LastChatID  = packet.ReadUInt64();
            numMessages = packet.ReadUInt16();

            for (int i = 0; i < numMessages; i++)
            {
                ChatList.Add(new PacketChat(packet));
            }
        }
Esempio n. 4
0
        /// <summary>
        /// Initializes a new instance of the <see cref="PacketChatGuildunknown"/> class.
        /// </summary>
        /// <param name="packet">The packet.</param>
        public PacketChatGuildunknown(IL2RPacket packet)
        {
            packet.Skip(2);

            IsPrevMessage = packet.ReadByte();
            LastChatID    = packet.ReadUInt64();
            numMessages   = packet.ReadUInt16();

            for (int i = 0; i < numMessages; i++)
            {
                var msg = new PacketChatGuildunknown(packet);
                ChatGuildListReadResultSet.Add(msg);
            }
        }
Esempio n. 5
0
        /// <summary>
        /// Processes the specified packet identifier.
        /// </summary>
        /// <param name="RawPacket">The raw packet.</param>
        /// <returns></returns>
        public PacketItem(IL2RPacket packet)
        {
            UItemID           = packet.ReadUInt64();
            ItemID            = Enum.Item.Enum(packet.ReadUInt32());
            Exp               = packet.ReadUInt32();
            Level             = packet.ReadByte();
            EnchantLevel      = packet.ReadByte();
            LimitBreakCount   = packet.ReadByte();
            LimitBreakAddRate = packet.ReadByte();
            Count             = packet.ReadUInt16();
            Liked             = packet.ReadByte();
            //LootedTime = packet.ReadDate();
            BasicOptionLength = packet.ReadUInt16();
            Bind                  = packet.ReadByte();
            AbilityLevel          = packet.ReadByte();
            AbilityUpgradeAddRate = packet.ReadUInt16();
            CraftFlag             = packet.ReadByte();
            EventPeriodID         = packet.ReadUInt32();
            ExpireTime            = packet.ReadUInt64();
            SocketListLength      = packet.ReadUInt16();

            for (int k = 0; BasicOptionLength > k; k++)
            {
                ItemOptions.Add(new PacketItemOption(packet));
            }

            for (int k = 0; SocketListLength > k; k++)
            {
                SocketID   = packet.ReadUInt64();
                SocketName = Enum.Item.Enum(packet.ReadUInt32());
                packet.Skip(4);
                SocketList[k]    = "\"" + SocketName + "\"";
                SoulCrystalCount = packet.ReadUInt16();
                packet.Skip(1);
            }
        }
Esempio n. 6
0
        /// <summary>
        /// Initializes a new instance of the <see cref="PacketGuildRecommendationListReadresult"/> class.
        /// </summary>
        /// <param name="packet">The packet.</param>
        public PacketGuildRecommendationListReadresult(IL2RPacket packet)
        {
            using (StreamWriter fileStream = new StreamWriter(@"Output\GuildRankings.csv", true))
            {
                packet.Skip(2);

                NumberofGuilds = packet.ReadUInt16();

                fileStream.WriteLineAsync("Ranking,Name,Leader,Level,Exp,Reputation,Members,ClanCP,Wins,Draws,Losses,LevelReq,Closed,Intro");

                for (int j = 0; j < NumberofGuilds; j++)
                {
                    ClanID     = packet.ReadUInt64();
                    Name       = packet.ReadString();
                    Unk1       = packet.ReadUInt32();
                    Unk2       = packet.ReadUInt32();
                    Intro      = packet.ReadString();
                    Level      = packet.ReadUInt16();
                    Exp        = packet.ReadUInt32();
                    Reputation = packet.ReadUInt32();
                    Ranking    = packet.ReadUInt32();
                    Unk3       = packet.ReadUInt32();
                    Members    = packet.ReadUInt16();
                    Leader     = packet.ReadString();
                    Unk4       = packet.ReadUInt32();
                    Unk5       = packet.ReadUInt32();
                    Closed     = packet.ReadByte();
                    LevelReq   = packet.ReadUInt16();
                    Wins       = packet.ReadUInt16();
                    Draws      = packet.ReadUInt16();
                    Losses     = packet.ReadUInt16();
                    ClanCP     = packet.ReadUInt32();
                    Unk7       = packet.ReadUInt32();
                    Unk8       = packet.ReadUInt32();
                    Unk9       = packet.ReadUInt32();
                    Spacer     = packet.ReadByte();

                    fileStream.WriteLineAsync(Ranking + "," + Name + "," + Leader + "," + Level + "," +
                                              Exp + "," + Reputation + "," + Members + "," + ClanCP + "," + Wins + "," +
                                              Draws + "," + Losses + "," + LevelReq + "," + Closed + ",\"" + Intro + "\"");
                }
            }
        }
Esempio n. 7
0
        /// <summary>
        /// Initializes a new instance of the <see cref="PacketGuildSearchResult"/> class.
        /// </summary>
        /// <param name="packet">The packet.</param>
        public PacketGuildSearchResult(IL2RPacket packet)
        {
            using (StreamWriter fileStream = new StreamWriter(@"Output\GuildSearch.csv", true))
            {
                packet.Skip(2);

                ushort NumberofGuilds = packet.ReadUInt16();

                if (fileStream.BaseStream.Length < 1)
                {
                    fileStream.WriteLineAsync("Ranking,Name,Leader,Level,Exp,Reputation,Members,ClanCP,LevelReq,Closed,Intro");
                }

                for (int j = 0; j < NumberofGuilds; j++)
                {
                    ClanID     = packet.ReadUInt64();
                    Name       = packet.ReadString();
                    Unk1       = packet.ReadUInt32();
                    Unk2       = packet.ReadUInt32();
                    Intro      = packet.ReadString();
                    Level      = packet.ReadUInt16();
                    Exp        = packet.ReadUInt32();
                    Reputation = packet.ReadUInt32();
                    Ranking    = packet.ReadUInt32();
                    Unk3       = packet.ReadUInt32();
                    Members    = packet.ReadUInt16();
                    Leader     = packet.ReadString();
                    Unk4       = packet.ReadUInt32();
                    Unk5       = packet.ReadUInt32();
                    Closed     = packet.ReadByte();
                    Unk7       = packet.ReadUInt16();
                    LevelReq   = packet.ReadUInt32();
                    ClanCP     = packet.ReadUInt32();
                    Unk8       = packet.ReadUInt32();
                    Unk9       = packet.ReadUInt16();
                    Unk0       = packet.ReadUInt64();
                    Spacer     = packet.ReadByte();

                    fileStream.WriteLineAsync(Ranking + "," + Name + "," + Leader + "," + Level + "," +
                                              Exp + "," + Reputation + "," + Members + "," + ClanCP + "," + "," + LevelReq + "," + Closed + ",\"" + Intro + "\"");
                }
            }
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="PacketChatWorldWriteResult" /> class.
        /// </summary>
        /// <param name="packet">The packet.</param>
        public PacketChatWorldWriteResult(IL2RPacket packet)
        {
            packet.Skip(2);

            ChatList.Add(new PacketChat(packet));
        }
        public PacketItemLootNotify(IL2RPacket packet)
        {
            string itemlist = "";

            packet.Skip(2);
            ushort ComplexCounter = packet.ReadUInt16();

            for (int j = 0; j < ComplexCounter; j++)
            {
                ulong  UItemID = packet.ReadUInt64();
                string ItemID  = Enum.Item.Enum(packet.ReadUInt32());
                packet.Skip(4);//Junk
                uint Count   = packet.ReadUInt32();
                byte Unknown = packet.ReadByte();
                packet.Skip(2);                          //Junk?
                DateTime LootTime = DateTime.Now;        //packet.ReadDate();
                packet.Skip(2);                          //Junk?
                ushort UnkCounter = packet.ReadUInt16(); // All data seems blank
                for (int i = 0; i < UnkCounter; i++)
                {
                    packet.Skip(19);
                }
                byte UnkBool1 = packet.ReadByte();//One of these must be bind
                byte UnkBool2 = packet.ReadByte();
                packet.Skip(7);

                itemlist += ",\"" + ItemID + "\"," + Count;
            }
            ushort SimpleCounter = packet.ReadUInt16();

            for (int j = 0; j < SimpleCounter; j++)
            {
                ulong    UItemID       = packet.ReadUInt64();
                string   ItemID        = Enum.Item.Enum(packet.ReadUInt32());
                ushort   Count         = packet.ReadUInt16();
                DateTime LootTime      = DateTime.Now;      // packet.ReadDate();
                byte     Bind          = packet.ReadByte(); //One of these must be bind
                uint     EventPeriodID = packet.ReadUInt32();

                itemlist += ",\"" + ItemID + "\"," + Count;
            }
            ushort MultiCounter = packet.ReadUInt16();

            for (int j = 0; j < MultiCounter; j++)
            {
                ulong  UItemID = packet.ReadUInt64();
                ushort Count   = packet.ReadUInt16();
                ushort Stack   = packet.ReadUInt16();
                itemlist += "," + UItemID + "," + Count;
            }
            packet.Skip(2);
            byte LooterType = packet.ReadByte();
            uint NPCInfoID  = packet.ReadUInt32();

            using (StreamWriter fileStream = new StreamWriter(@"Output\ItemsLooted.csv", true))
            {
                //if (Kamael.Packets.Globals.lootIndex == 1)
                //{
                fileStream.Write(",");
                //}

                fileStream.Write("," + NPCInfoID + "," + itemlist);
            }
        }