Пример #1
0
        // Token: 0x060116E6 RID: 71398 RVA: 0x00484448 File Offset: 0x00482648
        public void SetHeroPhantomLevelInfo(ConfigDataHeroPhantomLevelInfo levelInfo)
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_SetHeroPhantomLevelInfoConfigDataHeroPhantomLevelInfo_hotfix != null)
            {
                this.m_SetHeroPhantomLevelInfoConfigDataHeroPhantomLevelInfo_hotfix.call(new object[]
                {
                    this,
                    levelInfo
                });
                return;
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            ProjectLPlayerContext projectLPlayerContext = GameManager.Instance.PlayerContext as ProjectLPlayerContext;

            this.m_heroPhantomLevelInfo  = levelInfo;
            this.m_levelText.text        = levelInfo.MonsterLevel.ToString();
            this.m_energyText.text       = levelInfo.EnergySuccess.ToString();
            this.m_achievementCount.text = projectLPlayerContext.GetHeroPhantomLevelCompleteAchievementCount(levelInfo.ID) + "/" + levelInfo.m_achievements.Length;
            this.m_firstCleanUIStateController.SetToUIState((!projectLPlayerContext.IsHeroPhantomLevelFirstCleanComplete(levelInfo.ID)) ? "Normal" : "Clean", false, true);
            GameObject assetInContainer = base.GetAssetInContainer <GameObject>("RewardGoods");

            GameObjectUtility.DestroyChildren(this.m_firstRewardGroupGameObject);
            List <Goods> list = new List <Goods>();

            if (levelInfo.FirstClearDropItems.Count > 0)
            {
                list.Add(levelInfo.FirstClearDropItems[0]);
            }
            RewardGoodsUIController.CreateRewardGoodsList(list, this.m_firstRewardGroupGameObject.transform, assetInContainer, null, true, 0, true);
            GameObjectUtility.DestroyChildren(this.m_rewardGroupGameObject);
            List <Goods> list2 = new List <Goods>();

            UIUtility.AppendRandomDropRewardGoodsToList(levelInfo.DropID, list2);
            if (list2.Count > levelInfo.DisplayRewardCount)
            {
                list2.RemoveRange(levelInfo.DisplayRewardCount, list2.Count - levelInfo.DisplayRewardCount);
            }
            RewardGoodsUIController.CreateRewardGoodsList(list2, this.m_rewardGroupGameObject.transform, assetInContainer, null, false, 0, true);
        }
Пример #2
0
        // Token: 0x06011740 RID: 71488 RVA: 0x00485B40 File Offset: 0x00483D40
        private void HeroPhantomUIController_OnStartHeroTrainningLevel(ConfigDataHeroPhantomLevelInfo levelInfo)
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_HeroPhantomUIController_OnStartHeroTrainningLevelConfigDataHeroPhantomLevelInfo_hotfix != null)
            {
                this.m_HeroPhantomUIController_OnStartHeroTrainningLevelConfigDataHeroPhantomLevelInfo_hotfix.call(new object[]
                {
                    this,
                    levelInfo
                });
                return;
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            ProjectLPlayerContext projectLPlayerContext = GameManager.Instance.PlayerContext as ProjectLPlayerContext;
            int num = projectLPlayerContext.CanAttackHeroPhantomLevel(levelInfo.ID);

            if (num == 0)
            {
                WorldUITask.StartBattleHappening(BattleType.HeroPhantom, levelInfo.ID);
            }
            else
            {
                WorldUITask.HandleAttackFailResult(num, this.m_currIntent);
            }
        }
