// Token: 0x06004DE0 RID: 19936 RVA: 0x0017B6C4 File Offset: 0x001798C4
        public static ArenaOpponentDefensiveBattleInfo PBDefensiveBattleInfoToDefensiveBattleInfo(ProArenaDefensiveBattleInfo pbDefensiveBattleInfo)
        {
            ArenaOpponentDefensiveBattleInfo arenaOpponentDefensiveBattleInfo = new ArenaOpponentDefensiveBattleInfo();

            arenaOpponentDefensiveBattleInfo.BattleExpiredTime                      = pbDefensiveBattleInfo.BattleExpiredTime;
            arenaOpponentDefensiveBattleInfo.BattleRandomSeed                       = pbDefensiveBattleInfo.RandomSeed;
            arenaOpponentDefensiveBattleInfo.BattleTeamSnapshot.BattleId            = pbDefensiveBattleInfo.BattleId;
            arenaOpponentDefensiveBattleInfo.BattleTeamSnapshot.ArenaDefenderRuleId = pbDefensiveBattleInfo.ArenaDefenderRuleId;
            arenaOpponentDefensiveBattleInfo.ArenaOpponentPointZoneId               = pbDefensiveBattleInfo.ArenaOpponentPointZoneId;
            arenaOpponentDefensiveBattleInfo.BattleTeamSnapshot.PlayerLevel         = pbDefensiveBattleInfo.PlayerLevel;
            foreach (ProBattleHero pbBattleHero in pbDefensiveBattleInfo.DefenderHeroes)
            {
                arenaOpponentDefensiveBattleInfo.BattleTeamSnapshot.DefenderHeroes.Add(BattleHero.PBBattleHeroToBattleHero(pbBattleHero));
            }
            foreach (ProTrainingTech tech in pbDefensiveBattleInfo.Techs)
            {
                arenaOpponentDefensiveBattleInfo.BattleTeamSnapshot.Techs.Add(TrainingTech.FromDataSection(tech));
            }
            return(arenaOpponentDefensiveBattleInfo);
        }
Beispiel #2
0
 // Token: 0x06004A45 RID: 19013 RVA: 0x00173CDC File Offset: 0x00171EDC
 public void SetArenaDefensiveBattleInfo(ArenaOpponentDefensiveBattleInfo info)
 {
     this.ArenaPlayerInfo.OpponentDefensiveBattleInfo = info;
 }
        // Token: 0x06004DE1 RID: 19937 RVA: 0x0017B7E8 File Offset: 0x001799E8
        public static ProArenaDefensiveBattleInfo DefensiveBattleInfoToPBDefensiveBattleInfo(ArenaOpponentDefensiveBattleInfo defensiveBattleInfo)
        {
            ProArenaDefensiveBattleInfo proArenaDefensiveBattleInfo = new ProArenaDefensiveBattleInfo();

            proArenaDefensiveBattleInfo.BattleExpiredTime        = defensiveBattleInfo.BattleExpiredTime;
            proArenaDefensiveBattleInfo.RandomSeed               = defensiveBattleInfo.BattleRandomSeed;
            proArenaDefensiveBattleInfo.ArenaOpponentPointZoneId = defensiveBattleInfo.ArenaOpponentPointZoneId;
            ArenaPlayerDefensiveTeamSnapshot battleTeamSnapshot = defensiveBattleInfo.BattleTeamSnapshot;

            proArenaDefensiveBattleInfo.BattleId            = battleTeamSnapshot.BattleId;
            proArenaDefensiveBattleInfo.ArenaDefenderRuleId = battleTeamSnapshot.ArenaDefenderRuleId;
            proArenaDefensiveBattleInfo.PlayerLevel         = battleTeamSnapshot.PlayerLevel;
            foreach (BattleHero battleHero in battleTeamSnapshot.DefenderHeroes)
            {
                proArenaDefensiveBattleInfo.DefenderHeroes.Add(BattleHero.BattleHeroToPBBattleHero(battleHero));
            }
            foreach (TrainingTech trainingTech in battleTeamSnapshot.Techs)
            {
                proArenaDefensiveBattleInfo.Techs.Add(trainingTech.ToPro());
            }
            return(proArenaDefensiveBattleInfo);
        }