Example #1
0
 public void SetAwardInfo()
 {
     string str = Hotfix_LT.Data.NewGameConfigTemplateManager.Instance.GetGameConfigStrValue("WelfareGrowUpAward");
     if (str != null)
     {
         LTShowItemData itemData = GetItemData(str);
         if (itemData != null)
         {
             if (itemData.type == LTShowItemType.TYPE_HEROSHARD|| itemData.type == LTShowItemType.TYPE_HERO)
             {
                 id = itemData.id;
                 int cid = Hotfix_LT.Data.CharacterTemplateManager.Instance.GetHeroStat(itemData.id).character_id;
                 Hotfix_LT.Data.HeroInfoTemplate data = Hotfix_LT.Data.CharacterTemplateManager.Instance.GetHeroInfo(cid);
                 MainIcon.spriteName = data.icon;
                 RoleIcon.spriteName = LTPartnerConfig.LEVEL_SPRITE_NAME_DIC[data.char_type]; 
                 HotfixCreateFX.ShowCharTypeFX(charFx, efClip, RoleIcon.transform, (PartnerGrade)data.role_grade, data.char_type);
                 GradeIcon.spriteName = LTPartnerConfig.PARTNER_GRADE_SPRITE_NAME_DIC[(PartnerGrade)data.role_grade];
                 HeroItem.CustomSetActive(true);
             }
             else
             {
                 ShowItem.LTItemData = itemData;
                 ShowItem.mDMono.gameObject.CustomSetActive(true);
             }
         }
     }
 }
Example #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);
        }
Example #3
0
        public override void Fill(LTPartnerData itemData)
        {
            if (itemData == null)
            {
                Clean();
                return;
            }
            tplId = itemData.HeroStat.id;
            Hotfix_LT.Data.HeroInfoTemplate m_data = itemData.HeroInfo;
            MainIcon.spriteName = m_data.icon;
            if (m_data.char_type == Hotfix_LT.Data.eRoleAttr.None)
            {
                QualityIcon.gameObject.CustomSetActive(false);
            }
            else
            {
                QualityIcon.spriteName = LTPartnerConfig.LEVEL_SPRITE_NAME_DIC[m_data.char_type];
                HotfixCreateFX.ShowCharTypeFX(charFx, efClip, QualityIcon.transform, (PartnerGrade)m_data.role_grade, (Hotfix_LT.Data.eRoleAttr)m_data.char_type);
            }

            GradeIcon.spriteName = UIItemLvlDataLookup.LvlToStr((m_data.role_grade + 1).ToString());
            FrameBG.color        = UIItemLvlDataLookup.GetItemFrameBGColor((m_data.role_grade + 1).ToString());
            StarController.SetSrarList(itemData.Star, itemData.IsAwaken);

            BG.color = (LTBountyTaskSelectController.Target != tplId) ? new Color(213f / 255f, 223f / 255f, 232f / 255f) : new Color(125f / 255f, 202f / 255f, 1f);

            mDMono.gameObject.CustomSetActive(true);
        }
Example #4
0
        /// <summary>
        /// 设置英雄头像
        /// </summary>
        /// <param name="UpGradeId"></param>
        /// <param name="icon"></param>
        /// <param name="char_type"></param>
        /// <param name="role_grade"></param>
        /// <param name="star"></param>
        /// <param name="heroLevel"></param>
        private void SetHeroIcon(string heroName, int UpGradeId, string icon, Hotfix_LT.Data.eRoleAttr char_type, int role_grade, int star, int heroLevel, string heroProfile, string profileSprite, int isawaken)
        {
            int quality  = 0;
            int addLevel = 0;

            LTPartnerDataManager.GetPartnerQuality(UpGradeId, out quality, out addLevel);
            if (addLevel == 0)
            {
                LTUIUtil.SetText(BreakLabel, "");
            }
            else
            {
                LTUIUtil.SetText(BreakLabel, "+" + addLevel.ToString());
            }
            BreakLabel.gameObject.SetActive(addLevel != 0);
            LTUIUtil.SetLevelText(HeroLevel.transform.parent.GetComponent <UISprite>(), HeroLevel, heroLevel);
            LTUIUtil.SetText(HeroName, heroName);
            LTUIUtil.SetText(HeroRoleProfile, string.Format("{0}", heroProfile == null ? EB.Localizer.GetString("ID_NATION_BATTLE_BUFF_FULL_CALL") : heroProfile));
            HeroRoleProfileSprite.spriteName = profileSprite;
            HeroIcon.spriteName       = icon;
            HeroType.spriteName       = LTPartnerConfig.LEVEL_SPRITE_NAME_DIC[char_type];
            HeroIconBorder.spriteName = LTPartnerConfig.OUT_LINE_SPRITE_NAME_DIC[quality];
            GameItemUtil.SetColorfulPartnerCellFrame(quality, HeriIconBorderBG);
            HotfixCreateFX.ShowUpgradeQualityFX(upgradeFx, HeroIconBorder.transform, quality, upgradeefclip);
            GradeIcon.spriteName = LTPartnerConfig.PARTNER_GRADE_SPRITE_NAME_DIC[(PartnerGrade)role_grade];
            HotfixCreateFX.ShowCharTypeFX(charFx, efClip, HeroType.transform, (PartnerGrade)role_grade, char_type);
            StarList.SetSrarList(star, isawaken);
        }
