/// <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="PacketPlayerGuild" /> class.
 /// </summary>
 /// <param name="packet">The packet.</param>
 public PacketPlayerGuild(IL2RPacket packet)
 {
     GuildID                = packet.ReadUInt64();
     GuildMembersGrade      = packet.ReadByte();
     GuildName              = packet.ReadString();
     EmblemSymbolInfoID     = packet.ReadUInt32();
     EmblemBackgroundInfoID = packet.ReadUInt32();
     OccupyTitleInfoID      = packet.ReadUInt32();
     CastleType             = packet.ReadByte();
 }
Esempio n. 3
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. 4
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 + "\"");
                }
            }
        }
Esempio n. 5
0
        /// <summary>
        /// Initializes a new instance of the <see cref="PacketChat" /> class.
        /// </summary>
        /// <param name="packet">The packet.</param>
        public PacketChat(IL2RPacket packet)
        {
            ChatUID     = packet.ReadUInt64();
            PlayerUID   = packet.ReadUInt64();
            PlayerName  = packet.ReadString();
            Race        = CSV.race.RaceName(packet.ReadInt32());
            PlayerClass = CSV.Class.className(packet.ReadUInt32());
            //MsgTime = packet.ReadDate();
            Message            = packet.ReadString();
            Level              = packet.ReadUInt16();
            EmblemSymbolID     = packet.ReadUInt32();
            EmblemBackgroundID = packet.ReadUInt32();

            LinkWorldBossID        = packet.ReadUInt32();
            LinkWorldBossDieID     = packet.ReadUInt32();
            LinkWorldBossDespawnID = packet.ReadUInt32();

            LinkItem = packet.ReadUInt16();
            if (LinkItem > 0)
            {
                LinkItemList.Add(new PacketLinkItem(packet));
            }

            ushort LinkDungeon = packet.ReadUInt16();

            if (LinkDungeon > 0)
            {
                LinkDungeonList.Add(new PacketLinkDungeon(packet));
            }

            ushort LinkGuildDungeon = packet.ReadUInt16();

            if (LinkGuildDungeon > 0)
            {
                LinkGuildList.Add(new PacketLinkGuildDungeon(packet));
            }

            LinkVoice    = packet.ReadString();
            LinkType     = packet.ReadByte();
            LinkSpotID   = packet.ReadUInt32();
            LanguageType = packet.ReadByte();
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="PacketGadget"/> class.
 /// </summary>
 /// <param name="packet">The packet.</param>
 public PacketGadget(IL2RPacket packet)
 {
     GadgetUID   = packet.ReadUInt64();
     GadgetID    = packet.ReadUInt32();
     XPos        = packet.ReadSingle();
     YPos        = packet.ReadSingle();
     ZPos        = packet.ReadSingle();
     Direction   = packet.ReadSingle();
     Active      = packet.ReadByte();
     OwnerName   = packet.ReadString();//This is a guess
     RemainCount = packet.ReadUInt32();
 }
Esempio n. 7
0
        /// <summary>
        /// Initializes a new instance of the <see cref="PacketNpcCreateInfo"/> class.
        /// </summary>
        /// <param name="packet">The packet.</param>
        public PacketNpcCreateInfo(IL2RPacket packet)
        {
            NPC.Add(new PacketNpc(packet));

            NPCMoving = packet.ReadUInt16();
            // PktNpcMoveInfo
            for (int i = 0; i < NPCMoving; i++)
            {
                NPCMoveInfo.Add(new PacketNpcMoveInfo(packet));
            }

            OwnerName = packet.ReadString();

            TargetID = packet.ReadUInt64();
        }
Esempio n. 8
0
        /// <summary>
        /// Initializes a new instance of the <see cref="PacketOtherPlayer"/> class.
        /// </summary>
        /// <param name="packet">The packet.</param>
        public PacketOtherPlayer(IL2RPacket packet)
        {
            //pushing a change to be sure
            PlayerUID = packet.ReadUInt64();
            //uint unk1 = packet.ReadUInt32();
            //byte unk2 = packet.ReadByte();
            PlayerName = packet.ReadString();
            Race       = packet.ReadUInt32();
            Class      = packet.ReadUInt32();
            Level      = packet.ReadUInt16();
            XPos       = packet.ReadSingle();
            YPos       = packet.ReadSingle();
            ZPos       = packet.ReadSingle();
            Direction  = packet.ReadSingle();
            CurHP      = packet.ReadUInt32();
            MaxHP      = packet.ReadUInt32();
            MoveSpeed  = packet.ReadUInt32();


            BuffCount = packet.ReadUInt16();
            // PktBuffInfo
            BuffInfoList = new List <PacketBuffInfo>();
            for (int i = 0; i < BuffCount; i++)
            {
                ////PktBuffInfo.Packet(packet);
                BuffInfoList.Add(new PacketBuffInfo(packet));
            }

            CombatMode      = packet.ReadByte();
            SoulShotEnabled = packet.ReadByte();
            PKStatus        = packet.ReadByte();
            PKAttackState   = packet.ReadByte();
            PKPoint         = packet.ReadUInt32();

            //// PktAppearance
            AppearanceList = new List <PacketAppeareance>();
            AppearanceList.Add(new PacketAppeareance(packet));

            EquipCount = packet.ReadUInt16();
            // PktSimpleEquipment
            SimpleEquipList = new List <PacketSimpleEquipment>();
            for (int i = 0; i < EquipCount; i++)
            {
                SimpleEquipList.Add(new PacketSimpleEquipment(packet));
            }

            TeamID          = packet.ReadUInt64();
            ControlGadgetID = packet.ReadUInt64();

            Guilded = packet.ReadByte();
            // PktPlayerGuild
            PlayerGuildList = new List <PacketPlayerGuild>();
            if (Guilded > 0)
            {
                PlayerGuildList.Add(new PacketPlayerGuild(packet));
            }

            RidingPetInfoID = packet.ReadUInt32();
            RidingPetLevel  = packet.ReadUInt16();
            RidingPetGrade  = packet.ReadByte();

            EquippedTitleInfoID = packet.ReadUInt32();

            //pktPartyEmblem
            byte SetEmblem = packet.ReadByte();

            PartyEmblemList = new List <PacketPartyEmblem>();
            if (SetEmblem > 0)
            {
                PartyEmblemList.Add(new PacketPartyEmblem(packet));
            }

            //PktSimpleCape
            SimpleCapeList = new List <PacketSimpleCape>();
            SimpleCapeList.Add(new PacketSimpleCape(packet));

            //PktPKMode
            PKModeList = new List <PacketPKMode>();
            PKModeList.Add(new PacketPKMode(packet));

            CurBarrier      = packet.ReadUInt32();
            MaxBarrier      = packet.ReadUInt32();
            IsCostumeHidden = packet.ReadByte();
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="PacketActorOwnerInfo" /> class.
 /// </summary>
 /// <param name="packet">The packet.</param>
 public PacketActorOwnerInfo(IL2RPacket packet)
 {
     ActorUID   = packet.ReadUInt64();
     ActorType  = packet.ReadByte(); // Could be UInt
     OwnerNamer = packet.ReadString();
 }