Esempio n. 1
0
        /// <summary>
        /// 初始化收益显示
        /// </summary>
        public void SetShowInfo()
        {
            int prelevel = maxLevel;

            DataLookupsCache.Instance.SearchIntByID("userCampaignStatus.challengeChapters.bigFloor", out int cacheLevel);
            maxLevel = cacheLevel > maxLevel ? cacheLevel : maxLevel;
            if (maxLevel == 0 || maxLevel > prelevel)
            {
                maxfloor  = Hotfix_LT.Data.SceneTemplateManager.Instance.GetMaxLostChallengeChapterId();
                maxLevel += 1;
                if (maxfloor < maxLevel)
                {
                    maxLevel = maxfloor;
                }
                levelLabel.text          = maxLevel.ToString();
                curReward                = Hotfix_LT.Data.SceneTemplateManager.Instance.GetLostChallengeReward(maxLevel);
                nextReward               = Hotfix_LT.Data.SceneTemplateManager.Instance.GetLostChallengeReward(maxLevel + 1);
                curQuality               = curReward.DropList[0] == null ? 1 : int.Parse(curReward.DropList[0].Substring(1, 1));
                nextQuality              = nextReward.DropList[0] == null ? 1 : int.Parse(nextReward.DropList[0].Substring(1, 1));
                curBGFrame.spriteName    = UIItemLvlDataLookup.GetItemFrameBGSprite(curQuality);
                curBGFrame.color         = LT.Hotfix.Utility.ColorUtility.QualityToFrameColor(curQuality);
                nextBGFrame.spriteName   = UIItemLvlDataLookup.GetItemFrameBGSprite(nextQuality);
                nextBGFrame.color        = LT.Hotfix.Utility.ColorUtility.QualityToFrameColor(nextQuality);
                curQuaLevel.spriteName   = UIItemLvlDataLookup.LvlToStr(curQuality.ToString());
                nextQuaLevel.spriteName  = UIItemLvlDataLookup.LvlToStr(nextQuality.ToString());
                curLayerRate.text        = string.Format("{0}{1}", (curReward.DropRate * 100).ToString("0"), "%");
                NextLayerRate.text       = string.Format("{0}{1}", (nextReward.DropRate * 100).ToString("0"), "%");
                curEquipIcon.spriteName  = LTPartnerEquipDataManager.Instance.GetEquipIconBuyTypeAndQua(showType, curQuality);
                nextEquipIcon.spriteName = LTPartnerEquipDataManager.Instance.GetEquipIconBuyTypeAndQua(showType, nextQuality);
                mDMono.GetComponent <TweenAlpha>().PlayForward();
            }
        }
Esempio n. 2
0
 public void Fill(string iconname, string suiticon, int qualityLevel)
 {
     EquipIcon.spriteName      = iconname;
     EquipsuitIcon.spriteName  = suiticon;
     QualityLevel.spriteName   = UIItemLvlDataLookup.LvlToStr(qualityLevel.ToString());
     QualityFrameBg.spriteName = UIItemLvlDataLookup.GetItemFrameBGSprite(qualityLevel);
     QualityFrameBg.color      = UIItemLvlDataLookup.GetItemFrameBGColor(qualityLevel.ToString());
     EquipmentCell.CustomSetActive(true);
 }
Esempio n. 3
0
        public override void SetMenuData(object param)
        {
            var itemInfo = param as GenericItemInfo;

            if (itemInfo != null)
            {
                curItemInfo = itemInfo;
                var inl = LTItemInfoTool.GetInfo(curItemInfo.EconomyId, LTShowItemType.TYPE_GAMINVENTORY);
                mIcon.spriteName    = inl.icon;
                mFrame.spriteName   = UIItemLvlDataLookup.LvlToStr(inl.quality);
                mFrameBG.spriteName = UIItemLvlDataLookup.GetItemFrameBGSprite(inl.quality);
                mFrameBG.color      = UIItemLvlDataLookup.GetItemFrameBGColor(inl.quality);
                mName.text          = inl.name;
                mTotalNum           = curItemInfo.Num;
                mCurNum             = mTotalNum;
                qualityLevel        = int.Parse(inl.quality);
                Show();

                var suitIcon = Hotfix_LT.Data.EconemyTemplateManager.Instance.GetEquipSuit(curItemInfo.EconomyId);
                if (!string.IsNullOrEmpty(suitIcon))
                {
                    mEquipSuitIcon.gameObject.SetActive(true);
                    mEquipSuitIcon.spriteName = suitIcon;
                }
                else
                {
                    mEquipSuitIcon.gameObject.SetActive(false);
                }

                var grade = Hotfix_LT.Data.EconemyTemplateManager.Instance.GetGoodsGradeNum(curItemInfo.EconomyId);
                mboxGradeNumLab.gameObject.CustomSetActive(grade != 0);
                if (grade != 0)
                {
                    mboxGradeNumLab.text = string.Format("+{0}", grade);
                }
            }
        }