Example #5
0
        public override void SetData(object data)
        {
            base.SetData(data);
            activityId = EB.Dot.Integer("activity_id", data, 0);
            string desctext = EB.Dot.String("desc", data, "");

            SetTextShow(RichTextParser.ParseRichText(desctext), descpos, descpos);
            SetDrawCardState();
            int timetoend = fintime - EB.Time.Now;

            if (activityendtimer == 0 && timetoend > 0)
            {
                ILRTimerManager.instance.AddTimer(timetoend * 1000, 1, OnactivityEnd);
            }
            var activity = Hotfix_LT.Data.EventTemplateManager.Instance.GetTimeLimitActivity(activityId);

            UrPartnerInfoid = activity.parameter1;
            int.TryParse(UrPartnerInfoid, out int infoid);
            HeroInfoTemplate infotemp = CharacterTemplateManager.Instance.GetHeroInfo(infoid);

            MaxRankValue = EventTemplateManager.Instance.GetURPartnerEventRewardMaxNum(infoid);
            if (infotemp != null)
            {
                urPartnerIcon.spriteName = infotemp.icon;
                urPartnerType.spriteName = LTPartnerConfig.LEVEL_SPRITE_NAME_DIC[infotemp.char_type];
                HotfixCreateFX.ShowCharTypeFX(charFx, efClip, urPartnerType.transform, (PartnerGrade)infotemp.role_grade, infotemp.char_type);
            }
            ActivityUtil.RequestRankData((int)ActivityUtil.ActivityRankType.URPartnerRank, SetRankData);
        }
Example #6
0
        private void UpdateItem()
        {
            if (m_data == null || m_data.id == 0)
            {
                mDMono.transform.gameObject.CustomSetActive(false);
                return;
            }
            mDMono.transform.gameObject.CustomSetActive(true);
            Hotfix_LT.Data.HeroInfoTemplate info = Hotfix_LT.Data.CharacterTemplateManager.Instance.GetHeroInfo(m_data.character_id);
            IconSprite.spriteName = info.icon;

            int quality  = 0;
            int addLevel = 0;

            LTPartnerDataManager.GetPartnerQuality(m_data.upgrade, out quality, out addLevel);

            FrameSprite.spriteName = LTPartnerConfig.OUT_LINE_SPRITE_NAME_DIC[quality];
            GameItemUtil.SetColorfulPartnerCellFrame(quality, FrameBGSprite);

            if (addLevel > 0)
            {
                breakLebel.gameObject.CustomSetActive(true);
                breakLebel.text = "+" + addLevel.ToString();
            }
            else
            {
                breakLebel.gameObject.CustomSetActive(false);
            }

            CharTypeSprite.spriteName = LTPartnerConfig.LEVEL_SPRITE_NAME_DIC[info.char_type];
            HotfixCreateFX.ShowCharTypeFX(charFx, efClip, CharTypeSprite.transform, (PartnerGrade)info.role_grade, info.char_type);
            LevelLabel.text = m_data.level.ToString();

            StarController.SetSrarList(m_data.star, 0);
        }
Example #7
0
        private IEnumerator LoadFx(HeroInfoTemplate data, int quality)
        {
            yield return(new  WaitForSeconds(0.2f));

            HotfixCreateFX.ShowCharTypeFX(charFx, efClip, CharSprite.transform, (PartnerGrade)data.role_grade, data.char_type);
            HotfixCreateFX.ShowUpgradeQualityFX(upgradeFx, FrameBGSprite.transform, quality, upgradeefclip);
        }
Example #8
0
        private IEnumerator ShowUIIE()
        {
            // 等待0.1s是为了防止闪屏,在长界面切到短界面或短界面切到长界面的时候,高度值虽然改变了,但是锚点的对其需要下一帧才会刷新
            yield return(null);

            m_ThisPanel.alpha = 1;

            HotfixCreateFX.ShowItemQualityFX(mQualityFX, mEffectClip, m_Icon.transform, m_QualityLevel);
        }
