Пример #1
0
        public void RefreshUIInfo()
        {
            PartnerData = LTPartnerDataManager.Instance.GetPartnerByStatId(PartnerData.StatId);
            if (PartnerData.HeroInfo.role_grade == (int)PartnerGrade.UR)
            {
                SourceItemID = 1427;
            }
            else
            {
                switch (PartnerData.HeroInfo.char_type)
                {
                case Hotfix_LT.Data.eRoleAttr.Feng:
                    SourceItemID = 1422;
                    break;

                case Hotfix_LT.Data.eRoleAttr.Huo:
                    SourceItemID = 1421;
                    break;

                case Hotfix_LT.Data.eRoleAttr.Shui:
                    SourceItemID = 1423;
                    break;
                }
            }
            sourceNum             = GameItemUtil.GetInventoryItemNum(SourceItemID);
            desNum                = PartnerData.ShardNum;
            SourceItem.LTItemData = new LTShowItemData(SourceItemID.ToString(), sourceNum, LTShowItemType.TYPE_GAMINVENTORY, false);
            DesItem.LTItemData    = new LTShowItemData(DesItemID.ToString(), desNum, LTShowItemType.TYPE_GAMINVENTORY, false);
            LTUIUtil.SetText(SourceItem.Count, sourceNum.ToString());
            LTUIUtil.SetText(DesItem.Count, desNum.ToString());
            LTUIUtil.SetText(UseNum, Mathf.Min(sourceNum, BalanceResourceUtil.MaxNum).ToString());
            CheckPlusSubBtn();
            SourceItem.Count.gameObject.CustomSetActive(true);
            DesItem.Count.gameObject.CustomSetActive(true);
        }
Пример #2
0
        public void OnShow(string heroId, HeroInfoTemplate charTpl, int star, int upGradeId, int awakenLevel
                           , bool isShowHp = false, bool isShowTempHp = false, bool IsExpSet = true)
        {
            Icon.spriteName = charTpl.icon;
            int quality, addLevel;

            LTPartnerDataManager.GetPartnerQuality(upGradeId, out quality, out addLevel);

            QuantityLevelSprite.spriteName = LTPartnerConfig.OUT_LINE_SPRITE_NAME_DIC[quality];
            GameItemUtil.SetColorfulPartnerCellFrame(quality, QuantityBGSprite);
            int.TryParse(heroId, out var intHeroId);
            LTPartnerData data = LTPartnerDataManager.Instance.GetPartnerByHeroId(intHeroId);

            LTPartnerConfig.SetLevelSprite(AttrSprite, charTpl.char_type, data != null && data.ArtifactLevel >= 0);
            HotfixCreateFX.ShowCharTypeFX(charFx, efClip, AttrSprite.transform, (PartnerGrade)charTpl.role_grade, charTpl.char_type);
            HotfixCreateFX.ShowUpgradeQualityFX(upgradeFx, QuantityLevelSprite.transform, quality, upgradeefclip);
            if (addLevel > 0)
            {
                breakLabel.transform.parent.gameObject.CustomSetActive(true);
                breakLabel.text = "+" + addLevel.ToString();
            }
            else
            {
                breakLabel.transform.parent.gameObject.CustomSetActive(false);
            }

            SetStarNumAndType(star, awakenLevel);
            SetProcess(heroId, isShowHp, isShowTempHp, IsExpSet);
        }
Пример #3
0
        /// <summary>
        /// 此英雄是否有任何可以上装的装备
        /// </summary>
        /// <param name="pd"></param>
        /// <returns></returns>
        public bool HasAnySuitEquip(LTPartnerData pd)
        {
            Hashtable equipIds;

            DataLookupsCache.Instance.SearchDataByID($"heroStats.{pd.HeroId}.equip", out equipIds);
            for (int index = 1; index <= 6; index++)
            {
                string strIndex = index.ToString();
                int    eid      = 0;
                if (equipIds != null && equipIds.Contains(strIndex))
                {
                    eid = Convert.ToInt32(equipIds[strIndex]);
                }
                if (eid == 0)
                {
                    for (int j = 0; j < CurAllBaseEquipInfoList.Count; j++)
                    {
                        var theEquip = CurAllBaseEquipInfoList[j];
                        if (theEquip.Type == (EquipPartType)index && !theEquip.isDress)
                        {
                            return(true);
                        }
                    }
                }
            }
            return(false);
        }
