Ejemplo n.º 1
0
 public void Read(WorldPacket data)
 {
     RequesterGuid = data.ReadPackedGuid();
     Id            = data.ReadUInt32();
     Type          = (RideType)data.ReadUInt32();
     Time          = data.ReadInt32();
 }
Ejemplo n.º 2
0
        public static MovementInfo ReadMovementInfo(WorldPacket data)
        {
            var movementInfo = new MovementInfo();

            movementInfo.Guid = data.ReadPackedGuid();
            movementInfo.Time = data.ReadUInt32();
            float x = data.ReadFloat();
            float y = data.ReadFloat();
            float z = data.ReadFloat();
            float o = data.ReadFloat();

            movementInfo.Pos.Relocate(x, y, z, o);
            movementInfo.Pitch           = data.ReadFloat();
            movementInfo.SplineElevation = data.ReadFloat();

            uint removeMovementForcesCount = data.ReadUInt32();

            uint moveIndex = data.ReadUInt32();

            for (uint i = 0; i < removeMovementForcesCount; ++i)
            {
                data.ReadPackedGuid();
            }

            // ResetBitReader

            movementInfo.SetMovementFlags((MovementFlag)data.ReadBits <uint>(30));
            movementInfo.SetMovementFlags2((MovementFlag2)data.ReadBits <uint>(18));

            bool hasTransport = data.HasBit();
            bool hasFall      = data.HasBit();
            bool hasSpline    = data.HasBit(); // todo 6.x read this infos

            data.ReadBit();                    // HeightChangeFailed
            data.ReadBit();                    // RemoteTimeValid

            if (hasTransport)
            {
                ReadTransportInfo(data, ref movementInfo.transport);
            }

            if (hasFall)
            {
                movementInfo.jump.fallTime = data.ReadUInt32();
                movementInfo.jump.zspeed   = data.ReadFloat();

                // ResetBitReader

                bool hasFallDirection = data.HasBit();
                if (hasFallDirection)
                {
                    movementInfo.jump.sinAngle = data.ReadFloat();
                    movementInfo.jump.cosAngle = data.ReadFloat();
                    movementInfo.jump.xyspeed  = data.ReadFloat();
                }
            }

            return(movementInfo);
        }
Ejemplo n.º 3
0
 public AuctionFavoriteInfo(WorldPacket data)
 {
     Order                       = data.ReadUInt32();
     ItemID                      = data.ReadUInt32();
     ItemLevel                   = data.ReadUInt32();
     BattlePetSpeciesID          = data.ReadUInt32();
     SuffixItemNameDescriptionID = data.ReadUInt32();
 }
Ejemplo n.º 4
0
        public void Read(WorldPacket data)
        {
            Context = (ItemContext)data.ReadUInt8();
            uint bonusListIdSize = data.ReadUInt32();

            BonusListIDs = new List <uint>();
            for (uint i = 0u; i < bonusListIdSize; ++i)
            {
                uint bonusId = data.ReadUInt32();
                BonusListIDs.Add(bonusId);
            }
        }
Ejemplo n.º 5
0
 public void Read(WorldPacket data)
 {
     MarketID  = data.ReadUInt32();
     SellerNPC = data.ReadUInt32();
     Item.Read(data);
     Quantity         = data.ReadUInt32();
     MinBid           = data.ReadUInt64();
     MinIncrement     = data.ReadUInt64();
     CurrentBid       = data.ReadUInt64();
     SecondsRemaining = data.ReadUInt32();
     NumBids          = data.ReadUInt32();
     HighBid          = data.HasBit();
 }
Ejemplo n.º 6
0
        public void Read(WorldPacket data)
        {
            ClubID      = data.ReadUInt64();
            EventID     = data.ReadUInt64();
            ModeratorID = data.ReadUInt64();
            EventType   = data.ReadUInt8();
            TextureID   = data.ReadUInt32();
            Time        = data.ReadPackedTime();
            Flags       = data.ReadUInt32();

            byte   titleLen = data.ReadBits <byte>(8);
            ushort descLen  = data.ReadBits <ushort>(11);

            Title       = data.ReadString(titleLen);
            Description = data.ReadString(descLen);
        }
 public void Read(WorldPacket data)
 {
     ItemModifiedAppearanceID = data.ReadInt32();
     Slot = data.ReadUInt32();
     SpellItemEnchantmentID            = data.ReadInt32();
     SecondaryItemModifiedAppearanceID = data.ReadInt32();
 }
