// Token: 0x06003F6C RID: 16236 RVA: 0x00125F6C File Offset: 0x0012416C public int CanAttackClimbTowerLevel(int floorId) { if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_CanAttackClimbTowerLevelInt32_hotfix != null) { return(Convert.ToInt32(this.m_CanAttackClimbTowerLevelInt32_hotfix.call(new object[] { this, floorId }))); } BJLuaObjHelper.IsSkipLuaHotfix = false; int num; if (this.IsNeedFlush()) { num = -5403; } else if (floorId < 1 || floorId > this.ClimbTowerFloorMax) { num = -5400; } else if (this.m_climbTowerDS.ClimbTower.Floor + 1 != floorId) { num = -5404; } else { GlobalClimbTowerFloor floor = this.GetFloor(floorId); if (floor == null) { num = -5405; } else { ConfigDataTowerFloorInfo configDataTowerFloorInfo = this.m_configDataLoader.GetConfigDataTowerFloorInfo(floorId); if (configDataTowerFloorInfo == null) { num = -5407; } else { num = this.CanAttackLevelByEnergyAndSoOn(configDataTowerFloorInfo, true); if (num == 0) { if (this.m_configDataLoader.GetConfigDataTowerLevelInfo(floor.LevelId) == null) { num = -5402; } else if (configDataTowerFloorInfo.HasBonusHero != 0 && this.m_configDataLoader.GetConfigDataTowerBonusHeroGroupInfo(floor.BonusHeroGroupId) == null) { num = -5406; } } } } } return(num); }
// Token: 0x06004F00 RID: 20224 RVA: 0x0017DF64 File Offset: 0x0017C164 public static ProClimbTowerFloor ToPb(GlobalClimbTowerFloor globalClimbTowerFloor) { return(new ProClimbTowerFloor { LevelId = globalClimbTowerFloor.LevelId, ArmyRandomSeed = globalClimbTowerFloor.ArmyRandomSeed, BonusHeroGroupId = globalClimbTowerFloor.BonusHeroGroupId, RuleId = globalClimbTowerFloor.RuleId }); }
// Token: 0x06003F6B RID: 16235 RVA: 0x00125E1C File Offset: 0x0012401C public int AttackClimbTowerLevel(int floorId) { if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_AttackClimbTowerLevelInt32_hotfix != null) { return(Convert.ToInt32(this.m_AttackClimbTowerLevelInt32_hotfix.call(new object[] { this, floorId }))); } BJLuaObjHelper.IsSkipLuaHotfix = false; int num = this.CanAttackClimbTowerLevel(floorId); if (num != 0) { return(num); } if (num != 0) { if (num == -900) { this.m_battle.FightFinished(GameFunctionStatus.Error, false, true); } return(num); } ConfigDataTowerFloorInfo configDataTowerFloorInfo = this.m_configDataLoader.GetConfigDataTowerFloorInfo(floorId); this.m_basicInfo.DecreaseEnergy(configDataTowerFloorInfo.EnergyFail, GameFunctionType.GameFunctionType_ClimbTower, floorId.ToString()); GlobalClimbTowerFloor globalClimbTowerFloor = this.m_climbTowerDS.GlobalClimbTowerInfo.Floors[floorId - 1]; this.m_battle.SetProcessingBattleInfo(BattleType.ClimbTower, floorId); this.m_battle.SetBattleArmyRandomSeed(globalClimbTowerFloor.ArmyRandomSeed); ClimberTowerProcessingBattleParamInterface climberTowerProcessingBattleParamInterface = new ClimberTowerProcessingBattleParamInterface(this.m_battle.GetProcessingBattle()); climberTowerProcessingBattleParamInterface.SetFloorId(floorId); climberTowerProcessingBattleParamInterface.SetLevelId(globalClimbTowerFloor.LevelId); climberTowerProcessingBattleParamInterface.SetRuleId(globalClimbTowerFloor.RuleId); climberTowerProcessingBattleParamInterface.SetBonusHeroGroupId(globalClimbTowerFloor.BonusHeroGroupId); return(0); }
// Token: 0x06003F6E RID: 16238 RVA: 0x0012618C File Offset: 0x0012438C public GlobalClimbTowerInfo NewClimbTower(int seed) { if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_NewClimbTowerInt32_hotfix != null) { return((GlobalClimbTowerInfo)this.m_NewClimbTowerInt32_hotfix.call(new object[] { this, seed })); } BJLuaObjHelper.IsSkipLuaHotfix = false; GlobalClimbTowerInfo globalClimbTowerInfo = new GlobalClimbTowerInfo(); List <int> list = new List <int>(); foreach (KeyValuePair <int, ConfigDataTowerBonusHeroGroupInfo> keyValuePair in this.m_configDataLoader.GetAllConfigDataTowerBonusHeroGroupInfo()) { list.Add(keyValuePair.Key); } Random random = new Random(seed); for (int i = 1; i <= this.ClimbTowerFloorMax; i++) { ConfigDataTowerFloorInfo configDataTowerFloorInfo = this.m_configDataLoader.GetConfigDataTowerFloorInfo(i); GlobalClimbTowerFloor globalClimbTowerFloor = new GlobalClimbTowerFloor(); globalClimbTowerFloor.LevelId = configDataTowerFloorInfo.RandomLevelIdList[random.Next(configDataTowerFloorInfo.RandomLevelIdList.Count)]; globalClimbTowerFloor.ArmyRandomSeed = random.Next(); ConfigDataTowerLevelInfo configDataTowerLevelInfo = this.m_configDataLoader.GetConfigDataTowerLevelInfo(globalClimbTowerFloor.LevelId); globalClimbTowerFloor.RuleId = configDataTowerLevelInfo.BattleRuleList[random.Next(configDataTowerLevelInfo.BattleRuleList.Count)]; if (configDataTowerFloorInfo.HasBonusHero != 0) { globalClimbTowerFloor.BonusHeroGroupId = list[random.Next(list.Count)]; } globalClimbTowerInfo.Floors.Add(globalClimbTowerFloor); } return(globalClimbTowerInfo); }