Пример #1
0
        /// <summary>进阶数值</summary>
        private static LTAttributesData GetPartnerGradeAttributes(int heroStatId, int gradeId)
        {
            LTAttributesData attrData = new LTAttributesData();

            Hotfix_LT.Data.HeroStatTemplate heroTem = Hotfix_LT.Data.CharacterTemplateManager.Instance.GetHeroStat(heroStatId);
            if (heroTem != null)
            {
                Hotfix_LT.Data.HeroInfoTemplate heroInfoTpl = Hotfix_LT.Data.CharacterTemplateManager.Instance.GetHeroInfo(heroTem.character_id);
                if (heroInfoTpl == null)
                {
                    EB.Debug.LogError("伙伴信息为空,Characterid = {0}", heroTem.character_id);
                    return(attrData);
                }
                Hotfix_LT.Data.UpGradeInfoTemplate gradeInfoByGrade = Hotfix_LT.Data.CharacterTemplateManager.Instance.GetUpGradeInfo(gradeId, heroInfoTpl.char_type);
                if (gradeInfoByGrade == null)
                {
                    EB.Debug.LogError("gradeInfoByGrade升阶信息为空,gradeid = {0}", gradeId);
                    return(attrData);
                }
                Hotfix_LT.Data.LevelUpInfoTemplate BaseAttr = Hotfix_LT.Data.CharacterTemplateManager.Instance.GetLevelUpInfoByIDAndLevel(heroStatId, gradeInfoByGrade.level);
                if (gradeInfoByGrade != null)
                {
                    attrData.m_MaxHP = BaseAttr.maxHP * gradeInfoByGrade.inc_maxhp;
                    attrData.m_ATK   = BaseAttr.ATK * gradeInfoByGrade.inc_atk;
                    attrData.m_DEF   = BaseAttr.DEF * gradeInfoByGrade.inc_def;
                    attrData.m_Speed = BaseAttr.speed * gradeInfoByGrade.inc_speed;
                }
            }

            return(attrData);
        }
Пример #2
0
        /// <summary>获取基础白字的固定值</summary>
        private static LTAttributesData GetPartnerBaseAttr(int heroStatId, int heroUpgradeId, int star, int starHole, int heroLevel, int AllRoundLevel, int ControlLevel, int StrongLevel, int RageLevel, int AbsorbedLevel, int awakenLevel, int infoId)
        {
            //********基础白字计算*********
            //[角色成长数值 + 觉醒固定值(只有速度需要计算) + 进阶数值 + 星槽数值 + 潜能固定值(只有速度需要计算)]
            //*****************************
            //加算在此
            LTAttributesData baseAttrData = new LTAttributesData();

            Hotfix_LT.Data.LevelUpInfoTemplate baseAttrInfo = Hotfix_LT.Data.CharacterTemplateManager.Instance.GetLevelUpInfoByIDAndLevel(heroStatId, heroLevel);

            //角色成长数值
            baseAttrData.m_MaxHP   = baseAttrInfo.maxHP;
            baseAttrData.m_ATK     = baseAttrInfo.ATK;
            baseAttrData.m_DEF     = baseAttrInfo.DEF;
            baseAttrData.m_CritP   = baseAttrInfo.CritP;
            baseAttrData.m_CritV   = baseAttrInfo.CritV;
            baseAttrData.m_SpExtra = baseAttrInfo.SpExtra;
            baseAttrData.m_SpRes   = baseAttrInfo.SpRes;
            baseAttrData.m_Speed   = baseAttrInfo.speed;

            //觉醒固定值
            LTAttributesData awakeAttr = GetPartnerAwakenCentainAttributes(awakenLevel, infoId);

            baseAttrData.Add(awakeAttr);

            //进阶数值
            LTAttributesData gradeAttr = GetPartnerGradeAttributes(heroStatId, heroUpgradeId);

            baseAttrData.Add(gradeAttr);

            //星槽数值
            LTAttributesData holeAttr = GetPartnerHoleAttributes(heroStatId, star, starHole);

            baseAttrData.Add(holeAttr);

            //潜能固定值
            LTAttributesData proficiencyAttr = GetProficiencyAddAttributes(AllRoundLevel, ControlLevel, StrongLevel, RageLevel, AbsorbedLevel);

            baseAttrData.Add(proficiencyAttr);

            return(baseAttrData);
        }