Ejemplo n.º 1
0
 private void AddEpicFollowers(bool isFavorite = false)
 {
     if (isFavorite)
     {
         if (this.favoriteFollowers.Count == 0)
         {
             return;
         }
         for (int i = 0; i < 9; i++)
         {
             Follower.Abilities ability = (Follower.Abilities)i;
             foreach (Follower follower in this.favoriteFollowers.FindAll(x => (x.Quolaty == 4 && x.AbilityCollection[0] == ability)).OrderBy(x => x.AbilityCollection[1]))
             {
                 this.favoriteRows.Children.Add(new FollowerRow(follower, ref this.favoriteFollowers, true));
             }
         }
     }
     else
     {
         for (int i = 0; i < 9; i++)
         {
             Follower.Abilities ability = (Follower.Abilities)i;
             foreach (Follower follower in this.currentFollowers.FindAll(x => (x.Quolaty == 4 && x.AbilityCollection[0] == ability)).OrderBy(x => x.AbilityCollection[1]))
             {
                 this.followerRows.Children.Add(new FollowerRow(follower, ref this.favoriteFollowers));
             }
         }
     }
 }
Ejemplo n.º 2
0
        /// <summary>
        /// For those who have ability that does not belong its class
        /// </summary>
        /// <param name="follower"></param>
        /// <param name="ability1"></param>
        /// <param name="ability2"></param>
        /// <returns></returns>
        private bool IsContainAbility(Follower follower, Follower.Abilities ability1, Follower.Abilities ability2)
        {
            List <Follower.Abilities> list = Follower.GetAbilityFromClass(follower.Class);

            if (!follower.AbilityCollection.Contains(ability1))
            {
                return(false);
            }
            else
            {
                if (ability2 == Follower.Abilities.Error)
                {
                    return(true);
                }
                else
                {
                    return(list.Contains(ability2));
                }
            }
        }
Ejemplo n.º 3
0
        private void AddFollowersToScrollByQuolaty(List <Follower.Abilities> abilities, int quolaty)
        {
            if (abilities.Count == 1)
            {
                foreach (Follower follower in this.allFollowers)
                {
                    if (follower.Quolaty != quolaty)
                    {
                        continue;
                    }

                    if (follower.AbilityCollection.Contains(abilities[0]))
                    {
                        this.AddFollowerForMyScroll(follower, this.favorites.Contains(follower));
                    }
                }
            }
            else
            {
                foreach (Follower follower in this.allFollowers)
                {
                    if (follower.Quolaty != quolaty)
                    {
                        continue;
                    }
                    List <Follower.Abilities> abilityCollection = new List <Follower.Abilities>();
                    abilityCollection.AddRange(follower.AbilityCollection);
                    if (abilityCollection.Contains(abilities[0]))
                    {
                        abilityCollection.Remove(abilities[0]);
                        if (abilityCollection.Contains(abilities[1]))
                        {
                            this.AddFollowerForMyScroll(follower, this.favorites.Contains(follower));
                        }
                    }
                }
                // add possible followers
                if (quolaty != 4)
                {
                    foreach (Follower follower in this.allFollowers)
                    {
                        if (follower.Quolaty != quolaty)
                        {
                            continue;
                        }
                        if (follower.AbilityCollection.Contains(abilities[0]) || follower.AbilityCollection.Contains(abilities[1]))
                        {
                            Follower.Abilities        theOtherAbility  = follower.AbilityCollection.Contains(abilities[0]) ? abilities[1] : abilities[0];
                            List <Follower.Abilities> possibleAbilites = Follower.GetAbilityFromClass(follower.Class);
                            if (possibleAbilites.Contains(follower.AbilityCollection[0]))
                            {
                                possibleAbilites.Remove(follower.AbilityCollection[0]);
                            }
                            if (possibleAbilites.Contains(theOtherAbility))
                            {
                                this.AddFollowerForMyScroll(follower, this.favorites.Contains(follower));
                            }
                        }
                    }
                }
            }
        }