Ejemplo n.º 1
0
 public PlaceableWater()
 {
     EditorID     = new SimpleSubrecord <String>("EDID");
     ObjectBounds = new ObjectBounds("OBND");
     Model        = new Model();
     Data         = new PlaceableWaterData("DNAM");
 }
Ejemplo n.º 2
0
 public PlaceableWater(SimpleSubrecord <String> EditorID, ObjectBounds ObjectBounds, Model Model, PlaceableWaterData Data)
 {
     this.EditorID     = EditorID;
     this.ObjectBounds = ObjectBounds;
     this.Model        = Model;
     this.Data         = Data;
 }
Ejemplo n.º 3
0
        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 "OBND":
                    if (ObjectBounds == null)
                    {
                        ObjectBounds = new ObjectBounds();
                    }

                    ObjectBounds.ReadBinary(reader);
                    break;

                case "MODL":
                    if (Model == null)
                    {
                        Model = new Model();
                    }

                    Model.ReadBinary(reader);
                    break;

                case "DNAM":
                    if (Data == null)
                    {
                        Data = new PlaceableWaterData();
                    }

                    Data.ReadBinary(reader);
                    break;

                default:
                    throw new Exception();
                }
            }
        }
Ejemplo n.º 4
0
        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("ObjectBounds", false, out subEle))
            {
                if (ObjectBounds == null)
                {
                    ObjectBounds = new ObjectBounds();
                }

                ObjectBounds.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("Model", false, out subEle))
            {
                if (Model == null)
                {
                    Model = new Model();
                }

                Model.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("Data", false, out subEle))
            {
                if (Data == null)
                {
                    Data = new PlaceableWaterData();
                }

                Data.ReadXML(subEle, master);
            }
        }