Example #9
0
        private void RefreshData(LTPartnerData itemData)
        {
            if (itemData == null)
            {
                mDMono.gameObject.CustomSetActive(false);
                return;
            }
            else
            {
                mDMono.gameObject.CustomSetActive(true);
            }
            partnerData = itemData as LTPartnerData;

            if (partnerData.HeroId > 0)
            {
                Icon.spriteName     = partnerData.HeroInfo.icon;
                RoleType.spriteName = LTPartnerConfig.LEVEL_SPRITE_NAME_DIC[partnerData.HeroInfo.char_type];
                HotfixCreateFX.ShowCharTypeFX(charFx, efClip, RoleType.transform, (PartnerGrade)partnerData.HeroInfo.role_grade, partnerData.HeroInfo.char_type);

                int quality  = 0;
                int addLevel = 0;
                LTPartnerDataManager.GetPartnerQuality(partnerData.UpGradeId, out quality, out addLevel);
                if (addLevel == 0)
                {
                    BreakLabel.text = "";
                }
                else
                {
                    BreakLabel.text = string.Format("+{0}", addLevel);
                }
                BreakLabel.gameObject.CustomSetActive(addLevel != 0);
                IconBorder.spriteName = LTPartnerConfig.OUT_LINE_SPRITE_NAME_DIC[quality];
                GameItemUtil.SetColorfulPartnerCellFrame(quality, IconBg);

                if (IStarCount != partnerData.Star)
                {
                    IStarCount = partnerData.Star;
                    int awakelevel = partnerData.IsAwaken;
                    for (int i = 0; i < Star.transform.childCount; ++i)
                    {
                        Star.transform.GetChild(i).gameObject.CustomSetActive(i < IStarCount);
                        _stararray[i].spriteName = LTPartnerConfig.PARTNER_AWAKN_STAR_DIC[awakelevel];//觉醒星星显示
                    }
                    Star.cellWidth = (IStarCount > 5) ? 25 : 30;
                    Star.Reposition();
                }
                SetBookNameBg(partnerData.HeroInfo.char_type, BookNameBg);
                SetAttAddNum(partnerData, Conrtoller.Data.handBookAddAttrType);
                SetBtn(LTPartnerHandbookManager.Instance.TheHandbookList.IsPartnerInField(partnerData.HeroId.ToString()), string.IsNullOrEmpty(Conrtoller.Data.BuddyId) ? false : Conrtoller.Data.BuddyId.Equals(partnerData.HeroId.ToString()));
            }
            else
            {
                mDMono.gameObject.CustomSetActive(false);
            }
        }
Example #10
0
        private void UpdateItem()
        {
            if (partnerData == null || partnerData.HeroId == 0)
            {
                mDMono.transform.GetChild(0).gameObject.SetActive(false);
                return;
            }
            mDMono.transform.GetChild(0).gameObject.SetActive(true);
            SelectSprite.gameObject.SetActive(partnerData.HeroId == LTPartnerEquipDataManager.Instance.CurrentPartnerData.HeroId);
            IconSprite.spriteName = partnerData.HeroInfo.icon;

            int quality  = 0;
            int addLevel = 0;

            LTPartnerDataManager.GetPartnerQuality(partnerData.UpGradeId, out quality, out addLevel);

            FrameSprite.spriteName = LTPartnerConfig.OUT_LINE_SPRITE_NAME_DIC[quality];
            GameItemUtil.SetColorfulPartnerCellFrame(quality, FrameBGSprite);

            if (partnerData.HeroId <= 0)
            {
                SetGrey(IconSprite);
                SetGrey(FrameSprite);
                SetDark(FrameBGSprite);
            }
            else
            {
                SetNormal(IconSprite);
                SetNormal(FrameSprite);
            }

            if (addLevel > 0)
            {
                breakLebel.gameObject.SetActive(true);
                breakLebel.text = "+" + addLevel.ToString();
            }
            else
            {
                breakLebel.gameObject.SetActive(false);
            }
            //BottomSprite.spriteName = LTPartnerConfig.OUT_LINE_SPRITE_NAME_DIC[quality];

            LevelSprite.spriteName = LTPartnerConfig.LEVEL_SPRITE_NAME_DIC[partnerData.HeroInfo.char_type];
            HotfixCreateFX.ShowUpgradeQualityFX(upgradeFx, FrameSprite.transform, quality, upgradeefclip);
            HotfixCreateFX.ShowCharTypeFX(charFx, efClip, LevelSprite.transform, (PartnerGrade)partnerData.HeroInfo.role_grade, partnerData.HeroInfo.char_type);
            LevelLabel.text = partnerData.Level.ToString();

            /*ShardSlider.value = (float)partnerData.ShardNum / (float)partnerData.HeroInfo.summon_shard;
             * ShardSprite.spriteName = partnerData.ShardNum >= partnerData.HeroInfo.summon_shard ? "Ty_Strip_Green" : "Ty_Strip_Blue";
             * ShardLabel.text = string.Format("{0}/{1}", partnerData.ShardNum, partnerData.HeroInfo.summon_shard);*/

            SetItemState();
            StarController.SetSrarList(partnerData.Star, partnerData.IsAwaken);
        }