Пример #4
0
        /// <summary>
        /// 找到此英雄6个装备中空缺的位置对应的装备
        /// </summary>
        /// <param name="pd"></param>
        /// <param name="suitList">返回6个部位中有空缺位置对应的装备</param>
        private void QuerySuitList(LTPartnerData pd, List <ComParam> suitList)
        {
            var       orderedAllEquip = GetAllEquipsWithOrdered();
            Hashtable equipIds;

            DataLookupsCache.Instance.SearchDataByID(string.Format("heroStats.{0}.equip", pd.HeroId), out equipIds);
            for (int index = 1; index <= 6; index++)
            {
                int eid = 0;
                if (equipIds != null && equipIds.Contains(index))
                {
                    eid = (int)equipIds[index];
                }
                if (eid == 0 && orderedAllEquip.Count > 1)//此位置为空
                {
                    for (int j = orderedAllEquip.Count - 1; j >= 0; j--)
                    {
                        var theEquip = orderedAllEquip[j];
                        if (theEquip.Type == (EquipPartType)index && !theEquip.isDress)
                        {
                            suitList.Add(new ComParam(theEquip.Eid, index));
                            break;
                        }
                    }
                }
            }
        }
Пример #5
0
        /// <summary>
        /// 初始化所有英雄数据
        /// </summary>
        public void InitAllHero()
        {
            foreach (var list in dicHeroChoiceData)
            {
                list.Value.Clear();
            }
            //筛选出自己拥有的英雄
            List <LTPartnerData> generalPL = LTPartnerDataManager.Instance.GetOwnPartnerList();

            //直接使用自己拥有的伙伴列表
            //Dictionary<int, Hotfix_LT.Data.HeroInfoTemplate> AllHBHero = Hotfix_LT.Data.CharacterTemplateManager.Instance.GetAllHBHeroInfoTemplate();
            for (int i = 0; i < generalPL.Count; i++)
            {
                Data.HeroInfoTemplate    hero          = generalPL[i].HeroInfo;
                HeroBattleChoiceCellData cellData      = new HeroBattleChoiceCellData(hero.id + 1, hero, 0);
                LTPartnerData            ltPartnerData = generalPL[i];
                if (dicHeroChoiceData.ContainsKey(cellData.type) && ltPartnerData != null)
                {
                    cellData.isUnLock      = true;
                    cellData.level         = ltPartnerData.Level;
                    cellData.peak          = ltPartnerData.AllRoundLevel;
                    cellData.artifactLevel = ltPartnerData.ArtifactLevel;
                    cellData.star          = ltPartnerData.Star;
                    cellData.skin          = ltPartnerData.CurSkin;
                    cellData.isAwake       = ltPartnerData.IsAwaken;
                    cellData.modelName     = ltPartnerData.HeroInfo.model_name;
                    cellData.iconName      = ltPartnerData.HeroInfo.icon;
                    dicHeroChoiceData[cellData.type].Add(cellData);
                }
            }
        }
