示例#1
0
        public void Read(WorldPacket data)
        {
            MinLevel    = data.ReadInt32();
            MaxLevel    = data.ReadInt32();
            RaceFilter  = data.ReadInt64();
            ClassFilter = data.ReadInt32();

            uint nameLength                  = data.ReadBits <uint>(6);
            uint virtualRealmNameLength      = data.ReadBits <uint>(9);
            uint guildNameLength             = data.ReadBits <uint>(7);
            uint guildVirtualRealmNameLength = data.ReadBits <uint>(9);
            uint wordsCount                  = data.ReadBits <uint>(3);

            ShowEnemies         = data.HasBit();
            ShowArenaPlayers    = data.HasBit();
            ExactName           = data.HasBit();
            ServerInfo.HasValue = data.HasBit();
            data.ResetBitPos();

            for (int i = 0; i < wordsCount; ++i)
            {
                Words.Add(data.ReadString(data.ReadBits <uint>(7)));
                data.ResetBitPos();
            }

            Name                  = data.ReadString(nameLength);
            VirtualRealmName      = data.ReadString(virtualRealmNameLength);
            Guild                 = data.ReadString(guildNameLength);
            GuildVirtualRealmName = data.ReadString(guildVirtualRealmNameLength);

            if (ServerInfo.HasValue)
            {
                ServerInfo.Value.Read(data);
            }
        }
        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());
            }
        }
示例#3
0
 public void Read(WorldPacket data)
 {
     data.ResetBitPos();
     LootItemType = (LootItemType)data.ReadBits <byte>(2);
     Item         = new ItemInstance();
     Item.Read(data);
     Quantity = data.ReadUInt32();
 }
示例#4
0
        public void Read(WorldPacket data)
        {
            var itemModListCount = data.ReadBits <uint>(6);

            data.ResetBitPos();

            for (var i = 0; i < itemModListCount; ++i)
            {
                var itemMod = new ItemMod();
                itemMod.Read(data);
                Values[i] = itemMod;
            }
        }
示例#5
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);
                }
            }
示例#6
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);
            }
        }
示例#7
0
        public InvUpdate(WorldPacket data)
        {
            Items = new List <InvItem>();
            int size = data.ReadBits <int>(2);

            data.ResetBitPos();
            for (int i = 0; i < size; ++i)
            {
                var item = new InvItem
                {
                    ContainerSlot = data.ReadUInt8(),
                    Slot          = data.ReadUInt8()
                };
                Items.Add(item);
            }
        }
示例#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();
                }
            }
示例#9
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);
            }
        }
示例#10
0
        public void Read(WorldPacket data)
        {
            data.ResetBitPos();

            uint nameLength    = data.ReadBits <uint>(10);
            uint versionLength = data.ReadBits <uint>(10);

            Loaded   = data.HasBit();
            Disabled = data.HasBit();
            if (nameLength > 1)
            {
                Name = data.ReadString(nameLength - 1);
                data.ReadUInt8(); // null terminator
            }
            if (versionLength > 1)
            {
                Version = data.ReadString(versionLength - 1);
                data.ReadUInt8(); // null terminator
            }
        }
示例#11
0
 public AuctionSortDef(WorldPacket data)
 {
     data.ResetBitPos();
     SortOrder   = (AuctionHouseSortOrder)data.ReadBits <uint>(4);
     ReverseSort = data.HasBit();
 }