public static float CalculateAppendAttrFightingScore(CharacterInfo obj, int appendAttrId)
        {
            AppendAttributeConfig info = AppendAttributeConfigProvider.Instance.GetDataById(appendAttrId);

            if (null != info)
            {
                float aMoveSpeed          = obj.GetActualProperty().MoveSpeed;
                int   aHpMax              = obj.GetActualProperty().HpMax;
                int   aEnergyMax          = obj.GetActualProperty().EnergyMax;
                float aHpRecover          = obj.GetActualProperty().HpRecover;
                float aEnergyRecover      = obj.GetActualProperty().EnergyRecover;
                int   aAttackBase         = obj.GetActualProperty().AttackBase;
                int   aADefenceBase       = obj.GetActualProperty().ADefenceBase;
                int   aMDefenceBase       = obj.GetActualProperty().MDefenceBase;
                float aCritical           = obj.GetActualProperty().Critical;
                float aCriticalPow        = obj.GetActualProperty().CriticalPow;
                float aCriticalBackHitPow = obj.GetActualProperty().CriticalBackHitPow;
                float aCriticalCrackPow   = obj.GetActualProperty().CriticalCrackPow;
                float aFireDamage         = obj.GetActualProperty().FireDamage;
                float aFireERD            = obj.GetActualProperty().FireERD;
                float aIceDamage          = obj.GetActualProperty().IceDamage;
                float aIceERD             = obj.GetActualProperty().IceERD;
                float aPoisonDamage       = obj.GetActualProperty().PoisonDamage;
                float aPoisonERD          = obj.GetActualProperty().PoisonERD;
                float aWeight             = obj.GetActualProperty().Weight;
                float aRps         = obj.GetActualProperty().Rps;
                float aAttackRange = obj.GetActualProperty().AttackRange;
                aMoveSpeed          = info.GetAddSpd(aMoveSpeed, obj.GetLevel());
                aHpMax              = (int)info.GetAddHpMax(aHpMax, obj.GetLevel());
                aEnergyMax          = (int)info.GetAddEpMax(aEnergyMax, obj.GetLevel());
                aHpRecover          = info.GetAddHpRecover(aHpRecover, obj.GetLevel());
                aEnergyRecover      = info.GetAddEpRecover(aEnergyRecover, obj.GetLevel());
                aAttackBase         = (int)info.GetAddAd(aAttackBase, obj.GetLevel());
                aADefenceBase       = (int)info.GetAddADp(aADefenceBase, obj.GetLevel());
                aMDefenceBase       = (int)info.GetAddMDp(aMDefenceBase, obj.GetLevel());
                aCritical           = info.GetAddCri(aCritical, obj.GetLevel());
                aCriticalPow        = info.GetAddPow(aCriticalPow, obj.GetLevel());
                aCriticalBackHitPow = info.GetAddBackHitPow(aCriticalBackHitPow, obj.GetLevel());
                aCriticalCrackPow   = info.GetAddCrackPow(aCriticalCrackPow, obj.GetLevel());
                aFireDamage         = info.GetAddFireDam(aFireDamage, obj.GetLevel());
                aFireERD            = info.GetAddFireErd(aFireERD, obj.GetLevel());
                aIceDamage          = info.GetAddIceDam(aIceDamage, obj.GetLevel());
                aIceERD             = info.GetAddIceErd(aIceERD, obj.GetLevel());
                aPoisonDamage       = info.GetAddPoisonDam(aPoisonDamage, obj.GetLevel());
                aPoisonERD          = info.GetAddPoisonErd(aPoisonERD, obj.GetLevel());
                aWeight             = info.GetAddWeight(aWeight, obj.GetLevel());
                aRps         = info.GetAddRps(aRps, obj.GetLevel());
                aAttackRange = info.GetAddAttackRange(aAttackRange, obj.GetLevel());
                return(AttributeScoreConfigProvider.Instance.CalcAttributeScore(aHpMax, aEnergyMax, aAttackBase,
                                                                                aADefenceBase, aMDefenceBase, aCritical, aCriticalPow, aCriticalBackHitPow, aCriticalCrackPow,
                                                                                aFireDamage, aIceDamage, aPoisonDamage, aFireERD, aIceERD, aPoisonERD));
            }
            else
            {
                return(0.0f);
            }
        }
