public AuctionBucketKey(WorldPacket data)
        {
            data.ResetBitPos();
            ItemID = data.ReadBits <uint>(20);

            if (data.HasBit())
            {
                BattlePetSpeciesID.HasValue = true;
            }

            ItemLevel = data.ReadBits <ushort>(11);

            if (data.HasBit())
            {
                SuffixItemNameDescriptionID.HasValue = true;
            }

            if (BattlePetSpeciesID.HasValue)
            {
                BattlePetSpeciesID.Set(data.ReadUInt16());
            }

            if (SuffixItemNameDescriptionID.HasValue)
            {
                SuffixItemNameDescriptionID.Set(data.ReadUInt16());
            }
        }
示例#2
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);
            }
示例#3
0
 public void Read(WorldPacket data)
 {
     PvPTalentID = data.ReadUInt16();
     Slot        = data.ReadUInt8();
 }