/// <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();
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="PacketGroundObjectInfo"/> class.
 /// </summary>
 /// <param name="packet">The packet.</param>
 public PacketGroundObjectInfo(IL2RPacket packet)
 {
     GroundObjectUID = packet.ReadUInt64();
     GroundObjectID  = packet.ReadUInt32();
     SkillInfoID     = packet.ReadUInt32();
     OwnerUID        = packet.ReadUInt64();
     XPos            = packet.ReadSingle();
     YPos            = packet.ReadSingle();
     ZPos            = packet.ReadSingle();
     Direction       = packet.ReadSingle();
     ElapsedTime     = packet.ReadUInt32();
 }
Esempio n. 3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="PacketNpc"/> class.
        /// </summary>
        /// <param name="packet">The packet.</param>
        public PacketNpc(IL2RPacket packet)
        {
            NPCUID    = packet.ReadUInt64();
            NPCID     = packet.ReadUInt32();
            XPos      = packet.ReadSingle();
            YPos      = packet.ReadSingle();
            ZPos      = packet.ReadSingle();
            Direction = packet.ReadSingle();
            CurrentHP = packet.ReadUInt32();
            MaxHP     = packet.ReadUInt32();
            MoveSpeed = packet.ReadUInt32();

            ushort BuffCount = packet.ReadUInt16();

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

            byte  CombatMode  = packet.ReadByte();
            uint  SpawnInfoId = packet.ReadUInt32();
            ulong TeamID      = packet.ReadUInt64();
        }
Esempio n. 4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="PacketNpcMoveInfo"/> class.
 /// </summary>
 /// <param name="packet">The packet.</param>
 public PacketNpcMoveInfo(IL2RPacket packet)
 {
     //PktVector
     DestinationXPos = packet.ReadSingle();
     DestinationYPos = packet.ReadSingle();
 }
Esempio n. 5
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();
        }