상속: BindableBase
예제 #1
0
        public static BioQuestMap Load(string path)
        {
            if (string.IsNullOrEmpty(path))
            {
                throw new ArgumentNullException(nameof(path));
            }

            var map = new BioQuestMap();

            if (!File.Exists(path))
            {
                return(map);
            }

            var doc  = XDocument.Load(path);
            var root = doc.Root;

            if (root == null)
            {
                return(map);
            }

            if (!root.Name.LocalName.Equals("QuestMap"))
            {
                root = root.Element("QuestMap");

                if (root == null)
                {
                    return(map);
                }
            }

            //
            map.Quests = ReadQuests(root);

            return(map);
        }
예제 #2
0
		public static BioQuestMap Load( string path)
		{
			if (path.IsNullOrEmpty())
			{
				throw new ArgumentNullException(nameof(path));
			}

			var map = new BioQuestMap();

			if (!File.Exists(path))
			{
				return map;
			}

			var doc = XDocument.Load(path);
			var root = doc.Root;

			if (root == null)
			{
				return map;
			}

			if (!root.Name.LocalName.Equals("QuestMap"))
			{
				root = root.Element("QuestMap");

				if (root == null)
				{
					return map;
				}
			}

			//
			map.Quests = ReadQuests(root);

			return map;
		}