Esempio n. 4
0
        public void Show()
        {
            string economyId = "";
            string unhave;
            int    num;

            if (!DataLookupsCache.Instance.SearchDataByID <string>("tooltip.unhave", out unhave, null))
            {
                if (!DataLookupsCache.Instance.SearchDataByID <string>("{" + m_TipTargetStr + "}.economy_id", out economyId, null))
                {
                    EB.Debug.LogError("SearchDataByID {0}.economy_id is null", m_TipTargetStr);
                    return;
                }
                m_InventoryId = InventoryId;
                if (!DataLookupsCache.Instance.SearchIntByID(m_InventoryId + ".num", out num, null))
                {
                    EB.Debug.LogError("SearchDataByID inventory_id==null");
                }
            }
            else
            {
                if (!DataLookupsCache.Instance.SearchDataByID <string>(m_TipTargetStr, out economyId, null))
                {
                    EB.Debug.LogError("SearchDataByID {0} is null", m_TipTargetStr);
                    return;
                }
                num = GameItemUtil.GetInventoryItemNum(economyId);
            }

            LTIconNameQuality inl = LTItemInfoTool.GetInfo(economyId, LTShowItemType.TYPE_GAMINVENTORY);

            m_Icon.spriteName    = inl.icon;
            m_Frame.spriteName   = UIItemLvlDataLookup.LvlToStr(inl.quality);
            m_FrameBG.spriteName = UIItemLvlDataLookup.GetItemFrameBGSprite(inl.quality);
            m_FrameBG.color      = UIItemLvlDataLookup.GetItemFrameBGColor(inl.quality);
            m_QualityLevel       = int.Parse(inl.quality);
            LTUIUtil.SetText(m_GoodsName, inl.name);
            var itemInfo = Hotfix_LT.Data.EconemyTemplateManager.Instance.GetGeneral(economyId);

            if (itemInfo != null)
            {
                m_ClipFlag.CustomSetActive(itemInfo.System == "HeroShard");
            }
            else
            {
                m_ClipFlag.CustomSetActive(false);
            }

            string equipSuitIconStr = Hotfix_LT.Data.EconemyTemplateManager.GetEquipSuitIcon(economyId);

            if (string.IsNullOrEmpty(equipSuitIconStr))
            {
                m_EquipSuitIcon.gameObject.CustomSetActive(false);

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

            int grade = Hotfix_LT.Data.EconemyTemplateManager.Instance.GetGoodsGradeNum(economyId);

            m_boxGradeNumLab.gameObject.CustomSetActive(grade != 0);
            if (grade != 0)
            {
                m_boxGradeNumLab.text = string.Format("+{0}", grade);
            }

            var item = Hotfix_LT.Data.EconemyTemplateManager.Instance.GetItem(economyId);

            if (item.DropDatas.Count <= 0)
            {
                DropItemsRoot.gameObject.CustomSetActive(true);
                UpdateDrop(item);
            }
            else
            {
                DropItemsRoot.gameObject.CustomSetActive(true);
                UpdateDrop(item);
            }
            ItemInfo.InventoryId = m_InventoryId;
            ItemInfo.EconomyId   = economyId;
            ItemInfo.Num         = num;
            LTUIUtil.SetText(m_NumLabel, EB.Localizer.GetString("ID_LABEL_NAME_HADE") + num);

            //从伙伴进阶界面打开跳转界面需要做刷新伙伴进阶界面操作
            if (!string.IsNullOrEmpty(LTPartnerDataManager.Instance.itemID))
            {
                Hotfix_LT.Messenger.Raise(Hotfix_LT.EventName.OnPartnerUIRefresh, CultivateType.UpGrade);
            }

            IconParent.CustomSetActive(true);
        }