Esempio n. 1
0
        private void EnableOrDisableCheckBoxes(List <Follower.Abilities> abilities)
        {
            if (abilities.Count == 2)
            {
                foreach (AbilityCheckBox checkBox in this.abilityCheckBoxPanel.Children)
                {
                    if (!checkBox.IsChecked)
                    {
                        checkBox.IsDisPlayed = false;
                    }
                }
            }
            else
            {
                foreach (AbilityCheckBox checkBox in this.abilityCheckBoxPanel.Children)
                {
                    checkBox.IsDisPlayed = true;
                }
            }

            this.currentClasses = new List <Follower.Classes>();
            if (abilities.Count > 0)
            {
                string classString = string.Empty;
                for (int j = 0; j < 34; j++)
                {
                    List <Follower.Abilities> classAbilities = Follower.GetAbilityFromClass((Follower.Classes)j);
                    bool isContain = true;
                    foreach (Follower.Abilities ability in abilities)
                    {
                        if (!classAbilities.Contains(ability))
                        {
                            isContain = false;
                            break;
                        }
                        else
                        {
                            classAbilities.Remove(ability);
                        }
                    }

                    if (isContain)
                    {
                        this.currentClasses.Add((Follower.Classes)j);
                        classString += Follower.GetCNStringByClass((Follower.Classes)j) + "  ";
                    }
                }
                this.classString.Text = classString;
            }
            else
            {
                this.classString.Text = "选择任意一个或者两个技能组合,查看可拥有此组合的职业天赋。";
            }
        }
Esempio n. 2
0
        public void SetFollower(Follower follower)
        {
            this.Clear();

            this.textName.Text = follower.Name;
            if (follower.Quolaty == 4)
            {
                this.textName.Foreground = Brushes.BlueViolet;
            }
            else if (follower.Quolaty == 3)
            {
                this.textName.Foreground = Brushes.DodgerBlue;
            }
            else if (follower.Quolaty == 2)
            {
                this.textName.Foreground = Brushes.Lime;
            }

            this.textRace.Text      = follower.Race.ToString();
            this.textClass.Text     = Follower.GetCNStringByClass(follower.Class);
            this.textLevel.Text     = follower.Level.ToString();
            this.textItemLevel.Text = follower.ItemLevel.ToString();
            if (follower.ItemLevel >= 645)
            {
                this.textItemLevel.Foreground = Brushes.BlueViolet;
            }
            else if (follower.ItemLevel >= 630)
            {
                this.textItemLevel.Foreground = Brushes.DodgerBlue;
            }
            else if (follower.ItemLevel >= 600)
            {
                this.textItemLevel.Foreground = Brushes.Lime;
            }
            if (!follower.IsActive)
            {
                this.textIsFrozen.Text = "已冻结";
            }

            int i = 0;

            foreach (Follower.Abilities ability in follower.AbilityCollection)
            {
                (this.abilities.Children[i] as Image).Source = Follower.GetImageFromAbility(ability);
                i++;
            }
            i = 0;
            foreach (Follower.Traits trait in follower.TraitCollection)
            {
                (this.traits.Children[i] as Image).Source = Follower.GetImageFromFromTrait(trait);
                i++;
            }
            if (follower.Quolaty < 4)
            {
                List <Follower.Abilities> ablities = Follower.GetAbilityFromClass(follower.Class);
                ablities.Remove(follower.AbilityCollection[0]);
                for (int j = 0; j < 4; j++)
                {
                    (this.possibleAblities.Children[j] as Image).Source = Follower.GetImageFromAbility(ablities[j]);
                }
            }
        }