Пример #6
0
        /// <summary>
        /// 卸载伙伴身上的所有装备
        /// </summary>
        /// <param name="heroId"></param>
        /// <param name="callback"></param>
        public void RequireUnEquipAll(int heroId, System.Action <bool> callback = null)
        {
            LTPartnerData parData = LTPartnerDataManager.Instance.GetPartnerByHeroId(heroId);

            if (parData == null)
            {
                EB.Debug.LogError("LTPartnerEquipDataManager RequireUnEquipAll heroid is Error, heroid = {0}", heroId);
                callback?.Invoke(false);
                return;
            }

            HeroEquipmentInfo[]      infos  = parData.EquipmentsInfo;
            List <HeroEquipmentInfo> eInfos = new List <HeroEquipmentInfo>();

            for (int i = 0; i < infos.Length; i++)
            {
                if (infos[i].Eid > 0)
                {
                    eInfos.Add(infos[i]);
                }
            }

            if (eInfos.Count == 0)
            {
                callback?.Invoke(true);
                return;
            }

            if (isMaxEquipNumOneKey(eInfos.Count))
            {
                MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, EB.Localizer.GetString("ID_codefont_in_MailApi_1124"));
                return;
            }

            for (int i = 0; i < eInfos.Count; i++)
            {
                if (i == eInfos.Count - 1)
                {
                    RequireUnEquip(eInfos[i].Eid, heroId, (success) =>
                    {
                        if (!success)
                        {
                            return;
                        }

                        callback?.Invoke(success);
                    }, true);
                }
                else
                {
                    RequireUnEquip(eInfos[i].Eid, heroId, (success) =>
                    {
                        if (!success)
                        {
                            return;
                        }
                    }, false);
                }
            }
        }
Пример #7
0
        public void InitSkillInfo(LTPartnerData itemData)
        {
            if (itemData == null)
            {
                return;
            }

            partnerData = itemData;
            SkillSetTool.SkillFrameStateSet(commonsprite, false);
            SkillSetTool.SkillFrameStateSet(passivesprite, false);
            SkillSetTool.SkillFrameStateSet(activesprite, false);
            skillLevelUptpl = Hotfix_LT.Data.CharacterTemplateManager.Instance.GetHeroAwakeInfoByInfoID(partnerData.InfoId);
            Data.SkillTemplate commonSkillTem = Data.SkillTemplateManager.Instance.GetTemplateWithAwake(partnerData,
                                                                                                        partnerData.HeroStat.common_skill, () => { SkillSetTool.SkillFrameStateSet(commonsprite, true); });
            Data.SkillTemplate passiveSkillTem = Data.SkillTemplateManager.Instance.GetTemplateWithAwake(partnerData,
                                                                                                         partnerData.HeroStat.passive_skill, () => { SkillSetTool.SkillFrameStateSet(passivesprite, true); });
            Data.SkillTemplate activeSkillTem = Data.SkillTemplateManager.Instance.GetTemplateWithAwake(partnerData,
                                                                                                        partnerData.HeroStat.active_skill, () => { SkillSetTool.SkillFrameStateSet(activesprite, true); });

            CommonSkillBreakSprite.spriteName  = commonSkillTem.Icon;
            CommonSkillLevel.text              = partnerData.CommonSkillLevel.ToString();
            PassiveSkillBreakSprite.spriteName = passiveSkillTem.Icon;
            PassiveSkillLevel.text             = partnerData.PassiveSkillLevel.ToString();
            ActiveSkillBreakSprite.spriteName  = activeSkillTem.Icon;
            ActiveSkillLevel.text              = partnerData.ActiveSkillLevel.ToString();
        }
Пример #8
0
        /// <summary>计算伙伴技能加成战力</summary>
        public static float GetPartnerSkillPowerPer(LTPartnerData partnerData)
        {
            float         skillPer        = 0;
            SkillTemplate commonSkillTem  = SkillTemplateManager.Instance.GetTemplateWithAwake(partnerData, partnerData.HeroStat.common_skill);
            SkillTemplate passiveSkillTem = SkillTemplateManager.Instance.GetTemplateWithAwake(partnerData, partnerData.HeroStat.passive_skill);
            SkillTemplate activeSkillTem  = SkillTemplateManager.Instance.GetTemplateWithAwake(partnerData, partnerData.HeroStat.active_skill);

            skillPer = partnerData.CommonSkillLevel * commonSkillTem.BattleRating +
                       partnerData.PassiveSkillLevel * passiveSkillTem.BattleRating +
                       partnerData.ActiveSkillLevel * activeSkillTem.BattleRating;
            SkillTemplate starskill;

            switch (partnerData.Star)
            {
            case 5:
                starskill = SkillTemplateManager.Instance.GetTemplate(partnerData.HeroStat.starskill5);
                skillPer += starskill.BattleRating;
                break;

            case 6:
                starskill = SkillTemplateManager.Instance.GetTemplate(partnerData.HeroStat.starskill5);
                skillPer += starskill.BattleRating;
                starskill = SkillTemplateManager.Instance.GetTemplate(partnerData.HeroStat.starskill6);
                skillPer += starskill.BattleRating;
                break;

            default:
                break;
            }
            return(skillPer);
        }