Example #11
0
        public virtual void Fill(OtherPlayerPartnerData data, bool canOpen = true)
        {
            if (data == null || data.Level == 0)
            {
                mDMono.gameObject.SetActive(false);
                return;
            }

            this.canOpen = canOpen;
            PartnerData  = data;
            LevelLabel.gameObject.CustomSetActive(data.Level > 0);
            LevelLabel.text = data.Level.ToString();
            LTUIUtil.SetLevelText(LevelBgSprite, LevelLabel, data.Level + data.AllRoundLevel);
            AttrBGSprite.spriteName = LTPartnerConfig.LEVEL_SPRITE_NAME_DIC[data.Attr];
            LTPartnerConfig.SetLevelSprite(AttrBGSprite, data.Attr, data.ArtifactLevel >= 0);
            HotfixCreateFX.ShowCharTypeFX(charFx, efClip, AttrBGSprite.transform, (PartnerGrade)data.QualityLevel, data.Attr);
            IconSprite.spriteName = data.Icon;

            // 新增
            if (BreakLabel != null && QualityBorderSpriteBg != null)
            {
                SetStarNum(data.Star, data.awakenLevel);
                int quality  = 0;
                int addLevel = 0;
                LTPartnerDataManager.GetPartnerQuality(data.UpGradeId, out quality, out addLevel);
                GameItemUtil.SetColorfulPartnerCellFrame(quality, QualityBorderSpriteBg);
                HotfixCreateFX.ShowUpgradeQualityFX(upgradeFx, QualityBorderSprite.transform, quality, upgradeefclip);
                QualityBorderSprite.spriteName = LTPartnerConfig.OUT_LINE_SPRITE_NAME_DIC[quality];

                if (addLevel > 0)
                {
                    BreakLabel.gameObject.SetActive(true);
                    BreakLabel.text = "+" + addLevel.ToString();
                }
                else
                {
                    BreakLabel.gameObject.SetActive(false);
                }
            }
            else
            {
                //    LevelAttrBGSprite.spriteName = UIBuddyShowItem.AttrToLevelBG(data.Attr);
                QualityBorderSprite.spriteName = LTPartnerConfig.OUT_LINE_SPRITE_NAME_DIC[data.QualityLevel];
                GameItemUtil.SetColorfulPartnerCellFrame(data.QualityLevel, QualityBorderSpriteBg);
                HotfixCreateFX.ShowUpgradeQualityFX(upgradeFx, QualityBorderSprite.transform, data.QualityLevel, upgradeefclip);
                SetStarNum(data.Star, data.awakenLevel);
            }
            if (data != null)
            {
                mDMono.gameObject.CustomSetActive(true);
            }
        }
Example #12
0
        public void SetHeroIcon(LTPartnerData PData, GuardHeroData hData, int index)
        {
            this.PData = PData;
            this.hData = hData;
            this.index = index;
            SetRedPoint();
            int quality  = 0;
            int addLevel = 0;

            LTPartnerDataManager.GetPartnerQuality(hData.UpGradeId, out quality, out addLevel);
            if (addLevel > 0)
            {
                LTUIUtil.SetText(BreakLabel, "+" + addLevel.ToString());
                BreakLabel.transform.parent.gameObject.SetActive(true);
            }
            else
            {
                BreakLabel.transform.parent.gameObject.SetActive(false);
            }
            BreakLabel.gameObject.SetActive(addLevel != 0);
            LTUIUtil.SetText(HeroLevel, hData.heroLevel.ToString());
            LTUIUtil.SetText(HeroName, hData.heroName);
            HeroIcon.spriteName       = hData.icon;
            HeroType.spriteName       = LTPartnerConfig.LEVEL_SPRITE_NAME_DIC[hData.char_type];
            HeroIconBorder.spriteName = LTPartnerConfig.OUT_LINE_SPRITE_NAME_DIC[quality];
            GameItemUtil.SetColorfulPartnerCellFrame(quality, HeriIconBorderBG);
            GradeIcon.spriteName = LTPartnerConfig.PARTNER_GRADE_SPRITE_NAME_DIC[(PartnerGrade)hData.role_grade];
            HotfixCreateFX.ShowUpgradeQualityFX(upgradeFx, HeroIconBorder.transform, quality, upgradeefclip);
            HotfixCreateFX.ShowCharTypeFX(charFx, efClip, HeroType.transform, (PartnerGrade)hData.role_grade, hData.char_type);

            int starCount = hData.star;

            if (starCount != lastStarCount || hData.isawaken != lastAwakenLevel)
            {
                StarController.SetSrarList(starCount, hData.isawaken);
            }

            if (hData.heroLevel <= 0)
            {
                SetGrey(HeroIcon);
                SetGrey(HeroIconBorder);
                SetDark(HeriIconBorderBG);
            }
            else
            {
                SetNormal(HeroIcon);
                SetNormal(HeroIconBorder);
            }
        }
Example #13
0
        public override void OnEnable()
        {
            //base.OnEnable();

            if (mLTItemData != null && Frame != null)
            {
                LTIconNameQuality itemInfo = LTItemInfoTool.GetInfo(mLTItemData.id, mLTItemData.type, mLTItemData.coloring);
                HotfixCreateFX.ShowItemQualityFX(m_QualityFX, m_EffectClip, Frame.transform, int.Parse(itemInfo.quality));
                var t_particle = Frame.transform.GetComponentInChildren <ParticleSystemUIComponent>();
                if (t_particle != null)
                {
                    t_particle.transform.localScale = Vector3.one * (Frame.width / 186f);
                }
            }
        }
Example #14
0
        private void SetFilledState()
        {
            Data.eRoleAttr type  = Data.char_type;
            PartnerGrade   grade = (PartnerGrade)Data.role_grade;
            int            star  = 3;

            TextureCamp.spriteName = Data.skin;
            AttrSprite.spriteName  = LTPartnerConfig.LEVEL_SPRITE_NAME_DIC[type];
            HotfixCreateFX.ShowCharTypeFX(charFx, efClip, AttrSprite.transform, grade, type);
            GradeSprite.spriteName = LTPartnerConfig.PARTNER_GRADE_SPRITE_NAME_DIC[grade];

            for (int i = 0; i < StarGrid.transform.childCount; i++)
            {
                StarGrid.transform.GetChild(i).gameObject.CustomSetActive(i < star);
            }
            StarGrid.repositionNow = true;
        }
