Пример #1
0
    public List <string> GetAppendProperty(int property_id)
    {
        ArkCrossEngine.AppendAttributeConfig aacfg = ArkCrossEngine.AppendAttributeConfigProvider.Instance.GetDataById(property_id);
        if (aacfg == null)
        {
            Debug.Log("Get append attr failed. append propertyID:" + property_id);
            return(null);
        }
        float         data     = 0.0f;
        int           level    = 1;
        List <string> attrList = new List <string>();

        //属性获取根据AppendAtt配表的顺序依次添加
        data = aacfg.GetAddHpMax1(1.0f, level);
        FormatAbsoluteAppendAttr(data, UIAppendAttrEnum.AddHpMax1, attrList);

        data = aacfg.GetAddAd1(1.0f, level);
        FormatAbsoluteAppendAttr(data, UIAppendAttrEnum.AddAd1, attrList);

        data = aacfg.GetAddCri1(1.0f, level);
        FormatAbsoluteAppendAttr(data, UIAppendAttrEnum.AddCri1, attrList);

        data = aacfg.GetAddPow1(1.0f, level);
        FormatAbsoluteAppendAttr(data, UIAppendAttrEnum.AddPow1, attrList);

        data = aacfg.GetAddBackHitPow1(1.0f, level);
        FormatAbsoluteAppendAttr(data, UIAppendAttrEnum.AddBackHitPow1, attrList);

        data = aacfg.GetAddHpMax2(1.0f, level);
        FormatPercentAppendAttr(data, UIAppendAttrEnum.AddHpMax2, attrList);

        data = aacfg.GetAddAd2(1.0f, level);
        FormatPercentAppendAttr(data, UIAppendAttrEnum.AddAd2, attrList);

        data = aacfg.GetAddADp2(1.0f, level);
        FormatPercentAppendAttr(data, UIAppendAttrEnum.AddAdp2, attrList);

        data = aacfg.GetAddMDp2(1.0f, level);
        FormatPercentAppendAttr(data, UIAppendAttrEnum.AddMdp2, attrList);

        data = aacfg.GetAddFireDam1(1.0f, level);
        FormatAbsoluteAppendAttr(data, UIAppendAttrEnum.AddFireDam1, attrList);

        data = aacfg.GetAddFireErd1(1.0f, level);
        FormatAbsoluteAppendAttr(data, UIAppendAttrEnum.AddFireErd1, attrList);
        return(attrList);
    }