Пример #9
0
        private void SetAttAddNum(LTPartnerData partnerData)
        {
            string Addtxt = string.Format("{0}{1}{2}", EB.Localizer.GetString(LTPartnerHandbookManager.Instance.GetType(Data.handbookId)), EB.Localizer.GetString("ID_PARTNER"), LTPartnerHandbookManager.Instance.GetAttAddNum(partnerData, Type));

            AttrAddSprite.color = (partnerData == null) ? Color.magenta : Color.white;
            AttrAddLabel.text   = Addtxt;
        }
Пример #10
0
        /// <summary>计算伙伴属性战力</summary>
        public static float GetSelfAttributeCombatPower(LTPartnerData partnerData)
        {
            LTAttributesData attr  = GetPartnerAllAttributesByParnterData(partnerData);//所有基础属性
            float            power = attr.Power() * (1 + attr.PowerPer());

            return(power);
        }
Пример #11
0
        /// <summary>
        /// 点击确定按钮
        /// </summary>
        public void OnClickConfirmBtn()
        {
            if (mCurSelectBoxNum < 1 || mCurSelectBoxNum > mBoxMaxNum)
            {
                EB.Debug.LogError("LTSelectBoxController UseItem Error, num Error");
                return;
            }

            Hotfix_LT.Data.SelectBox selectBox   = mCurCell.GetCurSelectBoxData();
            LTPartnerData            partnerData = LTPartnerDataManager.Instance.GetPartnerByStatId(int.Parse(selectBox.ri1));
            bool   isHasPartner = partnerData != null && partnerData.HeroId > 0;
            string statId       = selectBox.ri1;
            int    summonShard  = partnerData == null ? 0 :partnerData.HeroInfo.summon_shard;

            LTPartnerDataManager.Instance.UseItem(mCurInventoryId, mCurSelectBoxNum, selectBox.index, delegate
            {
                if (selectBox.rt1.Equals("hero"))
                {
                    if (!isHasPartner)
                    {
                        LTShowItemData itemData = new LTShowItemData(statId, 1, "hero");
                        GlobalMenuManager.Instance.Open("LTShowGetPartnerUI", itemData);
                    }
                    else
                    {
                        LTShowItemData itemData = new LTShowItemData(statId, summonShard * mCurSelectBoxNum, "heroshard");
                        GlobalMenuManager.Instance.Open("LTShowGetPartnerUI", itemData);
                    }
                }
                else
                {
                    List <LTShowItemData> showItemsList = new List <LTShowItemData>();

                    Hotfix_LT.Data.EconemyItemTemplate info = Hotfix_LT.Data.EconemyTemplateManager.Instance.GetItem(selectBox.ri1);
                    if (info is Hotfix_LT.Data.EquipmentItemTemplate)
                    {
                        for (int i = 0; i < mCurSelectBoxNum; i++)
                        {
                            LTShowItemData showItemData = new LTShowItemData(selectBox.ri1, selectBox.rn1, selectBox.rt1);
                            showItemsList.Add(showItemData);
                        }
                    }
                    else
                    {
                        LTShowItemData showItemData = new LTShowItemData(selectBox.ri1, selectBox.rn1 * mCurSelectBoxNum, selectBox.rt1);
                        showItemsList.Add(showItemData);
                    }

                    GlobalMenuManager.Instance.Open("LTShowRewardView", showItemsList);
                }

                if (mCurSelectBoxNum == mBoxMaxNum)
                {
                    UIInventoryBagLogic.Instance.FirstItem = null;
                }
                UIInventoryBagLogic.Instance.RefeshBag(ShowBagContent.Instance.CurType);

                controller.Close();
            });
        }