Example #15
0
        /// <summary>
        /// 设置伙伴item数据(非伙伴列表的伙伴数据设置)
        /// </summary>
        /// <param name="itemData"></param>
        /// <param name="quality"></param>
        /// <param name="addLevel"></param>
        public void SetItemDataOther(LTPartnerData itemData, int quality = -1, int addLevel = -1)
        {
            isNeedRefreshEvent = false;
            SetItemData(itemData, false);
            SelectSprite.gameObject.CustomSetActive(false);

            if (quality > -1 && itemData.HeroId > 0)
            {
                FrameSprite.spriteName = LTPartnerConfig.OUT_LINE_SPRITE_NAME_DIC[quality];
                GameItemUtil.SetColorfulPartnerCellFrame(quality, FrameBGSprite);
                HotfixCreateFX.ShowUpgradeQualityFX(upgradeFx, FrameSprite.transform, quality, upgradeefclip);
                breakLebel.transform.parent.gameObject.CustomSetActive(addLevel > 0);
                if (addLevel > 0)
                {
                    breakLebel.text = "+" + addLevel.ToString();
                }
            }
        }
Example #16
0
            public void FillData(string Id)
            {
                if (!string.IsNullOrEmpty(Id))
                {
                    LTShowItemData itemData = new LTShowItemData(Id, 0, LTShowItemType.TYPE_HERO, false);
                    heroInfoId = itemData.id;
                    int cid = Hotfix_LT.Data.CharacterTemplateManager.Instance.GetHeroStat(itemData.id).character_id;
                    Hotfix_LT.Data.HeroInfoTemplate data = Hotfix_LT.Data.CharacterTemplateManager.Instance.GetHeroInfo(cid);
                    icon.spriteName      = data.icon;
                    roleIcon.spriteName  = LTPartnerConfig.LEVEL_SPRITE_NAME_DIC[data.char_type];
                    gradeIcon.spriteName = LTPartnerConfig.PARTNER_GRADE_SPRITE_NAME_DIC[(PartnerGrade)data.role_grade];

                    HotfixCreateFX.ShowCharTypeFX(charFx, efClip, roleIcon.transform, (PartnerGrade)data.role_grade, data.char_type);
                    btn.gameObject.CustomSetActive(true);
                }
                else
                {
                    btn.gameObject.CustomSetActive(false);
                }
            }
Example #17
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);
     }
 }
Example #18
0
        private void SetFilledState()
        {
            Hotfix_LT.Data.eRoleAttr type  = Data.PartnerData.HeroInfo.char_type;
            PartnerGrade             grade = (PartnerGrade)Data.PartnerData.HeroInfo.role_grade;
            int star       = Data.PartnerData.Star;
            int awakelevel = Data.PartnerData.IsAwaken;

            TextureCamp.spriteName = Data.PartnerData.HeroInfo.skin;
            AttrSprite.spriteName  = LTPartnerConfig.LEVEL_SPRITE_NAME_DIC[type];
            HotfixCreateFX.ShowCharTypeFX(charFx, efClip, AttrSprite.transform, grade, type);
            GradeSprite.spriteName = LTPartnerConfig.PARTNER_GRADE_SPRITE_NAME_DIC[grade];

            for (int i = 0; i < StarGrid.transform.childCount; i++)
            {
                StarGrid.transform.GetChild(i).gameObject.CustomSetActive(i < star);
                starSpArray[i].spriteName = LTPartnerConfig.PARTNER_AWAKN_STAR_DIC[awakelevel];
            }
            StarGrid.repositionNow = true;
            URBorder.CustomSetActive(grade == PartnerGrade.UR);
            SSRBorder.CustomSetActive(grade == PartnerGrade.SSR);
            SRBorder.CustomSetActive(grade == PartnerGrade.SR);
            RBorder.CustomSetActive(grade == PartnerGrade.R);
        }
Example #19
0
        private void InitBoss()
        {
            int monsterID = LTWorldBossDataManager.Instance.GetWorldBossMonsterID();

            Hotfix_LT.Data.MonsterInfoTemplate monsterTpl = Hotfix_LT.Data.CharacterTemplateManager.Instance.GetMonsterInfo(monsterID);
            if (monsterTpl == null)
            {
                EB.Debug.LogError("LTWorldBossHudController InitBoss, monsterTpl is Error monsterID = {0}", monsterID);
                return;
            }

            Hotfix_LT.Data.HeroInfoTemplate info = Hotfix_LT.Data.CharacterTemplateManager.Instance.GetHeroInfo(monsterTpl.character_id);
            if (info == null)
            {
                EB.Debug.LogError("LTWorldBossHudController InitBoss, info is Error monsterTpl.character_id = {0}", monsterTpl.character_id);
                return;
            }

            StartCoroutine(CreateBossModel(info.model_name));

            LTUIUtil.SetText(NameLabel, info.name);
            TypeSprite.spriteName = LTPartnerConfig.LEVEL_SPRITE_NAME_DIC[info.char_type];
            HotfixCreateFX.ShowCharTypeFX(charFx, efClip, TypeSprite.transform, (PartnerGrade)info.role_grade, info.char_type);
        }
