public override void WriteBinary(ESPWriter writer) { if (PartNode != null) { PartNode.WriteBinary(writer); } if (VATSTarget != null) { VATSTarget.WriteBinary(writer); } if (IKDataStartNode != null) { IKDataStartNode.WriteBinary(writer); } if (Data != null) { Data.WriteBinary(writer); } if (LimbReplacementModel != null) { LimbReplacementModel.WriteBinary(writer); } if (GoreEffectsTargetBone != null) { GoreEffectsTargetBone.WriteBinary(writer); } if (TextureFileHashes != null) { TextureFileHashes.WriteBinary(writer); } }
public override void WriteXML(XElement ele, ElderScrollsPlugin master) { XElement subEle; if (PartNode != null) { ele.TryPathTo("PartNode", true, out subEle); PartNode.WriteXML(subEle, master); } if (VATSTarget != null) { ele.TryPathTo("VATSTarget", true, out subEle); VATSTarget.WriteXML(subEle, master); } if (IKDataStartNode != null) { ele.TryPathTo("IKData/StartNode", true, out subEle); IKDataStartNode.WriteXML(subEle, master); } if (Data != null) { ele.TryPathTo("Data", true, out subEle); Data.WriteXML(subEle, master); } if (LimbReplacementModel != null) { ele.TryPathTo("LimbReplacementModel", true, out subEle); LimbReplacementModel.WriteXML(subEle, master); } if (GoreEffectsTargetBone != null) { ele.TryPathTo("GoreEffectsTargetBone", true, out subEle); GoreEffectsTargetBone.WriteXML(subEle, master); } if (TextureFileHashes != null) { ele.TryPathTo("TextureFileHashes", true, out subEle); TextureFileHashes.WriteXML(subEle, master); } }
public override void ReadBinary(ESPReader reader) { List <string> readTags = new List <string>(); while (reader.BaseStream.Position < reader.BaseStream.Length) { string subTag = reader.PeekTag(); switch (subTag) { case "BPNN": if (readTags.Contains("BPNN")) { return; } PartNode.ReadBinary(reader); break; case "BPNT": if (readTags.Contains("BPNT")) { return; } VATSTarget.ReadBinary(reader); break; case "BPNI": if (readTags.Contains("BPNI")) { return; } IKDataStartNode.ReadBinary(reader); break; case "BPND": if (readTags.Contains("BPND")) { return; } Data.ReadBinary(reader); break; case "NAM1": if (readTags.Contains("NAM1")) { return; } LimbReplacementModel.ReadBinary(reader); break; case "NAM4": if (readTags.Contains("NAM4")) { return; } GoreEffectsTargetBone.ReadBinary(reader); break; case "NAM5": if (readTags.Contains("NAM5")) { return; } if (TextureFileHashes == null) { TextureFileHashes = new SimpleSubrecord <Byte[]>(); } TextureFileHashes.ReadBinary(reader); break; default: return; } readTags.Add(subTag); } }
public override void ReadXML(XElement ele, ElderScrollsPlugin master) { XElement subEle; if (ele.TryPathTo("PartNode", false, out subEle)) { if (PartNode == null) { PartNode = new SimpleSubrecord <String>(); } PartNode.ReadXML(subEle, master); } if (ele.TryPathTo("VATSTarget", false, out subEle)) { if (VATSTarget == null) { VATSTarget = new SimpleSubrecord <String>(); } VATSTarget.ReadXML(subEle, master); } if (ele.TryPathTo("IKData/StartNode", false, out subEle)) { if (IKDataStartNode == null) { IKDataStartNode = new SimpleSubrecord <String>(); } IKDataStartNode.ReadXML(subEle, master); } if (ele.TryPathTo("Data", false, out subEle)) { if (Data == null) { Data = new BodyPartInfo(); } Data.ReadXML(subEle, master); } if (ele.TryPathTo("LimbReplacementModel", false, out subEle)) { if (LimbReplacementModel == null) { LimbReplacementModel = new SimpleSubrecord <String>(); } LimbReplacementModel.ReadXML(subEle, master); } if (ele.TryPathTo("GoreEffectsTargetBone", false, out subEle)) { if (GoreEffectsTargetBone == null) { GoreEffectsTargetBone = new SimpleSubrecord <String>(); } GoreEffectsTargetBone.ReadXML(subEle, master); } if (ele.TryPathTo("TextureFileHashes", false, out subEle)) { if (TextureFileHashes == null) { TextureFileHashes = new SimpleSubrecord <Byte[]>(); } TextureFileHashes.ReadXML(subEle, master); } }