Пример #2
0
    private float GetItemFightScore(ArkCrossEngine.ItemConfig itemconfig, int propertyid, int itemlevel)
    {
        ArkCrossEngine.RoleInfo ri = ArkCrossEngine.LobbyClient.Instance.CurrentRole;
        CharacterProperty       cp = ri.GetPlayerSelfInfo().GetActualProperty();

        if (itemconfig != null && ri != null && cp != null)
        {
            ArkCrossEngine.AppendAttributeConfig aac = ArkCrossEngine.AppendAttributeConfigProvider.Instance.GetDataById(propertyid);
            if (aac == null)
            {
                return(ArkCrossEngine.AttributeScoreConfigProvider.Instance.CalcAttributeScore(
                           itemconfig.m_AttrData.GetAddHpMax(cp.HpMax, ri.Level, itemlevel), itemconfig.m_AttrData.GetAddEpMax(cp.EnergyMax, ri.Level, itemlevel),
                           itemconfig.m_AttrData.GetAddAd(cp.AttackBase, ri.Level, itemlevel), itemconfig.m_AttrData.GetAddADp(cp.ADefenceBase, ri.Level, itemlevel),
                           itemconfig.m_AttrData.GetAddMDp(cp.MDefenceBase, ri.Level, itemlevel), itemconfig.m_AttrData.GetAddCri(cp.Critical, ri.Level),
                           itemconfig.m_AttrData.GetAddPow(cp.CriticalPow, ri.Level), itemconfig.m_AttrData.GetAddBackHitPow(cp.CriticalBackHitPow, ri.Level),
                           itemconfig.m_AttrData.GetAddCrackPow(cp.CriticalCrackPow, ri.Level), itemconfig.m_AttrData.GetAddFireDam(cp.FireDamage, ri.Level),
                           itemconfig.m_AttrData.GetAddIceDam(cp.IceDamage, ri.Level), itemconfig.m_AttrData.GetAddPoisonDam(cp.PoisonDamage, 1),
                           itemconfig.m_AttrData.GetAddFireErd(cp.FireERD, ri.Level), itemconfig.m_AttrData.GetAddIceErd(cp.IceERD, ri.Level),
                           itemconfig.m_AttrData.GetAddPoisonErd(cp.PoisonERD, ri.Level)));
            }
            else
            {
                return(ArkCrossEngine.AttributeScoreConfigProvider.Instance.CalcAttributeScore(
                           itemconfig.m_AttrData.GetAddHpMax(cp.HpMax, ri.Level, itemlevel) + aac.GetAddHpMax(cp.HpMax, ri.Level),
                           itemconfig.m_AttrData.GetAddEpMax(cp.EnergyMax, ri.Level, itemlevel) + aac.GetAddEpMax(cp.EnergyMax, ri.Level),
                           itemconfig.m_AttrData.GetAddAd(cp.AttackBase, ri.Level, itemlevel) + aac.GetAddAd(cp.AttackBase, ri.Level),
                           itemconfig.m_AttrData.GetAddADp(cp.ADefenceBase, ri.Level, itemlevel) + aac.GetAddADp(cp.ADefenceBase, itemlevel),
                           itemconfig.m_AttrData.GetAddMDp(cp.MDefenceBase, ri.Level, itemlevel) + aac.GetAddMDp(cp.MDefenceBase, ri.Level),
                           itemconfig.m_AttrData.GetAddCri(cp.Critical, ri.Level) + aac.GetAddCri(cp.Critical, ri.Level),
                           itemconfig.m_AttrData.GetAddPow(cp.CriticalPow, ri.Level) + aac.GetAddPow(cp.CriticalPow, ri.Level),
                           itemconfig.m_AttrData.GetAddBackHitPow(cp.CriticalBackHitPow, ri.Level) + aac.GetAddBackHitPow(cp.CriticalBackHitPow, ri.Level),
                           itemconfig.m_AttrData.GetAddCrackPow(cp.CriticalCrackPow, ri.Level) + aac.GetAddCrackPow(cp.CriticalCrackPow, ri.Level),
                           itemconfig.m_AttrData.GetAddFireDam(cp.FireDamage, ri.Level) + aac.GetAddFireDam(cp.FireDamage, ri.Level),
                           itemconfig.m_AttrData.GetAddIceDam(cp.IceDamage, ri.Level) + aac.GetAddIceDam(cp.IceDamage, ri.Level),
                           itemconfig.m_AttrData.GetAddPoisonDam(cp.PoisonDamage, ri.Level) + aac.GetAddPoisonDam(cp.PoisonDamage, ri.Level),
                           itemconfig.m_AttrData.GetAddFireErd(cp.FireERD, ri.Level) + aac.GetAddFireDam(cp.FireERD, ri.Level),
                           itemconfig.m_AttrData.GetAddIceErd(cp.IceERD, ri.Level) + aac.GetAddIceErd(cp.IceERD, ri.Level),
                           itemconfig.m_AttrData.GetAddPoisonErd(cp.PoisonERD, ri.Level) + aac.GetAddPoisonErd(cp.PoisonERD, ri.Level)));
            }
        }
        return(0f);
    }
