public override void ReadDataXML(XElement ele, ElderScrollsPlugin master) { XElement subEle; if (ele.TryPathTo("EditorID", false, out subEle)) { if (EditorID == null) { EditorID = new SimpleSubrecord <String>(); } EditorID.ReadXML(subEle, master); } if (ele.TryPathTo("Weathers", false, out subEle)) { if (Weathers == null) { Weathers = new WeatherList(); } Weathers.ReadXML(subEle, master); } if (ele.TryPathTo("SunTexture", false, out subEle)) { if (SunTexture == null) { SunTexture = new SimpleSubrecord <String>(); } SunTexture.ReadXML(subEle, master); } if (ele.TryPathTo("SunGlareTexture", false, out subEle)) { if (SunGlareTexture == null) { SunGlareTexture = new SimpleSubrecord <String>(); } SunGlareTexture.ReadXML(subEle, master); } if (ele.TryPathTo("Model", false, out subEle)) { if (Model == null) { Model = new Model(); } Model.ReadXML(subEle, master); } if (ele.TryPathTo("Timing", false, out subEle)) { if (Timing == null) { Timing = new ClimateTiming(); } Timing.ReadXML(subEle, master); } }
public override void ReadData(ESPReader reader, long dataEnd) { while (reader.BaseStream.Position < dataEnd) { string subTag = reader.PeekTag(); switch (subTag) { case "EDID": if (EditorID == null) { EditorID = new SimpleSubrecord <String>(); } EditorID.ReadBinary(reader); break; case "WLST": if (Weathers == null) { Weathers = new WeatherList(); } Weathers.ReadBinary(reader); break; case "FNAM": if (SunTexture == null) { SunTexture = new SimpleSubrecord <String>(); } SunTexture.ReadBinary(reader); break; case "GNAM": if (SunGlareTexture == null) { SunGlareTexture = new SimpleSubrecord <String>(); } SunGlareTexture.ReadBinary(reader); break; case "MODL": if (Model == null) { Model = new Model(); } Model.ReadBinary(reader); break; case "TNAM": if (Timing == null) { Timing = new ClimateTiming(); } Timing.ReadBinary(reader); break; default: throw new Exception(); } } }
public Climate(SimpleSubrecord <String> EditorID, WeatherList Weathers, SimpleSubrecord <String> SunTexture, SimpleSubrecord <String> SunGlareTexture, Model Model, ClimateTiming Timing) { this.EditorID = EditorID; }