Example #20
0
        public void FillData()
        {
            int statId;

            if (DataLookupsCache.Instance.SearchIntByID(
                    string.Format("tl_acs.{0}.current", SSRWishItem.ssrWishActivityId), out statId))
            {
                EmptyObj.CustomSetActive(false);
                ShowObj.CustomSetActive(true);
                HeroInfoTemplate data = CharacterTemplateManager.Instance.GetHeroInfo(statId - 1);
                icon.spriteName      = data.icon;
                roleIcon.spriteName  = LTPartnerConfig.LEVEL_SPRITE_NAME_DIC[data.char_type];
                gradeIcon.spriteName = LTPartnerConfig.PARTNER_GRADE_SPRITE_NAME_DIC[(PartnerGrade)data.role_grade];

                HotfixCreateFX.ShowCharTypeFX(charFx, efClip, roleIcon.transform, (PartnerGrade)data.role_grade,
                                              data.char_type);
                btn.gameObject.CustomSetActive(true);
            }
            else
            {
                EmptyObj.CustomSetActive(true);
                ShowObj.CustomSetActive(false);
            }
        }
Example #21
0
        public void SetItem(LTPartnerData itemData)
        {
            //itemData为空的时候也把ItemData置空,其他地方使用ItemData需要判空
            ItemData = itemData;

            if (itemData == null || (itemData.StatId == 0 && itemData.InfoId == 0))
            {
                mDMono.gameObject.CustomSetActive(false);
                return;
            }

            RecommendSprite.CustomSetActive(false);
            SleepPS.CustomSetActive(false);


            if (BattleReadyHudController.sBattleType == eBattleType.SleepTower && LTClimingTowerHudController.Instance != null)
            {
                SleepPS.CustomSetActive(!LTClimingTowerHudController.Instance.CanUpTeam(ItemData.HeroId));
            }

            IconSprite.spriteName = ItemData.HeroInfo.icon;
            if (ItemData.HeroId <= 0 && !ItemData.IsHeroBattle || ItemData.IsHeroBattle && LTNewHeroBattleManager.GetInstance().CurrentType == HeroBattleType.High && LTNewHeroBattleManager.GetInstance().HasChallengeHeroInfoID.Contains(ItemData.StatId))
            {
                SetGrey(IconSprite);
                SetGrey(FrameSprite);
                SetDark(FrameBGSprite);
                HideObj.CustomSetActive(false);
                return;
            }
            else
            {
                SetNormal(IconSprite);
                SetNormal(FrameSprite);
                HideObj.CustomSetActive(true);
            }
            int quality  = 0;
            int addLevel = 0;

            LTPartnerDataManager.GetPartnerQuality(ItemData.UpGradeId, out quality, out addLevel);

            FrameSprite.spriteName = LTPartnerConfig.OUT_LINE_SPRITE_NAME_DIC[quality];
            GameItemUtil.SetColorfulPartnerCellFrame(quality, FrameBGSprite);
            HotfixCreateFX.ShowUpgradeQualityFX(upgradeFx, FrameSprite.transform, quality, upgradeefclip);
            //FrameBGSprite.color = LTPartnerConfig.QUANTITY_BG_COLOR_DIC[quality];
            LTPartnerConfig.SetLevelSprite(LevelSprite, ItemData.HeroInfo.char_type, ItemData.ArtifactLevel >= 0);
            int index = QualitySettings.GetQualityLevel();

            if (index < 1)
            {
                HotfixCreateFX.ShowCharTypeFX(charFx, efClip, LevelSprite.transform, (PartnerGrade)ItemData.HeroInfo.role_grade, ItemData.HeroInfo.char_type);
            }
            LTUIUtil.SetLevelText(LevelBGSprite, LevelLabel, ItemData);
            if (itemData.IsHeroBattle)
            {
                LevelBGSprite.spriteName = "Ty_Brand_Di1";
            }
            //英雄交锋特殊处理 其他布阵需要考虑觉醒后星星颜色变化
            if (BattleReadyHudController.sBattleType == eBattleType.HeroBattle)
            {
                StarController.SetSrarList(ItemData.Star, ItemData.HeroBattleAwakenLevel);
            }
            else
            {
                //天梯选人界面特殊处理
                if (ItemData.IsHire)
                {
                    StarController.SetSrarList(ItemData.Star, ItemData.HireAwakeLevel);
                }
                else
                {
                    StarController.SetSrarList(ItemData.Star, ItemData.IsAwaken);
                }
            }
            if (addLevel > 0)
            {
                breakLebel.transform.parent.gameObject.CustomSetActive(true);
                breakLebel.text = "+" + addLevel.ToString();
            }
            else
            {
                breakLebel.transform.parent.gameObject.CustomSetActive(false);
            }

            if (itemData.Level > 0 && LTResourceInstanceHudController.mChooseLevel != null)
            {
                for (int i = 0; i < LTResourceInstanceHudController.mChooseLevel.recommend_partners_id.Length; i++)
                {
                    if (LTResourceInstanceHudController.mChooseLevel.recommend_partners_id[i] != 0 && ItemData.HeroInfo.id == LTResourceInstanceHudController.mChooseLevel.recommend_partners_id[i])
                    {
                        RecommendSprite.CustomSetActive(true);
                        break;
                    }
                }
            }

            DeathSprite.gameObject.CustomSetActive(false);
            if ((BattleReadyHudController.sBattleType == eBattleType.ChallengeCampaign || BattleReadyHudController.sBattleType == eBattleType.AlienMazeBattle) && !FormationUtil.IsAlive(itemData.HeroId, itemData.IsHire) && itemData.uid <= 0)
            {
                DeathSprite.gameObject.CustomSetActive(true);
            }

            if (HireSprite)
            {
                HireSprite.CustomSetActive(itemData.IsHire && ItemData.uid <= 0);
            }

            MercenaryUseFlag.CustomSetActive(false);
            MercenaryUseFlag.CustomSetActive(ShowUseFlag());

            mDMono.gameObject.CustomSetActive(true);
        }
