Exemple #1
0
        public void CopyFrom(Item from)
        {
            if (from == null) return;

            Type = from.Type;
            SubType = from.SubType;
            Modifier = from.Modifier;
            MinusModifier = from.MinusModifier;
            Rarity = from.Rarity;
            Material = from.Material;
            Flags = from.Flags;
            Level = from.Level;
            UpgradeCount = from.UpgradeCount;
            for (int i = 0; i < 32; i++)
            {
                Upgrades[i] = new ItemUpgrade();
                Upgrades[i].CopyFrom(from.Upgrades[i]);
            }
        }
Exemple #2
0
 public void Read(BinaryReader reader)
 {
     Type = reader.ReadByte();
     SubType = reader.ReadByte();
     reader.ReadInt16(); // skip 2
     Modifier = reader.ReadUInt32();
     MinusModifier = reader.ReadUInt32();
     Rarity = reader.ReadByte();
     Material = reader.ReadByte();
     Flags = reader.ReadByte();
     reader.ReadByte(); // skip 1
     Level = reader.ReadInt16();
     reader.ReadInt16(); // skip 2
     for (int i = 0; i < Upgrades.Length; ++i)
     {
         Upgrades[i] = new ItemUpgrade();
         Upgrades[i].Read(reader);
     }
     UpgradeCount = reader.ReadUInt32();
 }
Exemple #3
0
        public void CopyFrom(ItemUpgrade from)
        {
            if (from == null) return;

            X = from.X;
            Y = from.Y;
            Z = from.Z;
            Material = from.Material;
            Level = from.Level;
        }