Ejemplo n.º 1
0
    private void SetDetail(int linkedId)
    {
        ChongWuJiBan chongWuJiBan = DataReader <ChongWuJiBan> .Get(linkedId);

        Transform transform = base.get_transform().FindChild("east");
        Text      component = transform.FindChild("texDetail").GetComponent <Text>();

        component.set_text(GameDataUtils.GetChineseContent(chongWuJiBan.desc, false));
        List <string> attrTexts = PetEvoGlobal.GetAttrTexts(chongWuJiBan.linkedAttrId);

        Debug.LogError("linkedId=" + linkedId);
        Debug.LogError("chongWuJiBanRow.linkedAttrId=" + chongWuJiBan.linkedAttrId);
        Debug.LogError("SetDetail=" + attrTexts.get_Count());
        Text[] array  = new Text[3];
        Text[] array2 = new Text[3];
        for (int i = 0; i < 3; i++)
        {
            array[i]  = transform.FindChild("attrKey" + (i + 1)).GetComponent <Text>();
            array2[i] = transform.FindChild("attrVal" + (i + 1)).GetComponent <Text>();
            array[i].set_text(string.Empty);
            array2[i].set_text(string.Empty);
        }
        for (int j = 0; j < attrTexts.get_Count(); j++)
        {
            string[] array3 = attrTexts.get_Item(j).Split(new char[]
            {
                ' '
            });
            array[j].set_text(array3[0]);
            array2[j].set_text(array3[1]);
        }
    }
Ejemplo n.º 2
0
    private List <string> GetAttrVals(int talentId, int talentLv)
    {
        Debug.LogError(string.Concat(new object[]
        {
            "talentId=",
            talentId,
            " talentLv=",
            talentLv
        }));
        int maxTalentLv = PetEvoGlobal.GetMaxTalentLv(talentId);

        if (talentLv == 0)
        {
            List <string> list = new List <string>();
            list.Add("无");
            return(list);
        }
        if (talentLv > maxTalentLv)
        {
            List <string> list = new List <string>();
            list.Add("已达最大等级");
            return(list);
        }
        ChongWuTianFu chongWuTianFuRow = PetEvoGlobal.GetChongWuTianFuRow(talentId);

        Debug.LogError("effect=" + chongWuTianFuRow.effect);
        if (chongWuTianFuRow.effect == 12)
        {
            string attributeId         = chongWuTianFuRow.parameter.get_Item(0) + "_" + talentLv;
            int    attributeTemplateID = PetEvoGlobal.GetTianFuShuXingRow(attributeId).attributeTemplateID;
            return(PetEvoGlobal.GetAttrTexts(attributeTemplateID));
        }
        if (chongWuTianFuRow.effect == 13)
        {
            string text = chongWuTianFuRow.parameter2.get_Item(0) + "_" + talentLv;
            Debug.LogError("attributeId=" + text);
            int attributeTemplateID2 = PetEvoGlobal.GetTianFuShuXingRow(text).attributeTemplateID;
            Debug.LogError("attributeTemplateID=" + attributeTemplateID2);
            return(PetEvoGlobal.GetAttrTexts(attributeTemplateID2));
        }
        if (chongWuTianFuRow.effect == 14)
        {
            string text2 = chongWuTianFuRow.parameter2.get_Item(0) + "_" + talentLv;
            Debug.LogError("attributeId=" + text2);
            int attributeTemplateID3 = PetEvoGlobal.GetTianFuShuXingRow(text2).attributeTemplateID;
            Debug.LogError("attributeTemplateID=" + attributeTemplateID3);
            return(PetEvoGlobal.GetAttrTexts(attributeTemplateID3));
        }
        string rowId    = chongWuTianFuRow.lvRuleId + "_" + talentLv;
        int    describe = PetEvoGlobal.GetTianFuDengJiGuiZeRow(rowId).describe;

        if (describe == 0)
        {
            List <string> list = new List <string>();
            list.Add(string.Empty);
            return(list);
        }
        string chineseContent = GameDataUtils.GetChineseContent(describe, false);

        string[] array = chineseContent.Split(new char[]
        {
            '\n'
        });
        List <string> list2 = new List <string>();

        string[] array2 = array;
        for (int i = 0; i < array2.Length; i++)
        {
            string text3 = array2[i];
            list2.Add(text3);
        }
        return(list2);
    }