Ejemplo n.º 8
0
            public void Read(WorldPacket data)
            {
                uint linesCount = data.ReadUInt32();

                ReportLineIndex.HasValue = data.HasBit();
                data.ResetBitPos();

                for (uint i = 0; i < linesCount; i++)
                {
                    Lines.Add(new SupportTicketChatLine(data));
                }

                if (ReportLineIndex.HasValue)
                {
                    ReportLineIndex.Value = data.ReadUInt32();
                }
            }
Ejemplo n.º 9
0
 public void Read(WorldPacket data)
 {
     data.ResetBitPos();
     LootItemType = (LootItemType)data.ReadBits <byte>(2);
     Item         = new ItemInstance();
     Item.Read(data);
     Quantity = data.ReadUInt32();
 }
Ejemplo n.º 10
0
        public void Read(WorldPacket data)
        {
            ItemID = data.ReadUInt32();
            RandomPropertiesSeed = data.ReadUInt32();
            RandomPropertiesID   = data.ReadUInt32();

            ItemBonus.HasValue     = data.HasBit();
            Modifications.HasValue = data.HasBit();
            data.ResetBitPos();

            if (ItemBonus.HasValue)
            {
                ItemBonus.Value.Read(data);
            }

            if (Modifications.HasValue)
            {
                Modifications.Value.Read(data);
            }
        }
Ejemplo n.º 11
0
        public void Read(WorldPacket data)
        {
            byte   titleLength       = data.ReadBits <byte>(8);
            ushort descriptionLength = data.ReadBits <ushort>(11);

            EventType = data.ReadUInt8();
            TextureID = data.ReadInt32();
            Time      = data.ReadPackedTime();
            Flags     = data.ReadUInt32();
            var InviteCount = data.ReadUInt32();

            Title       = data.ReadString(titleLength);
            Description = data.ReadString(descriptionLength);

            for (var i = 0; i < InviteCount; ++i)
            {
                CalendarAddEventInviteInfo invite = new CalendarAddEventInviteInfo();
                invite.Read(data);
                Invites[i] = invite;
            }
        }
Ejemplo n.º 12
0
            public void Read(WorldPacket data)
            {
                uint linesCount = data.ReadUInt32();

                data.ResetBitPos();

                for (uint i = 0; i < linesCount; i++)
                {
                    var chatLine = new SupportTicketHorusChatLine();
                    chatLine.Read(data);
                    Lines.Add(chatLine);
                }
            }
Ejemplo n.º 13
0
        public static void ReadTransportInfo(WorldPacket data, ref MovementInfo.TransportInfo transportInfo)
        {
            transportInfo.guid            = data.ReadPackedGuid();      // Transport Guid
            transportInfo.pos.posX        = data.ReadFloat();
            transportInfo.pos.posY        = data.ReadFloat();
            transportInfo.pos.posZ        = data.ReadFloat();
            transportInfo.pos.Orientation = data.ReadFloat();
            transportInfo.seat            = data.ReadInt8();      // VehicleSeatIndex
            transportInfo.time            = data.ReadUInt32();    // MoveTime

            bool hasPrevTime  = data.HasBit();
            bool hasVehicleId = data.HasBit();

            if (hasPrevTime)
            {
                transportInfo.prevTime = data.ReadUInt32();         // PrevMoveTime
            }
            if (hasVehicleId)
            {
                transportInfo.vehicleId = data.ReadUInt32();        // VehicleRecID
            }
        }
Ejemplo n.º 14
0
        public void Read(WorldPacket data)
        {
            ItemID = data.ReadUInt32();

            ItemBonus.HasValue = data.HasBit();
            data.ResetBitPos();

            Modifications.Read(data);

            if (ItemBonus.HasValue)
            {
                ItemBonus.Value.Read(data);
            }
        }
