Esempio n. 1
0
        public void Read(BinaryReader reader)
        {
            Type = reader.ReadByte();
            Subtype = reader.ReadByte();
            reader.Skip(2);
            Modifier = reader.ReadInt16();
            reader.Skip(2);
            unknown1 = reader.ReadInt32();
            Rarity = reader.ReadByte();
            Material = reader.ReadByte();
            Flags = reader.ReadByte();
            reader.Skip(1);
            Level = reader.ReadInt16();
            reader.Skip(2);

            for (int i = 0; i < AttributeCount; ++i)
            {
                ItemAttribute attribute = new ItemAttribute();
                attribute.Read(reader);

                Attributes.Add(attribute);
            }

            // AttributesUsed is calculated on write
            reader.Skip(4);

            // TODO Ignore recipes for now
            if (Type == 2)
                Subtype = 0;
        }
Esempio n. 2
0
        public void Read(BinaryReader reader)
        {
            Type = reader.ReadByte();
            Subtype = reader.ReadByte();
            reader.Skip(2);
            Modifier = reader.ReadInt16();
            reader.Skip(2);
            RecipeType = reader.ReadByte();
            reader.Skip(3);
            Rarity = reader.ReadByte();
            Material = reader.ReadByte();
            Flags = (ItemFlags)reader.ReadByte();
            reader.Skip(1);
            Level = reader.ReadInt16();
            reader.Skip(2);

            for (int i = 0; i < AttributeCount; ++i)
            {
                ItemAttribute attribute = new ItemAttribute();
                attribute.Read(reader);

                Attributes.Add(attribute);
            }

            // AttributesUsed is calculated on write
            reader.Skip(4);

            ActualModifier = Modifier;
        }