Пример #12
0
        private void calculate(LTPartnerData data, RefreshType type)
        {
            switch (type)
            {
            case RefreshType.Attribute:
                attripower = AttributesManager.GetSelfAttributeCombatPower(data);
                break;

            case RefreshType.Skill:
                skillper   = AttributesManager.GetPartnerSkillPowerPer(data);
                attripower = AttributesManager.GetSelfAttributeCombatPower(data);
                break;

            case RefreshType.EquipsuitSkill:
                suitskillper = AttributesManager.GetEquipSuitPer(data);
                attripower   = AttributesManager.GetSelfAttributeCombatPower(data);
                break;

            case RefreshType.All:
                attripower   = AttributesManager.GetSelfAttributeCombatPower(data);
                skillper     = AttributesManager.GetPartnerSkillPowerPer(data);
                suitskillper = AttributesManager.GetEquipSuitPer(data);
                break;

            default:
                break;
            }
            curPower = (int)(attripower * (1 + skillper + suitskillper));
        }
Пример #13
0
        public override void SetMenuData(object param)
        {
            base.SetMenuData(param);

            infoId          = (int?)param ?? infoId;
            data            = LTPartnerDataManager.Instance.GetPartnerByInfoId(infoId);
            templateNow     = CharacterTemplateManager.Instance.GetArtifactEquipmentByLevel(infoId, data.ArtifactLevel, true);
            templateNext    = CharacterTemplateManager.Instance.GetArtifactEquipmentByLevel(infoId, data.ArtifactLevel + 1);
            Icon.spriteName = templateNow.iconId;
            Shadow.gameObject.CustomSetActive(data.ArtifactLevel < 0);
            Shadow.GetComponent <DynamicUISprite>().spriteName = templateNow.iconId;
            ArtifactName.text = templateNow.name;
            SetShowItem(templateNext);
            DetailBehaviour.Init(infoId);
            if (data.ArtifactLevel == CharacterTemplateManager.Instance.GetArtifactEquipmentMaxLevel(infoId))
            {
                button.gameObject.CustomSetActive(false);
                MaxTip.gameObject.CustomSetActive(true);
            }
            else
            {
                button.gameObject.CustomSetActive(true);
                MaxTip.gameObject.CustomSetActive(false);
            }
        }
Пример #14
0
        /// <summary>
        /// 设置伙伴信息
        /// </summary>
        /// <param name="partnerData">伙伴数据</param>
        public void F_SetCardInfo(HeroBattleChoiceCellData partnerData)
        {
            m_Data = partnerData;
            bool isNull = partnerData == null;

            m_SelfObj.SetActive(!isNull);
            if (!isNull)
            {
                //获取指定的伙伴数据
                LTPartnerData data = LTPartnerDataManager.Instance.GetGeneralPartnerList().Find(p => p.HeroStat.id == partnerData.heroTplID);
                if (data != null)
                {
                    m_Card.Fill(data);
                    ////不要设置死亡情况
                    m_Card.DeathSprite.gameObject.SetActive(false);
                }
                else
                {
                    EB.Debug.LogError("为什么相应的partnerData.heroTplID:{0},没有相应的伙伴数据?", partnerData.heroTplID);
                }
                //是否选中
                m_SelectState.SetActive(partnerData.isUsed);
                //特效是否显示
                bool fxVisible = !partnerData.isUsed;
                if (fxVisible && data.HeroInfo.role_grade != (int)PartnerGrade.SSR)
                {
                    fxVisible = false;
                }
                for (int i = 0; i < m_Card.LevelSprite.transform.childCount; i++)
                {
                    m_Card.LevelSprite.transform.GetChild(i).gameObject.SetActive(fxVisible);
                }
            }
        }