Example #22
0
        private void UpdateUI()
        {
            if (null != ItemData)
            {
                mDMono.gameObject.GetComponent <BoxCollider>().enabled = true;
                string templateid    = EB.Dot.String(m_EconomyIDPropertyName, ItemData, "");
                int    num           = EB.Dot.Integer(m_NumPropertyName, ItemData, 0);
                int    quality_level = EB.Dot.Integer(m_QualityLevelPropertyName, ItemData, 0);

                m_Icon.spriteName        = Hotfix_LT.Data.EconemyTemplateManager.GetItemIcon(templateid);
                m_Type                   = EB.Dot.String(m_TypeName, ItemData, "");
                m_LevelBorder.spriteName = UIItemLvlDataLookup.LvlToStr(quality_level + "");
                if (quality_level == 7)
                {
                    m_FrameBG.spriteName = "Ty_Quality_Xuancai_Di";
                }
                else
                {
                    m_FrameBG.spriteName = "Ty_Di_2";
                }
                m_FrameBG.color = UIItemLvlDataLookup.GetItemFrameBGColor(quality_level + "");
                m_LevelBorder.gameObject.CustomSetActive(true);

                HotfixCreateFX.ShowItemQualityFX(mQualityFX, mEffectClip, mDMono.transform, quality_level);

                m_Flag.CustomSetActive(m_Type == "HeroShard");
                m_EquipSuitIcon.gameObject.CustomSetActive(m_Type == "Equipment");
                m_EquipLevel.gameObject.CustomSetActive(m_Type == "Equipment");

                if (m_Type == "Equipment")
                {
                    int equipLevel = EB.Dot.Integer(m_EquipLevelStr, ItemData, 1);
                    if (equipLevel <= 0)
                    {
                        m_EquipLevel.gameObject.CustomSetActive(false);
                    }
                    else
                    {
                        m_EquipLevel.gameObject.CustomSetActive(true);
                        m_EquipLevel.text         = m_EuqipLevelShadow.text = "+" + equipLevel;
                        m_EquipLevelBG.spriteName = UIItemLvlDataLookup.GetEquipLevelBGStr(quality_level);
                    }
                    m_EquipSuitIcon.spriteName = Hotfix_LT.Data.EconemyTemplateManager.GetEquipSuitIcon(templateid);
                }

                int grade = Hotfix_LT.Data.EconemyTemplateManager.Instance.GetGoodsGradeNum(templateid);
                m_boxGradeNumLab.gameObject.CustomSetActive(grade != 0);
                if (grade != 0)
                {
                    m_boxGradeNumLab.text = string.Format("+{0}", grade);
                }

                string suitIcon = Hotfix_LT.Data.EconemyTemplateManager.Instance.GetEquipSuit(templateid);
                if (!string.IsNullOrEmpty(suitIcon))
                {
                    m_EquipSuitIcon.gameObject.CustomSetActive(true);
                    m_EquipSuitIcon.spriteName = suitIcon;
                }

                if (m_Count != null)
                {
                    if (num > 1)
                    {
                        m_Count.text = num + "";
                        m_Count.gameObject.CustomSetActive(true);
                    }
                    else
                    {
                        m_Count.gameObject.CustomSetActive(false);
                    }
                }
                string InventoryId = EB.Dot.String("inventory_id", ItemData, "");
                if (LTInventoryAllController._CurrentSelectCellId != null && LTInventoryAllController._CurrentSelectCellId.Contains(InventoryId))
                {
                    LTInventoryAllController._CurrentSelectCell = mDMono.transform.GetMonoILRComponentByClassPath <UIInventoryBagCellController>("Hotfix_LT.UI.UIInventoryBagCellController");
                    Border.CustomSetActive(true);
                }
                else
                {
                    Border.CustomSetActive(false);
                }

                //红点判断
                string eid = EB.Dot.String("economy_id", ItemData, null);
                if (eid != null)
                {
                    var GeneralItem = Hotfix_LT.Data.EconemyTemplateManager.Instance.GetGeneral(eid);
                    RedPoint.CustomSetActive(GeneralItem != null && GeneralItem.CanUse && !LTMainHudManager.Instance.ItemsList.Contains(InventoryId));
                }
            }
            else
            {
                m_Icon.spriteName = "";
                m_LevelBorder.gameObject.CustomSetActive(false);
                m_Flag.CustomSetActive(false);
                m_EquipSuitIcon.gameObject.CustomSetActive(false);
                m_EquipLevel.gameObject.CustomSetActive(false);
                m_boxGradeNumLab.gameObject.CustomSetActive(false);
                mDMono.gameObject.GetComponent <BoxCollider>().enabled = false;
                if (m_Count != null)
                {
                    m_Count.gameObject.CustomSetActive(false);
                }
                RedPoint.CustomSetActive(false);
                Border.CustomSetActive(false);
                if (mQualityFX != null)
                {
                    mQualityFX.gameObject.CustomSetActive(false);
                }
                else
                {
                    if (mDMono.transform.Find("QualityFX") != null)
                    {
                        mQualityFX  = mDMono.transform.Find("QualityFX").GetComponent <ParticleSystemUIComponent>();
                        mEffectClip = mDMono.transform.Find("QualityFX").GetComponent <EffectClip>();
                        mQualityFX.gameObject.CustomSetActive(false);
                    }
                }
            }
        }