Ejemplo n.º 15
0
            public void Read(WorldPacket data)
            {
                RideTicket.Read(data);
                GroupFinderActivityID     = data.ReadUInt32();
                LastTitleAuthorGuid       = data.ReadPackedGuid();
                LastDescriptionAuthorGuid = data.ReadPackedGuid();
                LastVoiceChatAuthorGuid   = data.ReadPackedGuid();

                byte titleLength       = data.ReadBits <byte>(8);
                byte descriptionLength = data.ReadBits <byte>(11);
                byte voiceChatLength   = data.ReadBits <byte>(8);

                Title       = data.ReadString(titleLength);
                Description = data.ReadString(descriptionLength);
                VoiceChat   = data.ReadString(voiceChatLength);
            }
Ejemplo n.º 16
0
            public void Read(WorldPacket data)
            {
                Timestamp  = data.ReadInt32();
                AuthorGUID = data.ReadPackedGuid();

                bool hasClubID       = data.HasBit();
                bool hasChannelGUID  = data.HasBit();
                bool hasRealmAddress = data.HasBit();
                bool hasSlashCmd     = data.HasBit();
                uint textLength      = data.ReadBits <uint>(12);

                if (hasClubID)
                {
                    ClubID.HasValue = true;
                    ClubID.Value    = data.ReadUInt64();
                }

                if (hasChannelGUID)
                {
                    ChannelGUID.HasValue = true;
                    ChannelGUID.Value    = data.ReadPackedGuid();
                }

                if (hasRealmAddress)
                {
                    RealmAddress.HasValue = true;
                    RealmAddress.Value.VirtualRealmAddress = data.ReadUInt32();
                    RealmAddress.Value.field_4             = data.ReadUInt16();
                    RealmAddress.Value.field_6             = data.ReadUInt8();
                }

                if (hasSlashCmd)
                {
                    SlashCmd.HasValue = true;
                    SlashCmd.Value    = data.ReadInt32();
                }

                Text = data.ReadString(textLength);
            }
Ejemplo n.º 17
0
 public void Read(WorldPacket data)
 {
     FactionGroup = data.ReadInt32();
     Locale       = data.ReadInt32();
     RequesterVirtualRealmAddress = data.ReadUInt32();
 }
Ejemplo n.º 18
0
 public void Read(WorldPacket data)
 {
     Value = data.ReadUInt32();
     Type  = (ItemModifier)data.ReadUInt8();
 }
Ejemplo n.º 19
0
 public HotfixRecord(WorldPacket data)
 {
     TableHash = data.ReadUInt32();
     RecordID  = data.ReadInt32();
     HotfixID  = data.ReadInt32();
 }
Ejemplo n.º 20
0
 public void Read(WorldPacket packet)
 {
     MapID    = packet.ReadUInt32();
     Position = packet.ReadVector3();
     Facing   = packet.ReadFloat();
 }
Ejemplo n.º 21
0
 public void Read(WorldPacket data)
 {
     Command    = data.ReadUInt32();
     ChannelID  = data.ReadUInt32();
     MessageLog = data.ReadString(data.ReadBits <uint>(12));
 }
Ejemplo n.º 22
0
 public void Read(WorldPacket data)
 {
     PlayerGuid       = data.ReadPackedGuid();
     RealmAddress     = data.ReadUInt32();
     TimeSinceOffence = data.ReadUInt32();
 }
Ejemplo n.º 23
0
 public void Read(WorldPacket data)
 {
     VirtualRealmAddress = data.ReadUInt32();
     Guid = data.ReadPackedGuid();
 }
Ejemplo n.º 24
0
 public void Read(WorldPacket data)
 {
     Timestamp = data.ReadUInt32();
     Text      = data.ReadString(data.ReadBits <uint>(12));
 }
Ejemplo n.º 25
0
 public SupportTicketChatLine(WorldPacket data)
 {
     Timestamp = data.ReadUInt32();
     Text      = data.ReadString(data.ReadBits <uint>(12));
 }
Ejemplo n.º 26
0
 public AuctionListFilterSubClass(WorldPacket data)
 {
     ItemSubclass = data.ReadInt32();
     InvTypeMask  = data.ReadUInt32();
 }
Ejemplo n.º 27
0
 public AuctionItemForSale(WorldPacket data)
 {
     Guid     = data.ReadPackedGuid();
     UseCount = data.ReadUInt32();
 }