Exemple #1
0
        /// <summary>[伙伴最终白字属性] - 仅计算自己伙伴,其他玩家伙伴通过LTFormationDataMnager.HandleOtherPlayerAttribute</summary>
        public static LTAttributesData GetPartnerAttributesByParnterData(LTPartnerData partnerData, int heroLv = -1)
        {
            //********伙伴最终白字计算*********
            //伙伴最终白字属性 = 图鉴固定值(只有攻防血需要计算)) + 伙伴基础白字属性  * [军团加成% + 图鉴加成% + 晋升%]
            //*****************************
            LTAttributesData baseAttrData = GetPartnerBaseAttributesByParnterData(partnerData.HeroStat.id, partnerData.UpGradeId, partnerData.Star, partnerData.StarHole, (heroLv > 0 ? heroLv : partnerData.Level), partnerData.AllRoundLevel, partnerData.ControlLevel, partnerData.StrongLevel, partnerData.RageLevel, partnerData.AbsorbedLevel, partnerData.IsAwaken, partnerData.InfoId, LTPartnerDataManager.Instance.GetGuardHash(partnerData.HeroId), partnerData.CommonSkillLevel, partnerData.ActiveSkillLevel, partnerData.PassiveSkillLevel);

            LTAttributesData totalAttrData = new LTAttributesData(baseAttrData);
            LTAttributesData tempAttrData  = new LTAttributesData();

            //图鉴固定值
            LTAttributesData handbookAttr = GetPartnerAHandbookAttributes(LTPartnerHandbookManager.Instance.GetHandBookLevel());

            totalAttrData.Add(handbookAttr);

            //军团加成
            tempAttrData = GetPartnerLegionAttributes(baseAttrData, partnerData);
            totalAttrData.Add(tempAttrData);

            //图鉴加成
            tempAttrData = GetPartnerHandBookAttributes(baseAttrData, partnerData);
            totalAttrData.Add(tempAttrData);

            //晋升固定值及百分比
            tempAttrData = GetPartnerPromotionAttributes(partnerData);
            totalAttrData.Add(tempAttrData);
            totalAttrData.SpecialAdd(baseAttrData, tempAttrData);

            return(totalAttrData);
        }
Exemple #2
0
        /// <summary>技能加成</summary>
        private static LTAttributesData GetPartnerSkillAttributes(LTAttributesData baseAttr, int heroStatId, int commonSkillLevel, int activeSkillLevel, int passiveSkillLevel)
        {
            LTAttributesData attrData = new LTAttributesData();

            Hotfix_LT.Data.HeroStatTemplate heroTem = Hotfix_LT.Data.CharacterTemplateManager.Instance.GetHeroStat(heroStatId);
            if (heroTem != null)
            {
                LTAttributesData attr1 = GetSkillAttr(baseAttr, heroTem.common_skill, commonSkillLevel);
                attrData.Add(attr1);
                LTAttributesData attr2 = GetSkillAttr(baseAttr, heroTem.active_skill, activeSkillLevel);
                attrData.Add(attr2);
                LTAttributesData attr3 = GetSkillAttr(baseAttr, heroTem.passive_skill, passiveSkillLevel);
                attrData.Add(attr3);
            }
            return(attrData);
        }
Exemple #3
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);
        }
Exemple #4
0
        /// <summary>
        /// 获取晋升加成
        /// </summary>
        private static LTAttributesData GetPartnerPromotionAttributes(LTPartnerData partnerData)
        {
            LTAttributesData attrData = new LTAttributesData();
            var attrList = LTPromotionManager.Instance.GetAttrList();

            for (int i = 0; i < attrList.Count; ++i)
            {
                float value = LTPromotionManager.Instance.GetCurrentAttrLevel(attrList[i].id) * attrList[i].attrValue;
                attrData.Add(attrList[i].name, value);
            }
            return(attrData);
        }
Exemple #5
0
        /// <summary>获取最终属性</summary>
        private static LTAttributesData GetPartnerAllAttributesByParnterData(LTPartnerData partnerData)
        {
            //最终白字属性
            LTAttributesData attrData = GetPartnerAttributesByParnterData(partnerData);
            //基础白字属性
            LTAttributesData baseData = AttributesUtil.GetBaseAttributes(partnerData);
            //绿字属性
            LTAttributesData equipData = GetPartnerEquipmentAttributes(baseData, partnerData.EquipmentTotleAttr);

            attrData.Add(equipData);

            return(attrData);
        }