Example #23
0
 public void ShowItemFX(int qualityLevel)
 {
     HotfixCreateFX.ShowItemQualityFX(mQualityFX, mEffectClip, Icon.transform.parent, qualityLevel);
 }
Example #24
0
 public void SetCharTypeFx(PartnerGrade partnerGrade, Data.eRoleAttr attr)
 {
     HotfixCreateFX.ShowCharTypeFX(charFx, efClip, AttrBGSprite.transform, partnerGrade, attr);
 }
Example #25
0
        private void UpdateItem(bool isRefreshRedPoint = true)
        {
            if (partnerData == null)
            {
                if (mDMono != null && mDMono.gameObject != null)
                {
                    mDMono.gameObject.CustomSetActive(false);
                }
                return;
            }
            mDMono.gameObject.CustomSetActive(true);

            int quality  = 0;
            int addLevel = 0;

            LTPartnerDataManager.GetPartnerQuality(partnerData.UpGradeId, out quality, out addLevel);

            FrameSprite.spriteName = LTPartnerConfig.OUT_LINE_SPRITE_NAME_DIC[quality];
            GameItemUtil.SetColorfulPartnerCellFrame(quality, FrameBGSprite);
            curSelectId = LTPartnerDataManager.Instance.DropSelectPartnerId;

            if (partnerData.HeroId <= 0)
            {
                SetGrey(IconSprite);
                SetGrey(FrameSprite);
                SetDark(FrameBGSprite);
            }
            else
            {
                SetNormal(IconSprite);
                SetNormal(FrameSprite);
            }

            if (addLevel > 0)
            {
                breakLebel.transform.parent.gameObject.CustomSetActive(true);
                breakLebel.text = "+" + addLevel.ToString();
            }
            else
            {
                breakLebel.transform.parent.gameObject.SetActive(false);
            }
            //BottomSprite.spriteName = LTPartnerConfig.OUT_LINE_SPRITE_NAME_DIC[quality];

            IconSprite.spriteName = partnerData.HeroInfo.icon;
            LTPartnerConfig.SetLevelSprite(LevelSprite, partnerData.HeroInfo.char_type, partnerData.ArtifactLevel >= 0);
            LTUIUtil.SetLevelText(LevelLabel.transform.parent.GetComponent <UISprite>(), LevelLabel, partnerData);
            if (partnerData.HeroId > 0)
            {
                PartnerGrade grade = (PartnerGrade)partnerData.HeroInfo.role_grade;
                HotfixCreateFX.ShowCharTypeFX(charFx, efClip, LevelSprite.transform, grade, partnerData.HeroInfo.char_type);
                HotfixCreateFX.ShowUpgradeQualityFX(upgradeFx, FrameSprite.transform, quality, upgradeefclip);
            }
            else
            {
                ShardSlider.value      = (float)partnerData.ShardNum / (float)partnerData.HeroInfo.summon_shard;
                ShardSprite.spriteName = partnerData.ShardNum >= partnerData.HeroInfo.summon_shard ? "Ty_Strip_Green" : "Ty_Strip_Blue";
                ShardLabel.text        = string.Format("{0}/{1}", partnerData.ShardNum, partnerData.HeroInfo.summon_shard);
            }
            isCanSummon = partnerData.HeroId <= 0 && partnerData.ShardNum >= partnerData.HeroInfo.summon_shard;

            isGoIntoBattle = partnerData.IsGoIntoBattle;
            FormationFlagObj.CustomSetActive(isGoIntoBattle);
            SetItemState();
            StarController.SetSrarList(partnerData.Star, partnerData.IsAwaken);
            SetSelectState(partnerData.StatId == curSelectId ? SELECT_STATE.SELECT : SELECT_STATE.UN_SELECT);

            if (isRefreshRedPoint)
            {
                if (isGoIntoBattle)
                {
                    InitRedPoint();
                }
                else
                {
                    RedPoint.CustomSetActive(false);
                    if (partnerData.StatId == curSelectId)
                    {
                        InitRedPoint(false);
                    }
                    ShowSummonRedPoint();
                }
            }
        }
Example #26
0
 public override void OnFocus()
 {
     base.OnFocus();
     HotfixCreateFX.ShowItemQualityFX(mQualityFX, mEffectClip, mIcon.transform, qualityLevel);
 }