Пример #3
0
 private void CompareProperty(int leftitem, int leftitemlevel, int leftpropertyid, int rightitem, int rightitemlevel, int rightpropertyid)
 {
     if (isCompareUI)
     {
         int    level = 1;
         float  dataL = 0.0f;
         float  dataR = 0.0f;
         string str   = "";
         ArkCrossEngine.ItemConfig itemconfigL = ArkCrossEngine.LogicSystem.GetItemDataById(leftitem);
         ArkCrossEngine.ItemConfig itemconfigR = ArkCrossEngine.LogicSystem.GetItemDataById(rightitem);
         if (itemconfigL != null && itemconfigR != null)
         {
             ArkCrossEngine.AppendAttributeConfig aacL = ArkCrossEngine.AppendAttributeConfigProvider.Instance.GetDataById(leftpropertyid);
             ArkCrossEngine.AppendAttributeConfig aacR = ArkCrossEngine.AppendAttributeConfigProvider.Instance.GetDataById(rightpropertyid);
             dataL = UIManager.GetItemPropertyData(itemconfigL.m_AttrData.GetAddHpMax(1.0f, level, leftitemlevel), itemconfigR.m_AttrData.m_HpMaxType);
             dataR = UIManager.GetItemPropertyData(itemconfigR.m_AttrData.GetAddHpMax(1.0f, level, leftitemlevel), itemconfigR.m_AttrData.m_HpMaxType);
             if (UnityEngine.Mathf.Abs(dataR - dataL) > float.Epsilon)
             {
                 str += (((dataR - dataL) > 0.0f ? "[00ffea]" : "[ff0000]") + ArkCrossEngine.StrDictionaryProvider.Instance.GetDictString(101) + UIManager.GetItemProtetyStr((dataR - dataL), itemconfigR.m_AttrData.m_HpMaxType) + "[-]\n");
             }
             dataL = UIManager.GetItemPropertyData(itemconfigL.m_AttrData.GetAddAd(1.0f, level, leftitemlevel), itemconfigR.m_AttrData.m_AdType);
             dataR = UIManager.GetItemPropertyData(itemconfigR.m_AttrData.GetAddAd(1.0f, level, leftitemlevel), itemconfigR.m_AttrData.m_AdType);
             if (UnityEngine.Mathf.Abs(dataR - dataL) > float.Epsilon)
             {
                 str += (((dataR - dataL) > 0.0f ? "[00ffea]" : "[ff0000]") + ArkCrossEngine.StrDictionaryProvider.Instance.GetDictString(102) + UIManager.GetItemProtetyStr((dataR - dataL), itemconfigR.m_AttrData.m_AdType) + "[-]\n");
             }
             dataL = UIManager.GetItemPropertyData(itemconfigL.m_AttrData.GetAddADp(1.0f, level, leftitemlevel), itemconfigR.m_AttrData.m_ADpType);
             dataR = UIManager.GetItemPropertyData(itemconfigR.m_AttrData.GetAddADp(1.0f, level, leftitemlevel), itemconfigR.m_AttrData.m_ADpType);
             if (UnityEngine.Mathf.Abs(dataR - dataL) > float.Epsilon)
             {
                 str += (((dataR - dataL) > 0.0f ? "[00ffea]" : "[ff0000]") + ArkCrossEngine.StrDictionaryProvider.Instance.GetDictString(103) + UIManager.GetItemProtetyStr((dataR - dataL), itemconfigR.m_AttrData.m_ADpType) + "[-]\n");
             }
             dataL = UIManager.GetItemPropertyData(itemconfigL.m_AttrData.GetAddMDp(1.0f, level, leftitemlevel), itemconfigR.m_AttrData.m_MDpType);
             dataR = UIManager.GetItemPropertyData(itemconfigR.m_AttrData.GetAddMDp(1.0f, level, leftitemlevel), itemconfigR.m_AttrData.m_MDpType);
             if (UnityEngine.Mathf.Abs(dataR - dataL) > float.Epsilon)
             {
                 str += (((dataR - dataL) > 0.0f ? "[00ffea]" : "[ff0000]") + ArkCrossEngine.StrDictionaryProvider.Instance.GetDictString(104) + UIManager.GetItemProtetyStr((dataR - dataL), itemconfigR.m_AttrData.m_MDpType) + "[-]\n");
             }
             dataL = (aacL == null ? 0.0f : UnityEngine.Mathf.FloorToInt(aacL.GetAddCri(1.0f, level) * 100) /*/ 100.0f*/);
             dataR = (aacR == null ? 0.0f : UnityEngine.Mathf.FloorToInt(aacR.GetAddCri(1.0f, level) * 100) /*/ 100.0f*/);
             if (UnityEngine.Mathf.Abs(dataR - dataL) > float.Epsilon)
             {
                 str += (((dataR - dataL) > 0.0f ? "[00ffea]" : "[ff0000]") + ArkCrossEngine.StrDictionaryProvider.Instance.GetDictString(105) + ((dataR - dataL) > 0.0f ? "+" : "") + UnityEngine.Mathf.FloorToInt((dataR - dataL) /** 100*/) + "%[-]\n");
             }
             dataL = (aacL == null ? 0.0f : UnityEngine.Mathf.FloorToInt(aacL.GetAddPow(1.0f, level) * 100) /*/ 100.0f*/);
             dataR = (aacR == null ? 0.0f : UnityEngine.Mathf.FloorToInt(aacR.GetAddPow(1.0f, level) * 100) /*/ 100.0f*/);
             if (UnityEngine.Mathf.Abs(dataR - dataL) > float.Epsilon)
             {
                 str += (((dataR - dataL) > 0.0f ? "[00ffea]" : "[ff0000]") + ArkCrossEngine.StrDictionaryProvider.Instance.GetDictString(106) + ((dataR - dataL) > 0.0f ? "+" : "") + UnityEngine.Mathf.FloorToInt((dataR - dataL) /** 100*/) + "%[-]\n");
             }
             dataL = (aacL == null ? 0.0f : UnityEngine.Mathf.FloorToInt(aacL.GetAddBackHitPow(1.0f, level) * 100) /*/ 100.0f*/);
             dataR = (aacR == null ? 0.0f : UnityEngine.Mathf.FloorToInt(aacR.GetAddBackHitPow(1.0f, level) * 100) /*/ 100.0f*/);
             if (UnityEngine.Mathf.Abs(dataR - dataL) > float.Epsilon)
             {
                 str += (((dataR - dataL) > 0.0f ? "[00ffea]" : "[ff0000]") + ArkCrossEngine.StrDictionaryProvider.Instance.GetDictString(107) + ((dataR - dataL) > 0.0f ? "+" : "") + UnityEngine.Mathf.FloorToInt((dataR - dataL) /** 100*/) + "%[-]\n");
             }
             dataL = (aacL == null ? 0.0f : UnityEngine.Mathf.FloorToInt(aacL.GetAddCrackPow(1.0f, level) * 100) /*/ 100.0f*/);
             dataR = (aacR == null ? 0.0f : UnityEngine.Mathf.FloorToInt(aacR.GetAddCrackPow(1.0f, level) * 100) /*/ 100.0f*/);
             if (UnityEngine.Mathf.Abs(dataR - dataL) > float.Epsilon)
             {
                 str += (((dataR - dataL) > 0.0f ? "[00ffea]" : "[ff0000]") + ArkCrossEngine.StrDictionaryProvider.Instance.GetDictString(108) + ((dataR - dataL) > 0.0f ? "+" : "") + UnityEngine.Mathf.FloorToInt((dataR - dataL) /** 100*/) + "%[-]\n");
             }
             dataL = UIManager.GetItemPropertyData(itemconfigL.m_AttrData.GetAddFireDam(1.0f, level), itemconfigR.m_AttrData.m_FireDamType);
             dataR = UIManager.GetItemPropertyData(itemconfigR.m_AttrData.GetAddFireDam(1.0f, level), itemconfigR.m_AttrData.m_FireDamType);
             if (UnityEngine.Mathf.Abs(dataR - dataL) > float.Epsilon)
             {
                 str += (((dataR - dataL) > 0.0f ? "[00ffea]" : "[ff0000]") + ArkCrossEngine.StrDictionaryProvider.Instance.GetDictString(109) + UIManager.GetItemProtetyStr((dataR - dataL), itemconfigR.m_AttrData.m_FireDamType) + "[-]\n");
             }
             dataL = UIManager.GetItemPropertyData(itemconfigL.m_AttrData.GetAddIceDam(1.0f, level), itemconfigR.m_AttrData.m_IceDamType);
             dataR = UIManager.GetItemPropertyData(itemconfigR.m_AttrData.GetAddIceDam(1.0f, level), itemconfigR.m_AttrData.m_IceDamType);
             if (UnityEngine.Mathf.Abs(dataR - dataL) > float.Epsilon)
             {
                 str += (((dataR - dataL) > 0.0f ? "[00ffea]" : "[ff0000]") + ArkCrossEngine.StrDictionaryProvider.Instance.GetDictString(110) + UIManager.GetItemProtetyStr((dataR - dataL), itemconfigR.m_AttrData.m_IceDamType) + "[-]\n");
             }
             dataL = UIManager.GetItemPropertyData(itemconfigL.m_AttrData.GetAddPoisonDam(1.0f, level), itemconfigR.m_AttrData.m_PoisonDamType);
             dataR = UIManager.GetItemPropertyData(itemconfigR.m_AttrData.GetAddPoisonDam(1.0f, level), itemconfigR.m_AttrData.m_PoisonDamType);
             if (UnityEngine.Mathf.Abs(dataR - dataL) > float.Epsilon)
             {
                 str += (((dataR - dataL) > 0.0f ? "[00ffea]" : "[ff0000]") + ArkCrossEngine.StrDictionaryProvider.Instance.GetDictString(111) + UIManager.GetItemProtetyStr((dataR - dataL), itemconfigR.m_AttrData.m_PoisonDamType) + "[-]\n");
             }
             dataL = UIManager.GetItemPropertyData(itemconfigL.m_AttrData.GetAddFireErd(1.0f, level), itemconfigR.m_AttrData.m_FireErdType);
             dataR = UIManager.GetItemPropertyData(itemconfigR.m_AttrData.GetAddFireErd(1.0f, level), itemconfigR.m_AttrData.m_FireErdType);
             if (UnityEngine.Mathf.Abs(dataR - dataL) > float.Epsilon)
             {
                 str += (((dataR - dataL) > 0.0f ? "[00ffea]" : "[ff0000]") + ArkCrossEngine.StrDictionaryProvider.Instance.GetDictString(112) + UIManager.GetItemProtetyStr((dataR - dataL), itemconfigR.m_AttrData.m_FireErdType) + "[-]\n");
             }
             dataL = UIManager.GetItemPropertyData(itemconfigL.m_AttrData.GetAddIceErd(1.0f, level), itemconfigR.m_AttrData.m_IceErdType);
             dataR = UIManager.GetItemPropertyData(itemconfigR.m_AttrData.GetAddIceErd(1.0f, level), itemconfigR.m_AttrData.m_IceErdType);
             if (UnityEngine.Mathf.Abs(dataR - dataL) > float.Epsilon)
             {
                 str += (((dataR - dataL) > 0.0f ? "[00ffea]" : "[ff0000]") + ArkCrossEngine.StrDictionaryProvider.Instance.GetDictString(113) + UIManager.GetItemProtetyStr((dataR - dataL), itemconfigR.m_AttrData.m_IceErdType) + "[-]\n");
             }
             dataL = UIManager.GetItemPropertyData(itemconfigL.m_AttrData.GetAddPoisonErd(1.0f, level), itemconfigR.m_AttrData.m_PoisonErdType);
             dataR = UIManager.GetItemPropertyData(itemconfigL.m_AttrData.GetAddPoisonErd(1.0f, level), itemconfigR.m_AttrData.m_PoisonErdType);
             if (UnityEngine.Mathf.Abs(dataR - dataL) > float.Epsilon)
             {
                 str += (((dataR - dataL) > 0.0f ? "[00ffea]" : "[ff0000]") + ArkCrossEngine.StrDictionaryProvider.Instance.GetDictString(114) + UIManager.GetItemProtetyStr((dataR - dataL), itemconfigR.m_AttrData.m_PoisonErdType) + "[-]\n");
             }
         }
         if (str.Length != 0)
         {
             str = ArkCrossEngine.StrDictionaryProvider.Instance.GetDictString(100) + "\n" + str;
         }
         str += itemconfigR.m_Description;
         UnityEngine.Transform tfr = transform.Find("SpriteBackRight/Container/DragThing/Bula");
         if (tfr != null)
         {
             UILabel ul = tfr.gameObject.GetComponent <UILabel>();
             if (ul != null)
             {
                 ul.text = str;
             }
         }
     }
     //     else {
     //       UnityEngine.Transform tfr = transform.Find("SpriteBackRight/Container/DragThing/Bula");
     //       if (tfr != null) {
     //         UILabel ul = tfr.gameObject.GetComponent<UILabel>();
     //         if (ul != null) {
     //           ul.text = ArkCrossEngine.StrDictionaryProvider.Instance.GetDictString(115);
     //         }
     //       }
     //     }
 }
