Beispiel #1
0
    private void SetSkillDesc(int cellIndex, int skillId)
    {
        Transform         child                = base.get_transform().GetChild(cellIndex);
        int               skillLv              = PetEvoGlobal.GetSkillLv(PetBasicUIViewModel.PetID, skillId);
        int               num                  = skillLv + 1;
        ChongWuTianFu     chongWuTianFuRow     = PetEvoGlobal.GetChongWuTianFuRow(skillId);
        string            rowId                = chongWuTianFuRow.lvRuleId + "_" + skillLv;
        TianFuDengJiGuiZe tianFuDengJiGuiZeRow = PetEvoGlobal.GetTianFuDengJiGuiZeRow(rowId);

        if (tianFuDengJiGuiZeRow != null)
        {
            int num2 = 0;
            if (tianFuDengJiGuiZeRow.describeValue.get_Count() > 0)
            {
                num2 = (int)tianFuDengJiGuiZeRow.describeValue.get_Item(0);
            }
            if (chongWuTianFuRow.describe != 0)
            {
                string chineseContent = GameDataUtils.GetChineseContent(chongWuTianFuRow.describe, false);
                child.FindChild("texSkillDescCurr").GetComponent <Text>().set_text(string.Format(chineseContent, num2));
            }
            if (PetEvoGlobal.IsMaxSkillLv(skillId, skillLv))
            {
                child.FindChild("texSkillDescNext").GetComponent <Text>().set_text("该技能已提升到满级");
            }
            else
            {
                string            rowId2 = chongWuTianFuRow.lvRuleId + "_" + num;
                TianFuDengJiGuiZe tianFuDengJiGuiZeRow2 = PetEvoGlobal.GetTianFuDengJiGuiZeRow(rowId2);
                string            chineseContent2       = GameDataUtils.GetChineseContent(500110, false);
                int num3 = 0;
                if (tianFuDengJiGuiZeRow2.describeValue.get_Count() > 0)
                {
                    num3 = (int)tianFuDengJiGuiZeRow2.describeValue.get_Item(0);
                }
                child.FindChild("texSkillDescNext").GetComponent <Text>().set_text(string.Format(chineseContent2, num2, num3));
            }
        }
        else
        {
            rowId = chongWuTianFuRow.lvRuleId + "_" + 1;
            tianFuDengJiGuiZeRow = PetEvoGlobal.GetTianFuDengJiGuiZeRow(rowId);
            int num4 = 0;
            if (tianFuDengJiGuiZeRow != null && tianFuDengJiGuiZeRow.describeValue.get_Count() > 0)
            {
                num4 = (int)tianFuDengJiGuiZeRow.describeValue.get_Item(0);
            }
            if (chongWuTianFuRow.describe != 0)
            {
                string chineseContent3 = GameDataUtils.GetChineseContent(chongWuTianFuRow.describe, false);
                child.FindChild("texSkillDescCurr").GetComponent <Text>().set_text(string.Format(chineseContent3, num4));
            }
            child.FindChild("texSkillDescNext").GetComponent <Text>().set_text("该技能已提升到满级");
        }
    }
Beispiel #2
0
    public void Init(int talentId)
    {
        int           skillLv          = PetEvoGlobal.GetSkillLv(PetBasicUIViewModel.PetID, talentId);
        int           num              = skillLv + 1;
        Text          component        = base.get_transform().FindChild("texName").GetComponent <Text>();
        Text          component2       = base.get_transform().FindChild("texLv").GetComponent <Text>();
        Text          component3       = base.get_transform().FindChild("texDesc").GetComponent <Text>();
        Text          component4       = base.get_transform().FindChild("texLvNext").GetComponent <Text>();
        Text          component5       = base.get_transform().FindChild("texDescNext").GetComponent <Text>();
        ChongWuTianFu chongWuTianFuRow = PetEvoGlobal.GetChongWuTianFuRow(talentId);
        int           describe         = chongWuTianFuRow.describe;
        string        chineseContent   = GameDataUtils.GetChineseContent(describe, false);
        string        rowId            = chongWuTianFuRow.lvRuleId + "_" + skillLv;
        List <float>  describeValue    = PetEvoGlobal.GetTianFuDengJiGuiZeRow(rowId).describeValue;

        component.set_text(PetEvoGlobal.GetName(talentId));
        component2.set_text("当前");
        if (describe != 0)
        {
            component3.set_text(this.ReplaceDesc(chineseContent, describeValue));
        }
        else
        {
            component3.set_text(string.Empty);
        }
        if (PetEvoGlobal.IsMaxSkillLv(talentId, skillLv))
        {
            component4.set_text("该技能已提升到满级");
            component5.set_text(string.Empty);
        }
        else
        {
            component4.set_text("下一级");
            string rowId2 = chongWuTianFuRow.lvRuleId + "_" + num;
            describeValue = PetEvoGlobal.GetTianFuDengJiGuiZeRow(rowId2).describeValue;
            if (describe != 0)
            {
                component5.set_text(this.ReplaceDesc(chineseContent, describeValue));
            }
            else
            {
                component5.set_text(string.Empty);
            }
        }
    }
Beispiel #3
0
    protected override void SetOneSkill(int cellIndex, int talentId, int talentLv, int nextTalentLv)
    {
        Transform child = base.get_transform().GetChild(cellIndex);

        child.FindChild("texName").GetComponent <Text>().set_text(PetEvoGlobal.GetName(talentId));
        child.FindChild("texLv").GetComponent <Text>().set_text("Lv" + talentLv);
        if (PetEvoGlobal.GetOnePet(PetBasicUIViewModel.PetID) == null)
        {
            base.Locked(child, talentId);
        }
        else if (PetEvoGlobal.IsMaxSkillLv(talentId, talentLv))
        {
            base.MaxLv(child);
        }
        else if (PetEvoGlobal.IsSkillCanLvUp(PetBasicUIViewModel.PetID, talentId, nextTalentLv))
        {
            base.CanLvUp(child, talentId, nextTalentLv);
        }
        else
        {
            base.CanNotLvUp(child, talentId, nextTalentLv);
        }
        this.SetSkillDesc(cellIndex, talentId);
    }
Beispiel #4
0
 private static bool IsOneSkillCanLvUp(int petId, int talentId, int talentLv, int nextTalentLv)
 {
     return(!PetEvoGlobal.IsMaxSkillLv(talentId, talentLv) && PetEvoGlobal.IsSkillCanLvUp(petId, talentId, nextTalentLv) && PetManager.Instance.GetSkillPoint() > 0);
 }