Exemplo n.º 1
0
        public static List <ConceptCardSkillDatailData> CreateConceptCardSkillDatailData(AbilityData abilityData)
        {
            List <ConceptCardSkillDatailData> cardSkillDatailDataList = new List <ConceptCardSkillDatailData>();

            if (abilityData == null)
            {
                return(cardSkillDatailDataList);
            }
            ConceptCardEquipEffect fromAbility = ConceptCardEquipEffect.CreateFromAbility(abilityData);

            for (int index = 0; index < abilityData.LearningSkills.Length; ++index)
            {
                LearningSkill learning_skill = abilityData.LearningSkills[index];
                if (learning_skill != null)
                {
                    ConceptCardDetailAbility.ShowType _type = ConceptCardDetailAbility.ShowType.Ability;
                    SkillData data = abilityData.Skills.Find((Predicate <SkillData>)(x => x.SkillParam.iname == learning_skill.iname));
                    if (data == null)
                    {
                        SkillParam skillParam = MonoSingleton <GameManager> .Instance.MasterParam.GetSkillParam(learning_skill.iname);

                        data = new SkillData();
                        data.Setup(skillParam.iname, 1, 1, (MasterParam)null);
                        _type = ConceptCardDetailAbility.ShowType.LockSkill;
                    }
                    if (cardSkillDatailDataList.FindIndex((Predicate <ConceptCardSkillDatailData>)(abi => abi.skill_data.SkillParam.iname == data.SkillParam.iname)) <= -1)
                    {
                        cardSkillDatailDataList.Add(new ConceptCardSkillDatailData(fromAbility, data, _type, learning_skill));
                    }
                }
            }
            return(cardSkillDatailDataList);
        }
Exemplo n.º 2
0
        public List <ConceptCardSkillDatailData> GetAbilityDatailData()
        {
            List <ConceptCardSkillDatailData> cardSkillDatailDataList = new List <ConceptCardSkillDatailData>();
            List <ConceptCardEquipEffect>     abilities  = this.GetAbilities();
            List <ConceptCardEquipEffect>     cardSkills = this.GetCardSkills();

            for (int index = 0; index < cardSkills.Count; ++index)
            {
                SkillData skill = cardSkills[index].CardSkill;
                if (skill != null && cardSkillDatailDataList.FindIndex((Predicate <ConceptCardSkillDatailData>)(abi => abi.skill_data.SkillParam.iname == skill.SkillParam.iname)) <= -1)
                {
                    cardSkillDatailDataList.Add(new ConceptCardSkillDatailData(cardSkills[index], skill, ConceptCardDetailAbility.ShowType.Skill, (LearningSkill)null));
                }
            }
            for (int index1 = 0; index1 < abilities.Count; ++index1)
            {
                AbilityData ability = abilities[index1].Ability;
                if (ability != null)
                {
                    for (int index2 = 0; index2 < ability.LearningSkills.Length; ++index2)
                    {
                        LearningSkill learning_skill = ability.LearningSkills[index2];
                        if (learning_skill != null)
                        {
                            ConceptCardDetailAbility.ShowType _type = ConceptCardDetailAbility.ShowType.Ability;
                            SkillData data = ability.Skills.Find((Predicate <SkillData>)(x => x.SkillParam.iname == learning_skill.iname));
                            if (data == null)
                            {
                                SkillParam skillParam = MonoSingleton <GameManager> .Instance.MasterParam.GetSkillParam(learning_skill.iname);

                                data = new SkillData();
                                data.Setup(skillParam.iname, 1, 1, (MasterParam)null);
                                _type = ConceptCardDetailAbility.ShowType.LockSkill;
                            }
                            if (cardSkillDatailDataList.FindIndex((Predicate <ConceptCardSkillDatailData>)(abi => abi.skill_data.SkillParam.iname == data.SkillParam.iname)) <= -1)
                            {
                                cardSkillDatailDataList.Add(new ConceptCardSkillDatailData(abilities[index1], data, _type, learning_skill));
                            }
                        }
                    }
                }
            }
            return(cardSkillDatailDataList);
        }