private void ParseConditions(AvailCond Conditions)
 {
     onlyAccessible  = Conditions.HasFlag(AvailCond.Accessible);
     includeEvents   = Conditions.HasFlag(AvailCond.Events);
     includeRaces    = Conditions.HasFlag(AvailCond.Races);
     includeTreasure = Conditions.HasFlag(AvailCond.Treasure);
 }
        public Witcher3ProgressStatus(string filename, AvailCond Conditions)
        {
            XmlSerializer      serializer = new XmlSerializer(typeof(QuestListAsRead));
            List <QuestAsRead> QuestsAsRead;
            List <QuestAsRead> OutcomesAsRead;

            Quests          = new List <Quest>();
            Outcomes        = new List <Quest>();
            OutcomeIDs      = new List <int>();
            QuestLookupByID = new Dictionary <int, Quest>();
            using (Stream reader = new FileStream(filename, FileMode.Open))
            {
                QuestListAsRead readitems = (QuestListAsRead)serializer.Deserialize(reader);
                QuestsAsRead   = readitems.Quests;
                OutcomesAsRead = readitems.Outcomes;
            }
            foreach (QuestAsRead questasread in QuestsAsRead)
            {
                Quest q = new Quest(questasread);
                Quests.Add(q);
            }
            foreach (QuestAsRead questasread in OutcomesAsRead)
            {
                Quest q = new Quest(questasread);
                Outcomes.Add(q);
                OutcomeIDs.Add(q.UniqueID);
            }
            SetUpQuests(Conditions);
        }
        public List <Quest> CullNewlyUnavailable(AvailCond Conditions)
        {
            ParseConditions(Conditions);
            RecheckStatuses();

            List <Quest> selected = AvailableQuests.Where(item => !DetermineIfAvailable(item)).ToList();

            selected.ForEach(item => AvailableQuests.Remove(item));
            UnavailableQuests.AddRange(selected);
            return(selected);
        }
 void SetUpQuests(AvailCond Conditions)
 {
     Statuses       = new Dictionary <int, QuestStatusState>();
     GUIDToUniqueID = new Dictionary <string, int>();
     CompileTables();
     AvailableQuests   = new List <Quest>();
     UnavailableQuests = new List <Quest>();
     foreach (Quest q in Quests)
     {
         UnavailableQuests.Add(q);
     }
 }