Пример #15
0
        /// <summary>[伙伴最终白字属性] - 仅计算自己伙伴,其他玩家伙伴通过LTFormationDataMnager.HandleOtherPlayerAttribute</summary>
        public static LTAttributesData GetPartnerAttributesByParnterData(LTPartnerData partnerData, int heroLv = -1)
        {
            //********伙伴最终白字计算*********
            //伙伴最终白字属性 = 图鉴固定值(只有攻防血需要计算)) + 伙伴基础白字属性  * [军团加成% + 图鉴加成% + 晋升%]
            //*****************************
            LTAttributesData baseAttrData = GetPartnerBaseAttributesByParnterData(partnerData.HeroStat.id, partnerData.UpGradeId, partnerData.Star, partnerData.StarHole, (heroLv > 0 ? heroLv : partnerData.Level), partnerData.AllRoundLevel, partnerData.ControlLevel, partnerData.StrongLevel, partnerData.RageLevel, partnerData.AbsorbedLevel, partnerData.IsAwaken, partnerData.InfoId, LTPartnerDataManager.Instance.GetGuardHash(partnerData.HeroId), partnerData.CommonSkillLevel, partnerData.ActiveSkillLevel, partnerData.PassiveSkillLevel);

            LTAttributesData totalAttrData = new LTAttributesData(baseAttrData);
            LTAttributesData tempAttrData  = new LTAttributesData();

            //图鉴固定值
            LTAttributesData handbookAttr = GetPartnerAHandbookAttributes(LTPartnerHandbookManager.Instance.GetHandBookLevel());

            totalAttrData.Add(handbookAttr);

            //军团加成
            tempAttrData = GetPartnerLegionAttributes(baseAttrData, partnerData);
            totalAttrData.Add(tempAttrData);

            //图鉴加成
            tempAttrData = GetPartnerHandBookAttributes(baseAttrData, partnerData);
            totalAttrData.Add(tempAttrData);

            //晋升固定值及百分比
            tempAttrData = GetPartnerPromotionAttributes(partnerData);
            totalAttrData.Add(tempAttrData);
            totalAttrData.SpecialAdd(baseAttrData, tempAttrData);

            return(totalAttrData);
        }
Пример #16
0
        public void Show(LTPartnerData data, bool isshowAwaken = false)
        {
            CenterOnChild.onCenter += OnCenter;

            var temp = Hotfix_LT.Data.CharacterTemplateManager.Instance.GetHeroAwakeInfoByInfoID(data.HeroInfo.id);

            if (temp == null || string.IsNullOrEmpty(temp.awakeSkin))//data.HeroInfo .role_grade != (int)PartnerGrade.SSR)
            {
                MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, EB.Localizer.GetString("ID_PARTNER_SKIN_AWAKEN_TIP2"));
                return;
            }
            mDMono.gameObject.CustomSetActive(true);

            heroId = data.HeroId;
            var list = CreakSkinDataList(data);

            mScroll.SetItemDatas(list.ToArray());
            curObj = null;
            if (isshowAwaken)
            {
                StartCoroutine(InitSelectIE(1));
            }
            else
            {
                StartCoroutine(InitSelectIE(data.CurSkin));
            }
        }
Пример #17
0
 private void SetGetTipLabel(LTPartnerData partner, int index)
 {
     if (partner.CurSkin == index)
     {
         mBtn.enabled     = false;
         mBtnSprite.color = Color.magenta;
         mBtnLabel.text   = EB.Localizer.GetString("ID_PARTNER_AWAKEN_BTN_3");//当前穿戴
     }
     else if (index == 0)
     {
         mBtn.enabled     = true;
         mBtnSprite.color = Color.white;
         mBtnLabel.text   = EB.Localizer.GetString("ID_PARTNER_AWAKEN_BTN_2");//穿戴
     }
     else if (index == 1)
     {
         if (partner.IsAwaken > 0)
         {
             mBtn.enabled     = true;
             mBtnSprite.color = Color.white;
             mBtnLabel.text   = EB.Localizer.GetString("ID_PARTNER_AWAKEN_BTN_2");//穿戴
         }
         else
         {
             mBtn.enabled     = false;
             mBtnSprite.color = Color.magenta;
             mBtnLabel.text   = EB.Localizer.GetString("ID_PARTNER_AWAKEN_BTN_1");//未拥有
         }
     }
     else
     {
         //待处理
     }
 }