Пример #4
0
    private void SetLabelProperty(ArkCrossEngine.ItemConfig itemconfig, int itemlevel, int propertyid, UnityEngine.Transform whichtf, bool isUpgrade = false)
    {
        if (itemconfig == null || whichtf == null)
        {
            return;
        }
        ArkCrossEngine.AppendAttributeConfig aac = ArkCrossEngine.AppendAttributeConfigProvider.Instance.GetDataById(propertyid);
        int    level = 1;
        string str   = "[ffffff]";
        float  data  = 0.0f;

        data = itemconfig.m_AttrData.GetAddHpMax(1.0f, level, itemlevel);
        if (UnityEngine.Mathf.Abs(data - 0) > float.Epsilon)
        {
            str += (ArkCrossEngine.StrDictionaryProvider.Instance.GetDictString(101) + UIManager.GetItemProtetyStr(data, itemconfig.m_AttrData.m_HpMaxType) + "\n");
        }
        data = itemconfig.m_AttrData.GetAddAd(1.0f, level, itemlevel);
        if (UnityEngine.Mathf.Abs(data - 0) > float.Epsilon)
        {
            str += (ArkCrossEngine.StrDictionaryProvider.Instance.GetDictString(102) + UIManager.GetItemProtetyStr(data, itemconfig.m_AttrData.m_AdType) + "\n");
        }
        data = itemconfig.m_AttrData.GetAddADp(1.0f, level, itemlevel);
        if (UnityEngine.Mathf.Abs(data - 0) > float.Epsilon)
        {
            str += (ArkCrossEngine.StrDictionaryProvider.Instance.GetDictString(103) + UIManager.GetItemProtetyStr(data, itemconfig.m_AttrData.m_ADpType) + "\n");
        }
        data = itemconfig.m_AttrData.GetAddMDp(1.0f, level, itemlevel);
        if (UnityEngine.Mathf.Abs(data - 0) > float.Epsilon)
        {
            str += (ArkCrossEngine.StrDictionaryProvider.Instance.GetDictString(104) + UIManager.GetItemProtetyStr(data, itemconfig.m_AttrData.m_MDpType) + "\n");
        }

        int proNum = str.Split('\n').Length - 1;

        switch (itemconfig.m_DamageType)
        {
        case ArkCrossEngine.ElementDamageType.DC_Fire:
            str += ArkCrossEngine.StrDictionaryProvider.Instance.GetDictString(118);
            break;

        case ArkCrossEngine.ElementDamageType.DC_Ice:
            str += ArkCrossEngine.StrDictionaryProvider.Instance.GetDictString(119);
            break;

        case ArkCrossEngine.ElementDamageType.DC_Poison:
            str += ArkCrossEngine.StrDictionaryProvider.Instance.GetDictString(120);
            break;

        case ArkCrossEngine.ElementDamageType.DC_None:
            break;

        default: break;
        }
        str += "[-]";
        UnityEngine.Transform tf = whichtf.Find("Container/DragThing/Property");
        if (tf != null)
        {
            UILabel ul = tf.gameObject.GetComponent <UILabel>();
            if (ul != null)
            {
                //播放升级特效
                if (isUpgrade == true)
                {
                    for (int i = 0; i < proNum; i++)
                    {
                        PlayParticle(ul.transform.position - new UnityEngine.Vector3(0f, 0.1f * i + 0.05f, 0f));
                    }
                    //播放图标特效
                    if (upgradeEffect != null)
                    {
                        UnityEngine.GameObject ef = ResourceSystem.NewObject(upgradeEffect) as GameObject;
                        if (ef != null && upEffGO != null)
                        {
                            ef.transform.position = new UnityEngine.Vector3(upEffGO.transform.position.x, upEffGO.transform.position.y, upEffGO.transform.position.z);
                            Destroy(ef, duration);
                        }
                    }
                }
                ul.text = str;
            }
        }
        str = "";
        if (aac != null)
        {
            data = aac.GetAddCri(1.0f, level);
            if (UnityEngine.Mathf.Abs(data - 0) > float.Epsilon)
            {
                str += (ArkCrossEngine.StrDictionaryProvider.Instance.GetDictString(105) + "+" + UnityEngine.Mathf.FloorToInt(data * 100) + "%\n");
            }
            data = aac.GetAddPow(1.0f, level);
            if (UnityEngine.Mathf.Abs(data - 0) > float.Epsilon)
            {
                str += (ArkCrossEngine.StrDictionaryProvider.Instance.GetDictString(106) + "+" + UnityEngine.Mathf.FloorToInt(data * 100) + "%\n");
            }
            data = aac.GetAddBackHitPow(1.0f, level);
            if (UnityEngine.Mathf.Abs(data - 0) > float.Epsilon)
            {
                str += (ArkCrossEngine.StrDictionaryProvider.Instance.GetDictString(107) + "+" + UnityEngine.Mathf.FloorToInt(data * 100) + "%\n");
            }
            data = aac.GetAddCrackPow(1.0f, level);
            if (UnityEngine.Mathf.Abs(data - 0) > float.Epsilon)
            {
                str += (ArkCrossEngine.StrDictionaryProvider.Instance.GetDictString(108) + "+" + UnityEngine.Mathf.FloorToInt(data * 100) + "%\n");
            }
        }
        data = itemconfig.m_AttrData.GetAddFireDam(1.0f, level);
        if (UnityEngine.Mathf.Abs(data - 0) > float.Epsilon)
        {
            str += (ArkCrossEngine.StrDictionaryProvider.Instance.GetDictString(109) + UIManager.GetItemProtetyStr(data, itemconfig.m_AttrData.m_FireDamType) + "\n");
        }
        data = itemconfig.m_AttrData.GetAddIceDam(1.0f, level);
        if (UnityEngine.Mathf.Abs(data - 0) > float.Epsilon)
        {
            str += (ArkCrossEngine.StrDictionaryProvider.Instance.GetDictString(110) + UIManager.GetItemProtetyStr(data, itemconfig.m_AttrData.m_IceDamType) + "\n");
        }
        data = itemconfig.m_AttrData.GetAddPoisonDam(1.0f, level);
        if (UnityEngine.Mathf.Abs(data - 0) > float.Epsilon)
        {
            str += (ArkCrossEngine.StrDictionaryProvider.Instance.GetDictString(111) + UIManager.GetItemProtetyStr(data, itemconfig.m_AttrData.m_PoisonDamType) + "\n");
        }
        data = itemconfig.m_AttrData.GetAddFireErd(1.0f, level);
        if (UnityEngine.Mathf.Abs(data - 0) > float.Epsilon)
        {
            str += (ArkCrossEngine.StrDictionaryProvider.Instance.GetDictString(112) + UIManager.GetItemProtetyStr(data, itemconfig.m_AttrData.m_FireErdType) + "\n");
        }
        data = itemconfig.m_AttrData.GetAddIceErd(1.0f, level);
        if (UnityEngine.Mathf.Abs(data - 0) > float.Epsilon)
        {
            str += (ArkCrossEngine.StrDictionaryProvider.Instance.GetDictString(113) + UIManager.GetItemProtetyStr(data, itemconfig.m_AttrData.m_IceErdType) + "\n");
        }
        data = itemconfig.m_AttrData.GetAddPoisonErd(1.0f, level);
        if (UnityEngine.Mathf.Abs(data - 0) > float.Epsilon)
        {
            str += (ArkCrossEngine.StrDictionaryProvider.Instance.GetDictString(114) + UIManager.GetItemProtetyStr(data, itemconfig.m_AttrData.m_PoisonErdType) + "\n");
        }
        if (str != "")
        {
            str = "\n[00ff00]" + str + "[-]";
        }
        tf = whichtf.Find("Container/DragThing/StarRock");
        if (tf != null)
        {
            UILabel ul = tf.gameObject.GetComponent <UILabel>();
            if (ul != null)
            {
                ul.text = str;
            }
        }
        tf = whichtf.Find("Container/DragThing/Bula");
        if (tf != null)
        {
            UILabel ul = tf.gameObject.GetComponent <UILabel>();
            if (ul != null)
            {
                ul.text = itemconfig.m_Description;
            }
        }
    }
        /// <summary>
        /// calculate attr by partner
        /// </summary>
        /// <param name="obj"></param>
        public static void RefixAttrByPartner(UserInfo obj)
        {
            PartnerInfo pi = obj.GetPartnerInfo();

            if (null != pi)
            {
                AppendAttributeConfig info = AppendAttributeConfigProvider.Instance.GetDataById(pi.GetAppendAttrConfigId());
                if (null != info)
                {
                    float aMoveSpeed          = obj.GetActualProperty().MoveSpeed;
                    int   aHpMax              = obj.GetActualProperty().HpMax;
                    int   aEnergyMax          = obj.GetActualProperty().EnergyMax;
                    float aHpRecover          = obj.GetActualProperty().HpRecover;
                    float aEnergyRecover      = obj.GetActualProperty().EnergyRecover;
                    int   aAttackBase         = obj.GetActualProperty().AttackBase;
                    int   aADefenceBase       = obj.GetActualProperty().ADefenceBase;
                    int   aMDefenceBase       = obj.GetActualProperty().MDefenceBase;
                    float aCritical           = obj.GetActualProperty().Critical;
                    float aCriticalPow        = obj.GetActualProperty().CriticalPow;
                    float aCriticalBackHitPow = obj.GetActualProperty().CriticalBackHitPow;
                    float aCriticalCrackPow   = obj.GetActualProperty().CriticalCrackPow;
                    float aFireDamage         = obj.GetActualProperty().FireDamage;
                    float aFireERD            = obj.GetActualProperty().FireERD;
                    float aIceDamage          = obj.GetActualProperty().IceDamage;
                    float aIceERD             = obj.GetActualProperty().IceERD;
                    float aPoisonDamage       = obj.GetActualProperty().PoisonDamage;
                    float aPoisonERD          = obj.GetActualProperty().PoisonERD;
                    float aWeight             = obj.GetActualProperty().Weight;
                    float aRps         = obj.GetActualProperty().Rps;
                    float aAttackRange = obj.GetActualProperty().AttackRange;
                    obj.GetActualProperty().SetMoveSpeed(Operate_Type.OT_Relative, info.GetAddSpd(aMoveSpeed, obj.GetLevel()));
                    obj.GetActualProperty().SetHpMax(Operate_Type.OT_Relative, (int)info.GetAddHpMax(aHpMax, obj.GetLevel()));
                    obj.GetActualProperty().SetEnergyMax(Operate_Type.OT_Relative, (int)info.GetAddEpMax(aEnergyMax, obj.GetLevel()));
                    obj.GetActualProperty().SetHpRecover(Operate_Type.OT_Relative, info.GetAddHpRecover(aHpRecover, obj.GetLevel()));
                    obj.GetActualProperty().SetEnergyRecover(Operate_Type.OT_Relative, info.GetAddEpRecover(aEnergyRecover, obj.GetLevel()));
                    obj.GetActualProperty().SetAttackBase(Operate_Type.OT_Relative, (int)info.GetAddAd(aAttackBase, obj.GetLevel()));
                    obj.GetActualProperty().SetADefenceBase(Operate_Type.OT_Relative, (int)info.GetAddADp(aADefenceBase, obj.GetLevel()));
                    obj.GetActualProperty().SetMDefenceBase(Operate_Type.OT_Relative, (int)info.GetAddMDp(aMDefenceBase, obj.GetLevel()));
                    obj.GetActualProperty().SetCritical(Operate_Type.OT_Relative, info.GetAddCri(aCritical, obj.GetLevel()));
                    obj.GetActualProperty().SetCriticalPow(Operate_Type.OT_Relative, info.GetAddPow(aCriticalPow, obj.GetLevel()));
                    obj.GetActualProperty().SetCriticalBackHitPow(Operate_Type.OT_Relative, info.GetAddBackHitPow(aCriticalBackHitPow, obj.GetLevel()));
                    obj.GetActualProperty().SetCriticalCrackPow(Operate_Type.OT_Relative, info.GetAddCrackPow(aCriticalCrackPow, obj.GetLevel()));
                    obj.GetActualProperty().SetFireDamage(Operate_Type.OT_Relative, info.GetAddFireDam(aFireDamage, obj.GetLevel()));
                    obj.GetActualProperty().SetFireERD(Operate_Type.OT_Relative, info.GetAddFireErd(aFireERD, obj.GetLevel()));
                    obj.GetActualProperty().SetIceDamage(Operate_Type.OT_Relative, info.GetAddIceDam(aIceDamage, obj.GetLevel()));
                    obj.GetActualProperty().SetIceERD(Operate_Type.OT_Relative, info.GetAddIceErd(aIceERD, obj.GetLevel()));
                    obj.GetActualProperty().SetPoisonDamage(Operate_Type.OT_Relative, info.GetAddPoisonDam(aPoisonDamage, obj.GetLevel()));
                    obj.GetActualProperty().SetPoisonERD(Operate_Type.OT_Relative, info.GetAddPoisonErd(aPoisonERD, obj.GetLevel()));
                    obj.GetActualProperty().SetWeight(Operate_Type.OT_Relative, info.GetAddWeight(aWeight, obj.GetLevel()));
                    obj.GetActualProperty().SetRps(Operate_Type.OT_Relative, info.GetAddRps(aRps, obj.GetLevel()));
                    obj.GetActualProperty().SetAttackRange(Operate_Type.OT_Relative, info.GetAddAttackRange(aAttackRange, obj.GetLevel()));
                }
            }
        }