public TesVMAD(string scriptName, string propertyName, uint propertyValue) : base("VMAD") { Version = new TesUInt16(5); ObjectFormat = new TesUInt16(2); ScriptCount = new TesUInt16(1); Script script = new Script(); script.ScriptNameDataSize.Value = (ushort)scriptName.Length; script.ScriptName.Value = scriptName; script.PropertyCount.Value = 1; Script.Property property = new Script.Property(); property.PropertyNameDataSize.Value = (ushort)propertyName.Length; property.PropertyName.Value = propertyName; property.PropertyValue.AddRange(new TesBytes(propertyValue)); script.Propertys.Add(property); Scripts.Add(script); OutputItems.Add(Version); OutputItems.Add(ObjectFormat); OutputItems.Add(ScriptCount); OutputItems.Add(Scripts); }
public TesVMAD(List <Tuple <string, List <Tuple <string, uint> > > > list) : base("VMAD") { Version = new TesUInt16(5); ObjectFormat = new TesUInt16(2); ScriptCount = new TesUInt16((ushort)list.Count); foreach (var x in list) { Script script = new Script(); script.ScriptNameDataSize.Value = (ushort)x.Item1.Length; script.ScriptName.Value = x.Item1; script.PropertyCount.Value = (ushort)x.Item2.Count; foreach (var x2 in x.Item2) { Script.Property property = new Script.Property(); property.PropertyNameDataSize.Value = (ushort)x2.Item1.Length; property.PropertyName.Value = x2.Item1; property.PropertyValue.AddRange(new TesBytes(x2.Item2)); script.Propertys.Add(property); } Scripts.Add(script); } OutputItems.Add(Version); OutputItems.Add(ObjectFormat); OutputItems.Add(ScriptCount); OutputItems.Add(Scripts); }