Exemple #6
0
        /// <summary>[伙伴基础白字属性]</summary>
        public static LTAttributesData GetPartnerBaseAttributesByParnterData(int heroStatId, int heroUpgradeId, int star, int starHole, int heroLevel, int AllRoundLevel, int ControlLevel, int StrongLevel, int RageLevel, int AbsorbedLevel, int AwakenLevel, int infoId, IDictionary fetter, int commonSkillLevel, int activeSkillLevel, int passiveSkillLevel)
        {
            //********最终白字计算*********
            //伙伴基础白字属性 = [角色成长数值 + 觉醒固定值(只有速度需要计算) + 进阶数值 + 星槽数值 + 潜能固定值(只有速度需要计算)] * [星级加成% + 技能加成% + 巅峰加成% + 觉醒加成% + 羁绊加成%]
            //*****************************
            LTAttributesData baseAttrData = AttributesManager.GetPartnerBaseAttr(heroStatId, heroUpgradeId, star, starHole, heroLevel,
                                                                                 AllRoundLevel, ControlLevel, StrongLevel, RageLevel, AbsorbedLevel,
                                                                                 AwakenLevel, infoId);

            LTAttributesData totalAttrData = new LTAttributesData(baseAttrData);
            LTAttributesData tempAttrData  = new LTAttributesData();

            //星级加成
            tempAttrData = GetPartnerStarNewAttributes(baseAttrData, heroStatId, star);
            totalAttrData.Add(tempAttrData);

            //技能加成
            tempAttrData = GetPartnerSkillAttributes(baseAttrData, heroStatId, commonSkillLevel, activeSkillLevel, passiveSkillLevel);
            totalAttrData.Add(tempAttrData);

            //巅峰加成
            tempAttrData = GetProficiencyMultiAttributes(AllRoundLevel, ControlLevel, StrongLevel, RageLevel, AbsorbedLevel, baseAttrData);
            totalAttrData.Add(tempAttrData);

            //觉醒加成
            tempAttrData = GetPartnerShowAwakenAttributes(baseAttrData, infoId, AwakenLevel > 0);
            totalAttrData.Add(tempAttrData);

            //羁绊加成
            if (fetter != null)
            {
                tempAttrData = GetOtherPartnerGuardAttributes(baseAttrData, fetter);
                totalAttrData.Add(tempAttrData);
            }
            return(totalAttrData);
        }
Exemple #7
0
        private void ShowAttr()
        {
            LTAttributesData curAttrData  = AttributesManager.GetPartnerAttributesByParnterData(partnerData);
            LTAttributesData baseAttrData = AttributesUtil.GetBaseAttributes(partnerData);
            LTAttributesData equipData    = AttributesManager.GetPartnerEquipmentAttributes(baseAttrData, partnerData.EquipmentTotleAttr);

            curAttrData.Add(equipData);

            AttrNumLabels[0].text = Mathf.FloorToInt(curAttrData.m_ATK).ToString();

            AttrNumLabels[1].text = Mathf.FloorToInt(curAttrData.m_DEF).ToString();

            AttrNumLabels[2].text = Mathf.FloorToInt(curAttrData.m_MaxHP).ToString();

            float num = curAttrData.m_CritP * 100;

            AttrNumLabels[3].text = string.Format("{0}%", num.ToString("f1"));

            num = curAttrData.m_CritV * 100;
            AttrNumLabels[4].text = string.Format("{0}%", num.ToString("f1"));

            AttrNumLabels[5].text = Mathf.FloorToInt(curAttrData.m_Speed).ToString();

            num = curAttrData.m_SpExtra * 100;
            AttrNumLabels[6].text = string.Format("{0}%", num.ToString("f1"));

            num = curAttrData.m_SpRes * 100;
            AttrNumLabels[7].text = string.Format("{0}%", num.ToString("f1"));

            num = curAttrData.m_DamageAdd * 100;
            AttrNumLabels[8].text = string.Format("{0}%", num.ToString("f1"));

            num = curAttrData.m_DamageReduce * 100;
            AttrNumLabels[9].text = string.Format("{0}%", num.ToString("f1"));

            num = curAttrData.m_CritDef * 100;
            AttrNumLabels[10].text = string.Format("{0}%", num.ToString("f1"));
        }