Exemple #1
0
        public static IEnumerable <KeyValuePair <string, Item> > GetSurvivorList(this IQueryProfile qp)
        {
            var dt = qp.profileChanges.First().profile.items
                     .Where(p => p.Value.templateId.IndexOf("Worker:") > -1);

            return(dt);
        }
Exemple #2
0
        public static int AmountOfMythicSchematics(this IQueryProfile qp)
        {
            var mythic_schematics = qp.profileChanges.First().profile.items
                                    .Where(p => p.Value.templateId.IsMythicSchematic())
                                    .Select(f => f.Value.templateId)
                                    .Count();

            return(mythic_schematics);
        }
Exemple #3
0
        public static Task <int> CalcResearchFORTs(this IQueryProfile qp)
        {
            return(Task.Run(() =>
            {
                var rsrsc = qp.profileChanges.First().profile.items
                            .Where(p => p.Value.templateId.IndexOf("Stat:") > -1 && p.Value.templateId.IndexOf("_phoenix") == -1);
                var rsrcgrp = rsrsc.GroupBy(f => f.Value.templateId.ToResearchUniqueName());

                var totalResource = rsrcgrp.Sum(f => f.Sum(x => x.Value.quantity));
                return totalResource;
            }));
        }
Exemple #4
0
        public static bool DoneEliteFrostnite2019(this IQueryProfile qp)
        {
            var elite_frostnite_mission = qp.profileChanges.First().profile.items
                                          .FirstOrDefault(p => p.Value.templateId.IsEliteFrostineMission2019());

            if (elite_frostnite_mission.Value == null)
            {
                return(false);
            }
            else
            {
                return(elite_frostnite_mission.Value.attributes.completion_s11_holdfastquest_seasonelite_knight > 0);
            }
        }
Exemple #5
0
        public static Task <IEnumerable <IGrouping <string, ISurvivorX> > > GetSurvivors(this IQueryProfile qp)
        {
            return(Task.Run(() =>
            {
                var dt = qp.GetSurvivorList()
                         .Where(p => p.Value.attributes.squad_id != "");

                List <ISurvivorX> survivors = new List <ISurvivorX>();
                foreach (var survivor in dt)
                {
                    ISurvivorX newSv = new SurvivorX
                    {
                        Name = Model.Responses.QueryProfile.Extension.GetItemName(survivor.Value.templateId).Result,
                        Tier = survivor.Value.templateId.GetItemTier(),
                        Level = (byte)survivor.Value.attributes.level,
                        SlotId = (byte)survivor.Value.attributes.squad_slot_idx
                    };
                    newSv.Rarity = Model.Responses.QueryProfile.Extension.GetSurvivorRarity(newSv.SlotId, newSv.Name,
                                                                                            survivor.Value.templateId.GetItemType());
                    newSv.SquadId = survivor.Value.attributes.squad_id;

                    newSv.IsLeaderAppropriate = Core.Utils.IsLeaderAppropriate(newSv.SquadId, survivor.Value.templateId);
                    newSv.Personality = survivor.Value.attributes.personality;
                    newSv.SetBonus = survivor.Value.attributes.set_bonus;
                    survivors.Add(newSv);
                }
                return survivors.GroupBy(f => f.SquadId);
            }));
        }