Esempio n. 1
0
        public static IEnumerable <Feat> GetAllFeats()
        {
            ScrapeFeats scrape = new ScrapeFeats();

            IEnumerable <Feat>[] featsArray = new IEnumerable <Feat> [Links.Count];
            int enumerator = 0;

            foreach (var link in Links.Values)
            {
                featsArray[enumerator] = scrape.GetFeats(link, (FeatType)enumerator);
                enumerator++;
            }

            List <Feat> allFeats = new List <Feat>();

            foreach (var List in featsArray)
            {
                allFeats.AddRange(List.Where(fn => allFeats.All(fe => fe.Name != fn.Name)));
            }

            foreach (var feat in allFeats)
            {
                feat.SetPrerequisites(allFeats);
            }

            return(allFeats);
        }
Esempio n. 2
0
        public static IEnumerable <Feat> GetSpecificFeats(int?list)
        {
            if (list == null)
            {
                return(GetAllFeats());
            }

            var scrape = new ScrapeFeats();
            var feats  = scrape.GetFeats(Links.ElementAt((int)list).Value);

            foreach (var feat in feats)
            {
                feat.SetPrerequisites(feats);
            }

            return(feats);
        }