Пример #18
0
        public override void SetMenuData(object param)
        {
            LTPartnerSkillBreskData tempData = (LTPartnerSkillBreskData)param;

            tempSelect        = tempData.skillType;
            curPartnerData    = tempData.partnerData;
            curAwakenTemplate = Data.CharacterTemplateManager.Instance.GetHeroAwakeInfoByInfoID(curPartnerData.InfoId);
        }
Пример #19
0
 public LTPartnerData SetHandBookCard()
 {
     if (!string.IsNullOrEmpty(BuddyId))
     {
         PartnerData = LTPartnerDataManager.Instance.GetPartnerByHeroId(int.Parse(BuddyId));
         return(PartnerData);
     }
     return(null);
 }
Пример #20
0
 public PowerData(LTPartnerData data)
 {
     if (data.Level == 0)
     {
         curPower = 0;
     }
     else
     {
         calculate(data, RefreshType.All);
     }
 }
Пример #21
0
 public void OnValueChanged(LTPartnerData data, bool isShow, RefreshType type)
 {
     perPower = curPower;
     calculate(data, type);
     add = curPower - perPower;
     if (isShow && add != 0)
     {
         str = add >= 0 ? "+" : "";
         MessageTemplateManager.ShowMessage(eMessageUIType.CombatPowerText, string.Format("{0},{1}{2}", curPower, str, add));
     }
 }
Пример #22
0
 public override void SetMenuData(object param)
 {
     if (param != null)
     {
         ShowGradeStarUp data = param as ShowGradeStarUp;
         curType     = data.ShowType;
         curParData  = data.PartnerData;
         oldAttrData = data.oldAttrData;
     }
     Init();
 }
Пример #23
0
        private void InitUI()
        {
            IconItem.Fill(mInfoTemp);
            RareSprite.spriteName = LTPartnerConfig.PARTNER_GRADE_SPRITE_NAME_DIC[(PartnerGrade)mInfoTemp.role_grade];
            NameLabel.text        = mInfoTemp.name;
            LTPartnerData data = LTPartnerDataManager.Instance.GetPartnerByInfoId(mInfoId);

            NotOwnSprite.gameObject.CustomSetActive(data == null || data.HeroId <= 0);
            OwnSprite.gameObject.CustomSetActive(data != null && data.HeroId > 0);
            InitDrop();
        }
Пример #24
0
        /// <summary>
        /// 设置伙伴信息
        /// </summary>
        /// <param name="choiceData">伙伴数据</param>
        /// <param name="playerInfo">玩家信息</param>
        /// <param name="isBan">是否被禁用</param>
        /// <param name="isNeedSetFx">是否需要设置特效</param>
        public void F_SetCardInfo(HeroBattleChoiceCellData choiceData, SidePlayerInfoData playerInfo, bool isBan, bool isNeedSetFx)
        {
            m_ChoiceData = choiceData;
            LTPartnerData data = null;

            m_LockState.CustomSetActive(isBan);
            m_SelectLockState.CustomSetActive(false);
            if (choiceData != null)
            {
                data          = new LTPartnerData();
                data.StatId   = 0;
                data.InfoId   = choiceData.heroTplID;
                data.HeroStat = null;
                int characterId = choiceData.heroTplID;
                //判断当前的数据是否为机器人
                if (playerInfo.uid == 0)
                {
                    Hotfix_LT.Data.MonsterInfoTemplate monster = Hotfix_LT.Data.CharacterTemplateManager.Instance.GetMonsterInfo(choiceData.heroTplID);
                    if (monster != null)
                    {
                        characterId = int.Parse(monster.character_id);
                    }
                    else
                    {
                        EB.Debug.LogError("为什么输入的choiceData.heroTplID:{0},没有相应的怪物数据", choiceData.heroTplID);
                    }
                }
                else
                {
                    characterId -= 1;
                }
                //模型皮肤
                data.HeroInfo = Hotfix_LT.Data.CharacterTemplateManager.Instance.GetHeroInfo(characterId, choiceData.skin);
                //不能为零
                data.mHeroId = 1;
                //修改这里来调整UI的表现
                data.IsHire            = true;
                data.HireHeroId        = 1;
                data.HireLevel         = choiceData.level;
                data.HireAllRoundLevel = choiceData.peak;
                data.HireArtifactLevel = choiceData.artifactLevel;
                data.HireUpGradeId     = choiceData.upGrade;
                data.HireStar          = choiceData.star;
                //觉醒
                data.HireAwakeLevel = choiceData.isAwake;
                //设置卡片时的特效
                if (isNeedSetFx)
                {
                    EB.Coroutines.Run(SetCardFx());
                }
            }
            m_Card.Fill(data);
        }
