protected override void WriteDataXML(XElement ele, ElderScrollsPlugin master)
        {
            XElement subEle;

            ele.TryPathTo("MaterialType", true, out subEle);
            subEle.Value = MaterialType.ToString();

            ele.TryPathTo("OldImpact", true, out subEle);
            OldImpact.WriteXML(subEle, master);

            ele.TryPathTo("NewImpact", true, out subEle);
            NewImpact.WriteXML(subEle, master);
        }
 protected override void ReadData(ESPReader reader)
 {
     using (MemoryStream stream = new MemoryStream(reader.ReadBytes(size)))
         using (ESPReader subReader = new ESPReader(stream, reader.Plugin))
         {
             try
             {
                 MaterialType = subReader.ReadEnum <MaterialTypeUInt>();
                 OldImpact.ReadBinary(subReader);
                 NewImpact.ReadBinary(subReader);
             }
             catch
             {
                 return;
             }
         }
 }
        protected override void ReadDataXML(XElement ele, ElderScrollsPlugin master)
        {
            XElement subEle;

            if (ele.TryPathTo("MaterialType", false, out subEle))
            {
                MaterialType = subEle.ToEnum <MaterialTypeUInt>();
            }

            if (ele.TryPathTo("OldImpact", false, out subEle))
            {
                OldImpact.ReadXML(subEle, master);
            }

            if (ele.TryPathTo("NewImpact", false, out subEle))
            {
                NewImpact.ReadXML(subEle, master);
            }
        }
 protected override void WriteData(ESPWriter writer)
 {
     writer.Write((UInt32)MaterialType);
     OldImpact.WriteBinary(writer);
     NewImpact.WriteBinary(writer);
 }