예제 #1
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 "QOBJ":
                    if (readTags.Contains("QOBJ"))
                    {
                        return;
                    }
                    if (Index == null)
                    {
                        Index = new SimpleSubrecord <Int32>();
                    }

                    Index.ReadBinary(reader);
                    break;

                case "NNAM":
                    if (readTags.Contains("NNAM"))
                    {
                        return;
                    }
                    Description.ReadBinary(reader);
                    break;

                case "QSTA":
                    if (Targets == null)
                    {
                        Targets = new List <QuestTarget>();
                    }

                    QuestTarget tempQSTA = new QuestTarget();
                    tempQSTA.ReadBinary(reader);
                    Targets.Add(tempQSTA);
                    break;

                default:
                    return;
                }

                readTags.Add(subTag);
            }
        }
예제 #2
0
        public override void ReadXML(XElement ele, ElderScrollsPlugin master)
        {
            XElement subEle;

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

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

                Description.ReadXML(subEle, master);
            }
            if (ele.TryPathTo("Targets", false, out subEle))
            {
                if (Targets == null)
                {
                    Targets = new List <QuestTarget>();
                }

                foreach (XElement e in subEle.Elements())
                {
                    QuestTarget temp = new QuestTarget();
                    temp.ReadXML(e, master);
                    Targets.Add(temp);
                }
            }
        }
예제 #3
0
 public QuestTarget(QuestTarget copyObject)
 {
 }