/// <summary>星级加成</summary> private static LTAttributesData GetPartnerStarNewAttributes(LTAttributesData baseAttr, int heroStatId, int star) { LTAttributesData attrData = new LTAttributesData();; Hotfix_LT.Data.HeroStatTemplate heroTem = Hotfix_LT.Data.CharacterTemplateManager.Instance.GetHeroStat(heroStatId); if (heroTem != null) { Hotfix_LT.Data.StarUpInfoTemplate tpl = Hotfix_LT.Data.CharacterTemplateManager.Instance.GetStarUpInfo(star); if (tpl != null) { attrData.m_MaxHP = baseAttr.m_MaxHP * (tpl.IncMaxHp - 1); attrData.m_ATK = baseAttr.m_ATK * (tpl.IncATK - 1); attrData.m_DEF = baseAttr.m_DEF * (tpl.IncDEF - 1); } } return(attrData); }
public void SetInfo(int curstar, int buffid = 0) { if (curstar >= star) { colorStr = LT.Hotfix.Utility.ColorUtility.GreenColorHexadecimal; isGottip.gameObject.CustomSetActive(false); } else { isGottip.gameObject.CustomSetActive(true); colorStr = LT.Hotfix.Utility.ColorUtility.GrayColorHexadecimal; } Hotfix_LT.Data.StarUpInfoTemplate curTpl = Hotfix_LT.Data.CharacterTemplateManager.Instance.GetStarUpInfo(this.star - 1); Hotfix_LT.Data.StarUpInfoTemplate tpl = Hotfix_LT.Data.CharacterTemplateManager.Instance.GetStarUpInfo(this.star);//获得下一个星级数据 if (curTpl != null && tpl != null) { desStr = string.Format(EB.Localizer.GetString("ID_PARTNER_STARUP_TIP5"), colorStr, ((tpl.IncATK - curTpl.IncATK) * 100).ToString("f0"), ((tpl.IncMaxHp - curTpl.IncMaxHp) * 100).ToString("f0"), ((tpl.IncDEF - curTpl.IncDEF) * 100).ToString("f0")); } switch (this.star) { case 2: case 3: profitDes.text = profitDes.transform.GetChild(0).GetComponent <UILabel>().text = desStr; break; case 4: profitDes.text = profitDes.transform.GetChild(0).GetComponent <UILabel>().text = string.Format("{0}\n{1}", desStr, EB.Localizer.GetString("ID_PARTNER_STARUP_TIP6")); break; case 5: case 6: buff = SkillTemplateManager.Instance.GetTemplate(buffid); if (buff != null) { profitDes.text = profitDes.transform.GetChild(0).GetComponent <UILabel>().text = string.Format("{0}\n【{1}】 {2}", desStr, buff.Name, buff.Description); } break; default: break; } title.text = string.Format(EB.Localizer.GetString("ID_PARTNER_STARUP_TIP3"), this.star); }