Example #1
0
        public override void ReadXML(XElement ele, ElderScrollsPlugin master)
        {
            XElement subEle;

            if (ele.TryPathTo("Index", false, out subEle))
            {
                if (Index == null)
                {
                    Index = new SimpleSubrecord <Int16>();
                }

                Index.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("LogEntries", false, out subEle))
            {
                if (LogEntries == null)
                {
                    LogEntries = new List <QuestLogEntry>();
                }

                foreach (XElement e in subEle.Elements())
                {
                    QuestLogEntry temp = new QuestLogEntry();
                    temp.ReadXML(e, master);
                    LogEntries.Add(temp);
                }
            }
        }
Example #2
0
        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 "INDX":
                    if (readTags.Contains("INDX"))
                    {
                        return;
                    }
                    if (Index == null)
                    {
                        Index = new SimpleSubrecord <Int16>();
                    }

                    Index.ReadBinary(reader);
                    break;

                case "QSDT":
                    if (LogEntries == null)
                    {
                        LogEntries = new List <QuestLogEntry>();
                    }

                    QuestLogEntry tempQSDT = new QuestLogEntry();
                    tempQSDT.ReadBinary(reader);
                    LogEntries.Add(tempQSDT);
                    break;

                default:
                    return;
                }

                readTags.Add(subTag);
            }
        }
 public QuestLogEntry(QuestLogEntry copyObject)
 {
 }