/// <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(); } }
public override void Fill(Hotfix_LT.Data.LostChallengeChapter itemData) { curLevelData = itemData; int maxLevel = 0; DataLookupsCache.Instance.SearchIntByID("userCampaignStatus.challengeChapters.bigFloor", out maxLevel); isLock = curLevelData.CurChapter > maxLevel + 1; UnlockTran.gameObject.CustomSetActive(!isLock); LockTran.gameObject.CustomSetActive(isLock); if (!isLock) { int level = curLevelData.CurChapter; LevelNumLabel.text = string.Format(EB.Localizer.GetString("ID_codefont_in_EconomyTemplateManager_68326"), level); SelectSprite.gameObject.CustomSetActive(curLevelData.Level == LTChallengeInstanceSelectHudController.CurSelectLevel); int taskId = 7000 + curLevelData.CurChapter; string state = string.Empty; DataLookupsCache.Instance.SearchDataByID(string.Format("tasks.{0}.state", taskId), out state); RedPoint.CustomSetActive(state == "finished"); int floor = LTInstanceUtil.GetChallengeLevel(curLevelData.Level); Hotfix_LT.Data.LostChallengeRewardTemplate temp = Hotfix_LT.Data.SceneTemplateManager.Instance.GetLostChallengeReward(System.DateTime.Now.DayOfWeek, floor); if (temp != null) { string id = temp.DropList[0]; var item = Hotfix_LT.Data.EconemyTemplateManager.Instance.GetItem(id); BGSprite.spriteName = string.Format("Goods_Source_Tiaozhanfuben_{0}", item.QualityLevel - 1); } } else { RedPoint.CustomSetActive(false); } }
public void SetDrop() { if (hasInit) { return; } hasInit = true; Hotfix_LT.Data.LostChallengeRewardTemplate temp = Hotfix_LT.Data.SceneTemplateManager.Instance.GetLostChallengeReward(Day, Hotfix_LT.Data.SceneTemplateManager.Instance.LostChallengeRewardMaxFloor); List <string> list = temp.DropList; for (int i = 0; i < ItemList.Count; i++) { if (i < list.Count) { ItemList[i].mDMono.gameObject.CustomSetActive(true); ItemList[i].LTItemData = new LTShowItemData(list[i], 0, LTShowItemType.TYPE_GAMINVENTORY); } else { ItemList[i].mDMono.gameObject.CustomSetActive(false); } } }