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); }
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; }