Пример #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);
        }
Пример #2
0
        public void CreateSkinPrefab()
        {
            List <ConceptCardEquipEffect> equipEffects = this.mConceptCardData.EquipEffects;
            int index1 = 0;

            if (equipEffects != null)
            {
                for (int index2 = 0; index2 < equipEffects.Count; ++index2)
                {
                    ConceptCardEquipEffect effect = equipEffects[index2];
                    if (!string.IsNullOrEmpty(effect.Skin))
                    {
                        ConceptCardDetailSkin conceptCardDetailSkin;
                        if (this.Skin.Count <= index1)
                        {
                            conceptCardDetailSkin = (ConceptCardDetailSkin)Object.Instantiate <ConceptCardDetailSkin>((M0)this.SkinPrefab);
                            this.Skin.Add(conceptCardDetailSkin);
                        }
                        else
                        {
                            conceptCardDetailSkin = this.Skin[index1];
                        }
                        ((Component)conceptCardDetailSkin).get_gameObject().SetActive(true);
                        ((Component)conceptCardDetailSkin).get_transform().SetParent(((Component)this.SkinPrefab).get_transform().get_parent(), false);
                        conceptCardDetailSkin.SetEquipEffect(effect);
                        ++index1;
                    }
                }
            }
            for (int index2 = index1; index2 < this.Skin.Count; ++index2)
            {
                ((Component)this.Skin[index2]).get_gameObject().SetActive(false);
            }
        }
Пример #3
0
        public void SetSkillData(ConceptCardEquipEffect effect)
        {
            SkillData cardSkill = effect.CardSkill;

            if (cardSkill == null)
            {
                return;
            }
            this.SetText(this.mAbilityName, cardSkill.Name);
            StringBuilder stringBuilder          = new StringBuilder();
            List <BuffEffect.BuffTarget> targets = cardSkill.mTargetBuffEffect.targets;

            for (int index = 0; index < targets.Count; ++index)
            {
                BuffEffect.BuffTarget target = targets[index];
                stringBuilder.Append(effect.GetBufText(cardSkill.mTargetBuffEffect, target));
            }
            UnitGroupParam unitGroup = MonoSingleton <GameManager> .Instance.MasterParam.GetUnitGroup(cardSkill.mTargetBuffEffect.param.un_group);

            if (unitGroup != null && !string.IsNullOrEmpty(unitGroup.name))
            {
                stringBuilder.Append(LocalizedText.Get("sys.CONCEPT_CARD_SKILL_DESCRIPTION_NEW_LINE"));
                stringBuilder.Append(LocalizedText.Get("sys.CONCEPT_CARD_SKILL_DESCRIPTION_GROUP", (object)unitGroup.name, (object)unitGroup.GetGroupUnitAllNameText()));
            }
            this.SetText(this.mDescriptionText, stringBuilder.ToString());
        }
Пример #4
0
 private static void GetBonusStatus(SkillData groupSkill, ConceptCardData currentCardData, int levelCap, int awakeCountCap, int level, int awakeCount, ref BaseStatus bonusAdd, ref BaseStatus bonusScale, bool includeMaxPowerUp)
 {
     if (currentCardData.EquipEffects == null)
     {
         return;
     }
     using (List <ConceptCardEquipEffect> .Enumerator enumerator = currentCardData.EquipEffects.GetEnumerator())
     {
         while (enumerator.MoveNext())
         {
             ConceptCardEquipEffect current = enumerator.Current;
             if (current.CardSkill != null && current.CardSkill.Name == groupSkill.Name)
             {
                 current.GetAddCardSkillBuffStatusAwake(awakeCount, awakeCountCap, ref bonusAdd, ref bonusScale);
                 if (!includeMaxPowerUp || level != levelCap || awakeCount != awakeCountCap)
                 {
                     break;
                 }
                 BaseStatus total_add   = new BaseStatus();
                 BaseStatus total_scale = new BaseStatus();
                 current.GetAddCardSkillBuffStatusLvMax(level, levelCap, awakeCount, ref total_add, ref total_scale);
                 bonusAdd.Add(total_add);
                 bonusScale.Add(total_scale);
                 break;
             }
         }
     }
 }
Пример #5
0
        public static ConceptCardSkillDatailData CreateConceptCardSkillDatailData(SkillData groupSkill)
        {
            ConceptCardSkillDatailData cardSkillDatailData = (ConceptCardSkillDatailData)null;

            if (groupSkill == null)
            {
                return(cardSkillDatailData);
            }
            return(new ConceptCardSkillDatailData(ConceptCardEquipEffect.CreateFromGroupSkill(groupSkill), groupSkill, ConceptCardDetailAbility.ShowType.Skill, (LearningSkill)null));
        }
Пример #6
0
        public void SetAbilityData(ConceptCardEquipEffect effect)
        {
            AbilityData ability = effect.Ability;

            if (ability == null)
            {
                return;
            }
            this.SetText(this.mAbilityName, ability.Param.name);
            this.SetText(this.mDescriptionText, ability.Param.expr);
        }
Пример #7
0
 private void UpdateEquipEffect()
 {
     this.mEquipEffects = (List <ConceptCardEquipEffect>)null;
     if (this.mConceptCardParam.effects != null && this.mConceptCardParam.effects.Length > 0)
     {
         this.mEquipEffects = new List <ConceptCardEquipEffect>();
         for (int index = 0; index < this.mConceptCardParam.effects.Length; ++index)
         {
             ConceptCardEquipEffect conceptCardEquipEffect = new ConceptCardEquipEffect();
             conceptCardEquipEffect.Setup(this.mConceptCardParam.effects[index], (int)this.Lv, (int)this.LvCap, (int)this.AwakeCount, this.AwakeCountCap);
             this.mEquipEffects.Add(conceptCardEquipEffect);
         }
     }
     this.UpdateStatus(ref this.mFixStatus, ref this.mScaleSatus);
 }
Пример #8
0
        public List <ConceptCardEquipEffect> GetCardSkills()
        {
            List <ConceptCardEquipEffect> conceptCardEquipEffectList = new List <ConceptCardEquipEffect>();

            if (this.mEquipEffects == null)
            {
                return(conceptCardEquipEffectList);
            }
            for (int index = 0; index < this.mEquipEffects.Count; ++index)
            {
                ConceptCardEquipEffect mEquipEffect = this.mEquipEffects[index];
                if (mEquipEffect.CardSkill != null)
                {
                    conceptCardEquipEffectList.Add(mEquipEffect);
                }
            }
            return(conceptCardEquipEffectList);
        }
Пример #9
0
 public void SetEquipEffect(ConceptCardEquipEffect effect)
 {
     this.mConceptCardEquipEffect = effect;
 }