Esempio n. 1
0
        // Token: 0x06004F01 RID: 20225 RVA: 0x0017DFA8 File Offset: 0x0017C1A8
        public static GlobalClimbTowerInfo FromPb(ProClimbTower pbClimbTower)
        {
            GlobalClimbTowerInfo globalClimbTowerInfo = new GlobalClimbTowerInfo();

            globalClimbTowerInfo.ClimbNextWeekFlushTime = new DateTime(pbClimbTower.NextFlushTime);
            foreach (ProClimbTowerFloor pbClimbTowerFloor in pbClimbTower.Floors)
            {
                globalClimbTowerInfo.Floors.Add(ClimbTower.FromPb(pbClimbTowerFloor));
            }
            return(globalClimbTowerInfo);
        }
Esempio n. 2
0
        // Token: 0x06004EFF RID: 20223 RVA: 0x0017DEE0 File Offset: 0x0017C0E0
        public static ProClimbTower ToPb(GlobalClimbTowerInfo globalClimbTowerInfo)
        {
            ProClimbTower proClimbTower = new ProClimbTower();

            proClimbTower.NextFlushTime = globalClimbTowerInfo.ClimbNextWeekFlushTime.Ticks;
            foreach (GlobalClimbTowerFloor globalClimbTowerFloor in globalClimbTowerInfo.Floors)
            {
                proClimbTower.Floors.Add(ClimbTower.ToPb(globalClimbTowerFloor));
            }
            return(proClimbTower);
        }
Esempio n. 3
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);
        }
 // Token: 0x06004ABB RID: 19131 RVA: 0x00174B40 File Offset: 0x00172D40
 public void SetGlobalClimbTowerInfo(GlobalClimbTowerInfo info)
 {
     this.GlobalClimbTowerInfo = info;
 }