// Token: 0x06003D77 RID: 15735 RVA: 0x00115730 File Offset: 0x00113930 public virtual int CanAttackAnikiGymLevel(int levelId, bool isTeamBattle = false) { if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_CanAttackAnikiGymLevelInt32Boolean_hotfix != null) { return(Convert.ToInt32(this.m_CanAttackAnikiGymLevelInt32Boolean_hotfix.call(new object[] { this, levelId, isTeamBattle }))); } BJLuaObjHelper.IsSkipLuaHotfix = false; int num = this.CanOpenLevel(levelId); if (num != 0) { return(num); } if (this.m_battle.IsFighting()) { return(-900); } ConfigDataAnikiLevelInfo configDataAnikiLevelInfo = this.m_configDataLoader.GetConfigDataAnikiLevelInfo(levelId); return(this.CanAttackLevelByEnergyAndSoOn(configDataAnikiLevelInfo, isTeamBattle)); }
// Token: 0x06006BF2 RID: 27634 RVA: 0x001E3D58 File Offset: 0x001E1F58 public int FinishedAnikiGymLevel(int levelId, bool isWin, List <int> battleTreasures) { if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_FinishedAnikiGymLevelInt32BooleanList ` 1_hotfix != null) { return(Convert.ToInt32(this.m_FinishedAnikiGymLevelInt32BooleanList ` 1_hotfix.call(new object[] { this, levelId, isWin, battleTreasures }))); } BJLuaObjHelper.IsSkipLuaHotfix = false; ConfigDataAnikiLevelInfo configDataAnikiLevelInfo = this.m_configDataLoader.GetConfigDataAnikiLevelInfo(levelId); if (configDataAnikiLevelInfo == null) { this.m_battle.FightFinished(GameFunctionStatus.Error, false, true); return(-1901); } if (isWin) { List <int> pveTeam = this.m_battle.GetPveTeam(); this.SetSuccessAnikiGymLevel(configDataAnikiLevelInfo, battleTreasures, pveTeam, false); } this.m_battle.FightFinished(GameFunctionStatus.End, isWin, true); return(0); }
// Token: 0x06003D75 RID: 15733 RVA: 0x001155D0 File Offset: 0x001137D0 public int AttackAnikiGymLevel(int levelId) { if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_AttackAnikiGymLevelInt32_hotfix != null) { return(Convert.ToInt32(this.m_AttackAnikiGymLevelInt32_hotfix.call(new object[] { this, levelId }))); } BJLuaObjHelper.IsSkipLuaHotfix = false; int num = this.CanAttackAnikiGymLevel(levelId, false); if (num != 0) { if (num == -900) { this.m_battle.FightFinished(GameFunctionStatus.Error, false, true); } return(num); } ConfigDataAnikiLevelInfo configDataAnikiLevelInfo = this.m_configDataLoader.GetConfigDataAnikiLevelInfo(levelId); this.m_basicInfo.DecreaseEnergy(configDataAnikiLevelInfo.EnergyFail, GameFunctionType.GameFunctionType_AnikiGym, levelId.ToString()); this.m_battle.SetProcessingBattleInfo(BattleType.AnikiGym, levelId); return(0); }
// Token: 0x06009304 RID: 37636 RVA: 0x002A6E00 File Offset: 0x002A5000 protected override bool IsNeedLoadDynamicRes() { if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_IsNeedLoadDynamicRes_hotfix != null) { return(Convert.ToBoolean(this.m_IsNeedLoadDynamicRes_hotfix.call(new object[] { this }))); } BJLuaObjHelper.IsSkipLuaHotfix = false; IConfigDataLoader configDataLoader = GameManager.Instance.ConfigDataLoader as IConfigDataLoader; base.ClearAssetList(); foreach (KeyValuePair <int, ConfigDataAnikiGymInfo> keyValuePair in configDataLoader.GetAllConfigDataAnikiGymInfo()) { base.CollectSpriteAsset(keyValuePair.Value.Icon); } List <Goods> list = new List <Goods>(); foreach (KeyValuePair <int, ConfigDataAnikiLevelInfo> keyValuePair2 in configDataLoader.GetAllConfigDataAnikiLevelInfo()) { ConfigDataAnikiLevelInfo value = keyValuePair2.Value; base.CollectSpriteAsset(value.Icon1); base.CollectSpriteAsset(value.Icon2); list.Clear(); UIUtility.AppendRandomDropRewardGoodsToList(value.Drop_ID, list); foreach (Goods goods in list) { base.CollectSpriteAsset(UIUtility.GetGoodsIconName(goods.GoodsType, goods.Id)); } } return(base.IsNeedLoadDynamicRes()); }
// Token: 0x06003D7A RID: 15738 RVA: 0x001159E4 File Offset: 0x00113BE4 private int CanAttackLevelByEnergyAndSoOn(ConfigDataAnikiLevelInfo levelInfo, bool isTeamBattle) { if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_CanAttackLevelByEnergyAndSoOnConfigDataAnikiLevelInfoBoolean_hotfix != null) { return(Convert.ToInt32(this.m_CanAttackLevelByEnergyAndSoOnConfigDataAnikiLevelInfoBoolean_hotfix.call(new object[] { this, levelInfo, isTeamBattle }))); } BJLuaObjHelper.IsSkipLuaHotfix = false; int ticketId = this.m_bag.GetTicketId(GameFunctionType.GameFunctionType_AnikiGym); if (!this.m_bag.IsBagItemEnough(GoodsType.GoodsType_Item, ticketId, levelInfo.TicketCost)) { return(-1908); } int consumeEnergy = levelInfo.EnergySuccess; if (isTeamBattle) { consumeEnergy = levelInfo.TeamEnergyCost; } if (!this.m_basicInfo.IsEnergyEnough(consumeEnergy)) { return(-402); } if (this.m_bag.IsBagFullByCurrentSize()) { return(-500); } return(0); }
// Token: 0x06006BF3 RID: 27635 RVA: 0x001E3E48 File Offset: 0x001E2048 public void SetSuccessAnikiGymLevel(ConfigDataAnikiLevelInfo levelInfo, List <int> battleTreasures, List <int> heroes, bool isTeamBattle) { if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_SetSuccessAnikiGymLevelConfigDataAnikiLevelInfoList ` 1List ` 1Boolean_hotfix != null) { this.m_SetSuccessAnikiGymLevelConfigDataAnikiLevelInfoList ` 1List ` 1Boolean_hotfix.call(new object[] { this, levelInfo, battleTreasures, heroes, isTeamBattle }); return; } BJLuaObjHelper.IsSkipLuaHotfix = false; int energyCost = 0; if (!isTeamBattle) { energyCost = levelInfo.EnergySuccess - levelInfo.EnergyFail; } base.SetCommonSuccessAnikiGymLevel(levelInfo, battleTreasures, heroes, energyCost, isTeamBattle); BattleReward battleReward = (this.m_battle as BattleComponent).GetBattleReward(); battleReward.PlayerExp = levelInfo.PlayerExp; battleReward.HeroExp = this.m_hero.GetAdditiveHeroAddExp(levelInfo.HeroExp); battleReward.Gold = levelInfo.Gold; }
// Token: 0x060092BD RID: 37565 RVA: 0x002A6078 File Offset: 0x002A4278 public void SetAnikiLevelInfo(ConfigDataAnikiLevelInfo levelInfo) { if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_SetAnikiLevelInfoConfigDataAnikiLevelInfo_hotfix != null) { this.m_SetAnikiLevelInfoConfigDataAnikiLevelInfo_hotfix.call(new object[] { this, levelInfo }); return; } BJLuaObjHelper.IsSkipLuaHotfix = false; this.m_anikiLevelInfo = levelInfo; this.m_nameText.text = levelInfo.Name; this.m_levelText.text = levelInfo.MonsterLevel.ToString(); this.m_icon1Image.sprite = AssetUtility.Instance.GetSprite(levelInfo.Icon1); this.m_icon2Image.sprite = AssetUtility.Instance.GetSprite(levelInfo.Icon2); this.m_energyText.text = levelInfo.EnergySuccess.ToString(); GameObjectUtility.DestroyChildren(this.m_rewardGroupGameObject); GameObject assetInContainer = base.GetAssetInContainer <GameObject>("RewardGoods"); List <Goods> list = new List <Goods>(); UIUtility.AppendRandomDropRewardGoodsToList(levelInfo.Drop_ID, list); if (list.Count > levelInfo.DisplayRewardCount) { list.RemoveRange(levelInfo.DisplayRewardCount, list.Count - levelInfo.DisplayRewardCount); } RewardGoodsUIController.CreateRewardGoodsList(list, this.m_rewardGroupGameObject.transform, assetInContainer, null, false, 0, true); }
// Token: 0x0600E0D6 RID: 57558 RVA: 0x003C98E0 File Offset: 0x003C7AE0 private void OnLockButtonClick() { if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_OnLockButtonClick_hotfix != null) { this.m_OnLockButtonClick_hotfix.call(new object[] { this }); return; } BJLuaObjHelper.IsSkipLuaHotfix = false; IConfigDataLoader configDataLoader = GameManager.Instance.ConfigDataLoader as IConfigDataLoader; ConfigDataAnikiLevelInfo configDataAnikiLevelInfo = configDataLoader.GetConfigDataAnikiLevelInfo(this.Room.Config.LevelToUnlock); CommonUIController.Instance.ShowMessage(string.Format(configDataLoader.UtilityGetStringByStringTable(StringTableId.StringTableId_Msg_LevelFinishUnlock), configDataAnikiLevelInfo.m_groupInfo.Name), 2f, null, true); }
// Token: 0x06006BF5 RID: 27637 RVA: 0x001E4034 File Offset: 0x001E2234 public bool IsAnikiLevelOpened(int anikiLevelId) { if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_IsAnikiLevelOpenedInt32_hotfix != null) { return(Convert.ToBoolean(this.m_IsAnikiLevelOpenedInt32_hotfix.call(new object[] { this, anikiLevelId }))); } BJLuaObjHelper.IsSkipLuaHotfix = false; ConfigDataAnikiLevelInfo configDataAnikiLevelInfo = this.m_configDataLoader.GetConfigDataAnikiLevelInfo(anikiLevelId); return(configDataAnikiLevelInfo != null && (configDataAnikiLevelInfo.PreLevel == 0 || this.m_anikiGymDS.IsLevelFinished(configDataAnikiLevelInfo.PreLevel))); }
// Token: 0x06003D7B RID: 15739 RVA: 0x00115AE0 File Offset: 0x00113CE0 protected void SetCommonSuccessAnikiGymLevel(ConfigDataAnikiLevelInfo levelInfo, List <int> battleTreasures, List <int> heroes, int energyCost, bool isBattleTeam) { if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_SetCommonSuccessAnikiGymLevelConfigDataAnikiLevelInfoList ` 1List ` 1Int32Boolean_hotfix != null) { this.m_SetCommonSuccessAnikiGymLevelConfigDataAnikiLevelInfoList ` 1List ` 1Int32Boolean_hotfix.call(new object[] { this, levelInfo, battleTreasures, heroes, energyCost, isBattleTeam }); return; } BJLuaObjHelper.IsSkipLuaHotfix = false; this.m_battle.AddBattleTreasures(battleTreasures); this.m_basicInfo.AddPlayerExp(levelInfo.PlayerExp); this.m_battle.AddFightHeroFightNumsAndExp(heroes, levelInfo.HeroExp); this.m_basicInfo.AddGold(levelInfo.Gold, GameFunctionType.GameFunctionType_AnikiGym, levelInfo.ID.ToString()); if (levelInfo.TicketCost > 0) { int ticketId = this.m_bag.GetTicketId(GameFunctionType.GameFunctionType_AnikiGym); BagItemBase bagItem = this.m_bag.FindBagItemByType(GoodsType.GoodsType_Item, ticketId); this.m_bag.RemoveBagItemDirectly(bagItem, levelInfo.TicketCost, GameFunctionType.GameFunctionType_AnikiGym, levelInfo.ID.ToString()); } if (energyCost > 0) { this.m_basicInfo.DecreaseEnergy(energyCost, GameFunctionType.GameFunctionType_AnikiGym, levelInfo.ID.ToString()); } this.m_battle.WinPveBattle(levelInfo.Battle_ID); if (this.IsDailyChallenge()) { this.AddChallengedNums(1); } if (!isBattleTeam) { this.m_anikiGymDS.AddFinishedLevel(levelInfo.ID); } if (this.CompleteAnikiGymMissionEvent != null) { this.CompleteAnikiGymMissionEvent(BattleType.AnikiGym, levelInfo.ID, heroes); } }
// Token: 0x06003D78 RID: 15736 RVA: 0x001157F8 File Offset: 0x001139F8 private int CanOpenLevel(int levelId) { if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_CanOpenLevelInt32_hotfix != null) { return(Convert.ToInt32(this.m_CanOpenLevelInt32_hotfix.call(new object[] { this, levelId }))); } BJLuaObjHelper.IsSkipLuaHotfix = false; if (!this.IsGameFunctionOpened()) { return(-1909); } ConfigDataAnikiLevelInfo levelInfo = this.m_configDataLoader.GetConfigDataAnikiLevelInfo(levelId); if (levelInfo == null) { return(-1901); } if (levelInfo.m_battleInfo == null) { return(-1907); } int dayOfWeek = (int)this.m_basicInfo.GetCurrentTime().DayOfWeek; int key = (dayOfWeek != 0) ? dayOfWeek : 7; List <ConfigDataAnikiGymInfo> list; if (!this.m_configDataLoader.AnikiGymData.AnikiGymOfWeekDict.TryGetValue(key, out list)) { return(-1900); } if (list.Find((ConfigDataAnikiGymInfo t) => t.ID == levelInfo.m_groupInfo.ID) == null) { return(-1902); } if (levelInfo.PreLevel != 0 && !this.m_anikiGymDS.IsLevelFinished(levelInfo.PreLevel)) { return(-1903); } return(0); }
// Token: 0x06009311 RID: 37649 RVA: 0x002A77F8 File Offset: 0x002A59F8 private void AnikiUIController_OnStartAnikiLevel(ConfigDataAnikiLevelInfo levelInfo) { if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_AnikiUIController_OnStartAnikiLevelConfigDataAnikiLevelInfo_hotfix != null) { this.m_AnikiUIController_OnStartAnikiLevelConfigDataAnikiLevelInfo_hotfix.call(new object[] { this, levelInfo }); return; } BJLuaObjHelper.IsSkipLuaHotfix = false; ProjectLPlayerContext projectLPlayerContext = GameManager.Instance.PlayerContext as ProjectLPlayerContext; int num = projectLPlayerContext.CanAttackAnikiLevel(levelInfo.ID); if (num == 0) { WorldUITask.StartBattleHappening(BattleType.AnikiGym, levelInfo.ID); } else { WorldUITask.HandleAttackFailResult(num, this.m_currIntent); } }
// Token: 0x06009365 RID: 37733 RVA: 0x002A8144 File Offset: 0x002A6344 public void AnikiUIController_OnStartAnikiLevel(ConfigDataAnikiLevelInfo levelInfo) { this.m_owner.AnikiUIController_OnStartAnikiLevel(levelInfo); }
// Token: 0x06003DA1 RID: 15777 RVA: 0x001168D0 File Offset: 0x00114AD0 public void SetCommonSuccessAnikiGymLevel(ConfigDataAnikiLevelInfo levelInfo, List <int> battleTreasures, List <int> heroes, int energyCost, bool isBattleTeam) { this.m_owner.SetCommonSuccessAnikiGymLevel(levelInfo, battleTreasures, heroes, energyCost, isBattleTeam); }
// Token: 0x06003DA0 RID: 15776 RVA: 0x001168C0 File Offset: 0x00114AC0 public int CanAttackLevelByEnergyAndSoOn(ConfigDataAnikiLevelInfo levelInfo, bool isTeamBattle) { return(this.m_owner.CanAttackLevelByEnergyAndSoOn(levelInfo, isTeamBattle)); }
// 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); }
// Token: 0x06006C01 RID: 27649 RVA: 0x001E4170 File Offset: 0x001E2370 private void __callBase_SetCommonSuccessAnikiGymLevel(ConfigDataAnikiLevelInfo levelInfo, List <int> battleTreasures, List <int> heroes, int energyCost, bool isBattleTeam) { base.SetCommonSuccessAnikiGymLevel(levelInfo, battleTreasures, heroes, energyCost, isBattleTeam); }