예제 #1
0
        // Token: 0x0600CE0A RID: 52746 RVA: 0x0038B4F8 File Offset: 0x003896F8
        private void CreatePathItemList(List <GetPathData> getPathList, string getPathDesc)
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_CreatePathItemListList ` 1String_hotfix != null)
            {
                this.m_CreatePathItemListList ` 1String_hotfix.call(new object[]
                {
                    this,
                    getPathList,
                    getPathDesc
                });
                return;
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            GameObjectUtility.DestroyChildren(this.m_contentObj);
            if (getPathList == null || getPathList.Count == 0)
            {
                this.m_tips.gameObject.SetActive(true);
                this.m_tipsText.text = getPathDesc;
                return;
            }
            this.m_tips.gameObject.SetActive(false);
            IConfigDataLoader configDataLoader = GameManager.Instance.ConfigDataLoader as IConfigDataLoader;

            foreach (GetPathData getPathData in getPathList)
            {
                if (getPathData.PathType == GetPathType.GetPathType_HeroDungeon)
                {
                    ConfigDataHeroDungeonLevelInfo configDataHeroDungeonLevelInfo = configDataLoader.GetConfigDataHeroDungeonLevelInfo(getPathData.ID);
                    if (configDataHeroDungeonLevelInfo == null)
                    {
                        continue;
                    }
                    ConfigDataHeroInformationInfo configDataHeroInformationInfo = configDataLoader.GetConfigDataHeroInformationInfo(configDataHeroDungeonLevelInfo.m_chapterId);
                    if (configDataHeroInformationInfo == null || !configDataHeroInformationInfo.IsDungeonLevelsUnLock)
                    {
                        continue;
                    }
                }
                GameObject gameObject = UnityEngine.Object.Instantiate <GameObject>(this.m_itemPrefab);
                GetPathItemUIController getPathItemUIController = GameObjectUtility.AddControllerToGameObject <GetPathItemUIController>(gameObject);
                getPathItemUIController.EventOnGotoButtonClick += this.OnGetPathItemGotoButtonClick;
                getPathItemUIController.SetGetPath(getPathData);
                gameObject.transform.SetParent(this.m_contentObj.transform, false);
            }
        }
        // Token: 0x0600CE55 RID: 52821 RVA: 0x0038C0BC File Offset: 0x0038A2BC
        public void SetGetPath(GetPathData getPathInfo)
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_SetGetPathGetPathData_hotfix != null)
            {
                this.m_SetGetPathGetPathData_hotfix.call(new object[]
                {
                    this,
                    getPathInfo
                });
                return;
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            ProjectLPlayerContext projectLPlayerContext = GameManager.Instance.PlayerContext as ProjectLPlayerContext;
            IConfigDataLoader     configDataLoader      = GameManager.Instance.ConfigDataLoader as IConfigDataLoader;

            this.GetPathInfo = getPathInfo;
            ConfigDataStringTableForListInfo configDataStringTableForListInfo = configDataLoader.GetConfigDataStringTableForListInfo(getPathInfo.Name);

            this.m_nameText.text = configDataStringTableForListInfo.Content;
            int  num   = 0;
            int  num2  = 0;
            bool flag  = false;
            bool flag2 = true;

            switch (getPathInfo.PathType)
            {
            case GetPathType.GetPathType_Rift:
            {
                flag2 = projectLPlayerContext.IsGameFunctionOpened(GameFunctionType.GameFunctionType_Rift);
                RiftLevelStatus riftLevelStatus = projectLPlayerContext.GetRiftLevelStatus(getPathInfo.ID);
                flag2 = (flag2 && riftLevelStatus == RiftLevelStatus.Open);
                ConfigDataRiftLevelInfo configDataRiftLevelInfo = configDataLoader.GetConfigDataRiftLevelInfo(getPathInfo.ID);
                num  = projectLPlayerContext.GetRiftLevelCanChallengeNums(configDataRiftLevelInfo);
                num2 = projectLPlayerContext.GetRiftLevelCanChallengeMaxNums(configDataRiftLevelInfo);
                flag = true;
                break;
            }

            case GetPathType.GetPathType_Aniki:
                flag2 = projectLPlayerContext.IsGameFunctionOpened(GameFunctionType.GameFunctionType_AnikiGym);
                break;

            case GetPathType.GetPathType_ThearchyTrial:
                flag2 = projectLPlayerContext.IsGameFunctionOpened(GameFunctionType.GameFunctionType_ThearchyTrial);
                break;

            case GetPathType.GetPathType_Summon1:
            case GetPathType.GetPathType_Summon2:
            case GetPathType.GetPathType_Summon3:
                flag2 = projectLPlayerContext.IsGameFunctionOpened(GameFunctionType.GameFunctionType_SelectCard);
                break;

            case GetPathType.GetPathType_MemoryCorridor:
                flag2 = projectLPlayerContext.IsGameFunctionOpened(GameFunctionType.GameFunctionType_MemoryCorridor);
                break;

            case GetPathType.GetPathType_HeroTraining:
                flag2 = projectLPlayerContext.IsGameFunctionOpened(GameFunctionType.GameFunctionType_HeroTrainning);
                break;

            case GetPathType.GetPathType_Drill1:
            case GetPathType.GetPathType_Drill2:
                flag2 = projectLPlayerContext.IsGameFunctionOpened(GameFunctionType.GameFunctionType_TrainingGround);
                break;

            case GetPathType.GetPathType_Fetter:
                flag2 = projectLPlayerContext.IsGameFunctionOpened(GameFunctionType.GameFunctionType_Fetters);
                break;

            case GetPathType.GetPathType_Arena:
                flag2 = projectLPlayerContext.IsGameFunctionOpened(GameFunctionType.GameFunctionType_ArenaBattle);
                break;

            case GetPathType.GetPathType_Friend:
                flag2 = projectLPlayerContext.IsGameFunctionOpened(GameFunctionType.GameFunctionType_Friend);
                break;

            case GetPathType.GetPathType_TreasureMap:
                flag2 = projectLPlayerContext.IsGameFunctionOpened(GameFunctionType.GameFunctionType_TreasureMap);
                break;

            case GetPathType.GetPathType_Mission:
                flag2 = projectLPlayerContext.IsGameFunctionOpened(GameFunctionType.GameFunctionType_Mission);
                break;

            case GetPathType.GetPathType_HeroDungeon:
            {
                ConfigDataHeroDungeonLevelInfo configDataHeroDungeonLevelInfo = configDataLoader.GetConfigDataHeroDungeonLevelInfo(getPathInfo.ID);
                flag2 = (configDataHeroDungeonLevelInfo != null && projectLPlayerContext.IsGameFunctionOpened(GameFunctionType.GameFunctionType_HeroDungeon) && (projectLPlayerContext.CanAttackHeroDungeonLevel(getPathInfo.ID) == 0 || projectLPlayerContext.CanAttackHeroDungeonLevel(getPathInfo.ID) == -2905));
                num   = projectLPlayerContext.GetHeroDungeonLevelCanChallengeNum(configDataHeroDungeonLevelInfo);
                num2  = projectLPlayerContext.GetHeroDungeonLevelCanChallengeMaxNum(configDataHeroDungeonLevelInfo);
                flag  = true;
                break;
            }
            }
            if (flag2)
            {
                if (flag)
                {
                    this.m_stateCtrl.SetToUIState("Number", false, true);
                    this.m_timesValue.text    = num.ToString();
                    this.m_timesAllValue.text = num2.ToString();
                    if (num != 0)
                    {
                        this.m_timesStateCtrl.SetToUIState("Normal", false, true);
                    }
                    else
                    {
                        this.m_timesStateCtrl.SetToUIState("None", false, true);
                    }
                }
                else
                {
                    this.m_stateCtrl.SetToUIState("Normal", false, true);
                }
            }
            else
            {
                this.m_stateCtrl.SetToUIState("Lock", false, true);
            }
        }