Esempio n. 1
0
        private void InitEquipContent(Hotfix_LT.Data.EquipmentItemTemplate data)
        {
            InitEquipOtherAttr(data.QualityLevel);

            int index       = data.SuitAttrId_1 > 0 ? 1 : 2;
            int suitSkillID = data.SuitAttrId_1 > 0 ? data.SuitAttrId_1 : data.SuitAttrId_2;

            InitEquipSuitDesc(index, suitSkillID);
        }
Esempio n. 2
0
        public void AddOrDelExp(int economyId, bool isAdd, int times)
        {
            int exp = 0;

            Hotfix_LT.Data.GeneralItemTemplate generalItemData = Hotfix_LT.Data.EconemyTemplateManager.Instance.GetItem(economyId) as Hotfix_LT.Data.GeneralItemTemplate;
            if (generalItemData == null)
            {
                Hotfix_LT.Data.EquipmentItemTemplate equipmentItemData = Hotfix_LT.Data.EconemyTemplateManager.Instance.GetItem(economyId) as Hotfix_LT.Data.EquipmentItemTemplate;
                exp = equipmentItemData.BaseExp;
            }
            else
            {
                exp = generalItemData.Exp;
            }
            if (isAdd)
            {
                addSkillExp += exp * times;
            }
            else
            {
                addSkillExp -= exp * times;
            }
        }
Esempio n. 3
0
 public void SetCellData(LTPartnerInfoController ctrl, int Eid, int equipmentType, int equipmentLevel)
 {
     //Debug.LogError("Eid cell is : " + Eid);
     if (Eid == -1)
     {
         this.eid = Eid;
         item.SetActive(false);
     }
     else
     {
         item.SetActive(true);
         this.ctrl          = ctrl;
         this.eid           = Eid;
         this.equipmentType = equipmentType;
         item.SetActive(Eid != 0);
         tpl = Hotfix_LT.Data.EconemyTemplateManager.Instance.GetEquipment(Eid);
         this.equipmentLevel = equipmentLevel;
         SetFrame(tpl.QualityLevel);
         SetIcon(tpl.IconId);
         SetSuit(tpl.QualityLevel, tpl.SuitIcon, equipmentLevel);
         HotfixCreateFX.ShowItemQualityFX(mQualityFX, mEffectClip, mDMono.transform, tpl.QualityLevel);
     }
 }
Esempio n. 4
0
        public void OnEquipmentClick(int Eid, int equipmentLevel, int equipmentType)
        {
            infoPanel.gameObject.SetActive(true);
            infoPanel.GetComponent <TweenScale>().ResetToBeginning();
            infoPanel.GetComponent <TweenScale>().PlayForward();
            ClickItemCell.SetCellData(this, Eid, equipmentType, equipmentLevel);
            Hotfix_LT.Data.EquipmentItemTemplate tpl = Hotfix_LT.Data.EconemyTemplateManager.Instance.GetEquipment(Eid);
            DetailedEquipmentInfo attr = equipmentAttrs[Eid];

            Effect_4Label.effectStyle = UILabel.Effect.None;
            Effect_4Label.transform.GetChild(1).GetComponent <UISprite>().color = new Color(0.75f, 0.75f, 0.75f);
            ClickItemTitle.applyGradient  = true;
            ClickItemTitle.gradientTop    = LT.Hotfix.Utility.ColorUtility.QualityToGradientTopColor(tpl.QualityLevel);
            ClickItemTitle.gradientBottom = LT.Hotfix.Utility.ColorUtility.QualityToGradientBottomColor(tpl.QualityLevel);
            ClickItemTitle.text           = ClickItemTitle.transform.GetChild(0).GetComponent <UILabel>().text = tpl.Name;
            Hotfix_LT.Data.SkillTemplate suitAttr1 = Hotfix_LT.Data.SkillTemplateManager.Instance.GetTemplate(tpl.SuitAttrId_1);
            Hotfix_LT.Data.SkillTemplate suitAttr2 = Hotfix_LT.Data.SkillTemplateManager.Instance.GetTemplate(tpl.SuitAttrId_2);
            int need       = 0;
            int SuitAttrId = -1;

            if (suitAttr1 != null)
            {
                need = 2;
                string FirstSuitAttr = Hotfix_LT.Data.SkillTemplateManager.Instance.GetTemplate(tpl.SuitAttrId_1).Description;
                SuitAttrId = tpl.SuitAttrId_1;
                if (data.equipmentSuits.Count > 0)
                {
                    LTUIUtil.SetText(Effect_4Label, string.Format(EB.Localizer.GetString("ID_codefont_in_LTEquipmentFirstInfo_1924"), LTPartnerEquipConfig.HasEffectStrDic[data.equipmentSuits[SuitAttrId] >= need], FirstSuitAttr));
                }
            }
            else if (suitAttr2 != null)
            {
                need       = 4;
                SuitAttrId = tpl.SuitAttrId_2;
                string SecondSuitAttr = Hotfix_LT.Data.SkillTemplateManager.Instance.GetTemplate(tpl.SuitAttrId_2).Description;
                LTUIUtil.SetText(Effect_4Label, string.Format(EB.Localizer.GetString("ID_codefont_in_LTEquipmentFirstInfo_2136"), LTPartnerEquipConfig.HasEffectStrDic[data.equipmentSuits[SuitAttrId] >= need], SecondSuitAttr));
            }

            if (data.equipmentSuits.Count > 0 && data.equipmentSuits[SuitAttrId] >= need)
            {
                Effect_4Label.effectStyle = UILabel.Effect.Outline8;
                Effect_4Label.transform.GetChild(1).GetComponent <UISprite>().color = new Color(0.74f, 1f, 0.85f);
            }
            else
            {
                Effect_4Label.effectStyle = UILabel.Effect.None;
                Effect_4Label.transform.GetChild(1).GetComponent <UISprite>().color = new Color(0.75f, 0.75f, 0.75f);
            }

            EquipmentAttr MainAttributes = attr.MainAttributes;
            string        MainStr        = AttrTypeTrans(MainAttributes.Name);

            MainAttr.GetChild(0).GetComponent <UILabel>().text = "[fff348]" + MainStr;
            MainAttr.GetChild(1).GetComponent <UILabel>().text = AttrTypeValue(MainAttributes.Name, MainAttributes.Value);

            List <EquipmentAttr> exadd = attr.ExAttributes;
            int exCount = exadd.Count;

            for (int i = 0; i < 4; i++)
            {
                if (i > exCount - 1)
                {
                    ExAttr[i].gameObject.CustomSetActive(false);
                }
                else
                {
                    EquipmentAttr add        = exadd[i];
                    string        exAddName  = add.Name;
                    float         exAddValue = add.Value;
                    string        ExNameStr  = AttrTypeTrans(exAddName);
                    ExAttr[i].GetChild(0).GetComponent <UILabel>().text = ExNameStr;
                    ExAttr[i].GetChild(1).GetComponent <UILabel>().text = AttrTypeValue(exAddName, exAddValue);
                    ExAttr[i].gameObject.CustomSetActive(true);
                }
            }
            infoPanel.GetComponent <UIWidget>().height = 413 + 88 * exCount + ((Effect_4Label.gameObject.activeSelf) ? Effect_4Label.height : 0);
            EffectPos.UpdateAnchors();
            Effect2BgPos.UpdateAnchors();
            Effect4BgPos.UpdateAnchors();
        }