Пример #3
0
        // Token: 0x0600403F RID: 16447 RVA: 0x0012AAF0 File Offset: 0x00128CF0
        public int CanPostLevelDanmaku(int gameFunctionTypeId, int locationId, List <PostDanmakuEntry> entries)
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_CanPostLevelDanmakuInt32Int32List ` 1_hotfix != null)
            {
                return(Convert.ToInt32(this.m_CanPostLevelDanmakuInt32Int32List ` 1_hotfix.call(new object[]
                {
                    this,
                    gameFunctionTypeId,
                    locationId,
                    entries
                })));
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            int battle_ID;

            switch (gameFunctionTypeId)
            {
            case 9:
            {
                ConfigDataRiftLevelInfo configDataRiftLevelInfo = this.m_configDataLoader.GetConfigDataRiftLevelInfo(locationId);
                if (configDataRiftLevelInfo == null)
                {
                    return(-2701);
                }
                battle_ID = configDataRiftLevelInfo.Battle_ID;
                break;
            }

            case 10:
            {
                ConfigDataScenarioInfo configDataScenarioInfo = this.m_configDataLoader.GetConfigDataScenarioInfo(locationId);
                if (configDataScenarioInfo == null)
                {
                    return(-2701);
                }
                battle_ID = configDataScenarioInfo.Battle_ID;
                break;
            }

            case 11:
            {
                ConfigDataEventInfo configDataEventInfo = this.m_configDataLoader.GetConfigDataEventInfo(locationId);
                if (configDataEventInfo == null)
                {
                    return(-2701);
                }
                battle_ID = configDataEventInfo.Battle_ID;
                break;
            }

            case 12:
            {
                ConfigDataAnikiLevelInfo configDataAnikiLevelInfo = this.m_configDataLoader.GetConfigDataAnikiLevelInfo(locationId);
                if (configDataAnikiLevelInfo == null)
                {
                    return(-2701);
                }
                battle_ID = configDataAnikiLevelInfo.Battle_ID;
                break;
            }

            case 13:
            {
                ConfigDataThearchyTrialLevelInfo configDataThearchyTrialLevelInfo = this.m_configDataLoader.GetConfigDataThearchyTrialLevelInfo(locationId);
                if (configDataThearchyTrialLevelInfo == null)
                {
                    return(-2701);
                }
                battle_ID = configDataThearchyTrialLevelInfo.Battle_ID;
                break;
            }

            default:
                if (gameFunctionTypeId != 41)
                {
                    if (gameFunctionTypeId != 42)
                    {
                        if (gameFunctionTypeId != 56)
                        {
                            if (gameFunctionTypeId != 57)
                            {
                                if (gameFunctionTypeId != 79)
                                {
                                    if (gameFunctionTypeId != 80)
                                    {
                                        if (gameFunctionTypeId != 28)
                                        {
                                            if (gameFunctionTypeId != 51)
                                            {
                                                return(-2700);
                                            }
                                            ConfigDataHeroTrainningLevelInfo configDataHeroTrainningLevelInfo = this.m_configDataLoader.GetConfigDataHeroTrainningLevelInfo(locationId);
                                            if (configDataHeroTrainningLevelInfo == null)
                                            {
                                                return(-2701);
                                            }
                                            battle_ID = configDataHeroTrainningLevelInfo.Battle_ID;
                                        }
                                        else
                                        {
                                            ConfigDataHeroDungeonLevelInfo configDataHeroDungeonLevelInfo = this.m_configDataLoader.GetConfigDataHeroDungeonLevelInfo(locationId);
                                            if (configDataHeroDungeonLevelInfo == null)
                                            {
                                                return(-2701);
                                            }
                                            battle_ID = configDataHeroDungeonLevelInfo.Battle_ID;
                                        }
                                    }
                                    else
                                    {
                                        ConfigDataScoreLevelInfo configDataScoreLevelInfo = this.m_configDataLoader.GetConfigDataScoreLevelInfo(locationId);
                                        if (configDataScoreLevelInfo == null)
                                        {
                                            return(-2701);
                                        }
                                        battle_ID = configDataScoreLevelInfo.Battle_ID;
                                    }
                                }
                                else
                                {
                                    ConfigDataChallengeLevelInfo configDataChallengeLevelInfo = this.m_configDataLoader.GetConfigDataChallengeLevelInfo(locationId);
                                    if (configDataChallengeLevelInfo == null)
                                    {
                                        return(-2701);
                                    }
                                    battle_ID = configDataChallengeLevelInfo.Battle_ID;
                                }
                            }
                            else
                            {
                                ConfigDataCooperateBattleLevelInfo configDataCooperateBattleLevelInfo = this.m_configDataLoader.GetConfigDataCooperateBattleLevelInfo(locationId);
                                if (configDataCooperateBattleLevelInfo == null)
                                {
                                    return(-2701);
                                }
                                battle_ID = configDataCooperateBattleLevelInfo.Battle_ID;
                            }
                        }
                        else
                        {
                            ConfigDataHeroPhantomLevelInfo configDataHeroPhantomLevelInfo = this.m_configDataLoader.GetConfigDataHeroPhantomLevelInfo(locationId);
                            if (configDataHeroPhantomLevelInfo == null)
                            {
                                return(-2701);
                            }
                            battle_ID = configDataHeroPhantomLevelInfo.Battle_ID;
                        }
                    }
                    else
                    {
                        ConfigDataMemoryCorridorLevelInfo configDataMemoryCorridorLevelInfo = this.m_configDataLoader.GetConfigDataMemoryCorridorLevelInfo(locationId);
                        if (configDataMemoryCorridorLevelInfo == null)
                        {
                            return(-2701);
                        }
                        battle_ID = configDataMemoryCorridorLevelInfo.Battle_ID;
                    }
                }
                else
                {
                    ConfigDataTreasureLevelInfo configDataTreasureLevelInfo = this.m_configDataLoader.GetConfigDataTreasureLevelInfo(locationId);
                    if (configDataTreasureLevelInfo == null)
                    {
                        return(-2701);
                    }
                    battle_ID = configDataTreasureLevelInfo.Battle_ID;
                }
                break;
            }
            ConfigDataBattleInfo configDataBattleInfo = this.m_configDataLoader.GetConfigDataBattleInfo(battle_ID);
            int num = 0;

            foreach (PostDanmakuEntry postDanmakuEntry in entries)
            {
                if (postDanmakuEntry.Turn > configDataBattleInfo.TurnMax)
                {
                    return(-2702);
                }
                if (postDanmakuEntry.Turn <= num)
                {
                    return(-2703);
                }
                num = postDanmakuEntry.Turn;
            }
            return(0);
        }
Пример #4
0
 // Token: 0x0601178F RID: 71567 RVA: 0x004863A8 File Offset: 0x004845A8
 public void HeroPhantomUIController_OnStartHeroTrainningLevel(ConfigDataHeroPhantomLevelInfo levelInfo)
 {
     this.m_owner.HeroPhantomUIController_OnStartHeroTrainningLevel(levelInfo);
 }