Пример #25
0
 public void Show(LTPartnerData data)
 {
     if (data == null)
     {
         Hide();
         return;
     }
     partnerData = data;
     SetInfo();
     SetSelectUI();
     mDMono.gameObject.CustomSetActive(true);
 }
Пример #26
0
        /// <summary>
        /// 获取晋升加成
        /// </summary>
        private static LTAttributesData GetPartnerPromotionAttributes(LTPartnerData partnerData)
        {
            LTAttributesData attrData = new LTAttributesData();
            var attrList = LTPromotionManager.Instance.GetAttrList();

            for (int i = 0; i < attrList.Count; ++i)
            {
                float value = LTPromotionManager.Instance.GetCurrentAttrLevel(attrList[i].id) * attrList[i].attrValue;
                attrData.Add(attrList[i].name, value);
            }
            return(attrData);
        }
Пример #27
0
        private List <LTLTPartnerSkinItemData> CreakSkinDataList(LTPartnerData hero)
        {
            List <LTLTPartnerSkinItemData> list = new List <LTLTPartnerSkinItemData>();
            var heroInfo = Hotfix_LT.Data.CharacterTemplateManager.Instance.GetHeroInfo(hero.InfoId);

            //原皮
            list.Add(new LTLTPartnerSkinItemData(hero.HeroId, 0, EB.Localizer.GetString("ID_PARTNER_SKIN_DEFAULT"), heroInfo.skin));
            //觉醒皮
            list.Add(new LTLTPartnerSkinItemData(hero.HeroId, 1, EB.Localizer.GetString("ID_PARTNER_SKIN_AWAKEN"), string.Format("{0}_1", heroInfo.skin)));
            //氪金皮
            //list.AddRange();
            return(list);
        }
Пример #28
0
        /// <summary>获取最终属性</summary>
        private static LTAttributesData GetPartnerAllAttributesByParnterData(LTPartnerData partnerData)
        {
            //最终白字属性
            LTAttributesData attrData = GetPartnerAttributesByParnterData(partnerData);
            //基础白字属性
            LTAttributesData baseData = AttributesUtil.GetBaseAttributes(partnerData);
            //绿字属性
            LTAttributesData equipData = GetPartnerEquipmentAttributes(baseData, partnerData.EquipmentTotleAttr);

            attrData.Add(equipData);

            return(attrData);
        }
Пример #29
0
 /// <summary>计算装备套装加成战力</summary>
 public static float GetEquipSuitPer(LTPartnerData partnerData)
 {
     ECid.Clear();
     for (int i = 0; i < partnerData.EquipmentsInfo.Length; i++)
     {
         int ecid = partnerData.EquipmentsInfo[i].ECid;
         if (ecid != 0)
         {
             ECid.Add(ecid);
         }
     }
     return(GetEquipSuitPer(ECid));
 }
Пример #30
0
 public override void SetMenuData(object param)
 {
     if (param != null)
     {
         curpartnerData = param as LTPartnerData;
     }
     else
     {
         EB.Debug.LogError("Awaken PartnerData is null");
         controller.Close();
         return;
     }
     curTemplate = Hotfix_LT.Data.CharacterTemplateManager.Instance.GetHeroAwakeInfoByInfoID(curpartnerData.InfoId);
 }