public AnimationSound(FormID Sound, Byte Chance, Byte[] Unused, AnimationSoundType Type) { this.Sound = Sound; this.Chance = Chance; this.Unused = Unused; this.Type = Type; }
public AnimationSound(string Tag = null) : base(Tag) { Sound = new FormID(); Chance = new Byte(); Unused = new byte[3]; Type = new AnimationSoundType(); }
public AnimationSound(AnimationSound copyObject) { if (copyObject.Sound != null) { Sound = (FormID)copyObject.Sound.Clone(); } Chance = copyObject.Chance; if (copyObject.Unused != null) { Unused = (Byte[])copyObject.Unused.Clone(); } Type = copyObject.Type; }
protected override void ReadData(ESPReader reader) { using (MemoryStream stream = new MemoryStream(reader.ReadBytes(size))) using (ESPReader subReader = new ESPReader(stream, reader.Plugin)) { try { Sound.ReadBinary(subReader); Chance = subReader.ReadByte(); Unused = subReader.ReadBytes(3); Type = subReader.ReadEnum <AnimationSoundType>(); } catch { return; } } }
protected override void ReadDataXML(XElement ele, ElderScrollsPlugin master) { XElement subEle; if (ele.TryPathTo("Sound", false, out subEle)) { Sound.ReadXML(subEle, master); } if (ele.TryPathTo("Chance", false, out subEle)) { Chance = subEle.ToByte(); } ReadUnusedXML(ele, master); if (ele.TryPathTo("Type", false, out subEle)) { Type = subEle.ToEnum <AnimationSoundType>(); } }