Пример #1
0
        // Token: 0x06003B3E RID: 15166 RVA: 0x0010EFB0 File Offset: 0x0010D1B0
        public static ProBusinessCard ToProtocol(BusinessCard businessCard)
        {
            ProBusinessCard proBusinessCard = new ProBusinessCard();

            proBusinessCard.UserId          = businessCard.UserId;
            proBusinessCard.HeadIcon        = businessCard.HeadIcon;
            proBusinessCard.Name            = businessCard.Name;
            proBusinessCard.Level           = businessCard.Level;
            proBusinessCard.ArenaPoints     = businessCard.ArenaPoints;
            proBusinessCard.Likes           = businessCard.Likes;
            proBusinessCard.IsOnLine        = businessCard.IsOnLine;
            proBusinessCard.SetInfo         = BusinessCardInfoSet.ToProtocol(businessCard.SetInfo);
            proBusinessCard.StatisticalData = BusinessCardStatisticalData.ToProtocol(businessCard.StatisticalData);
            foreach (BattleHero battleHero in businessCard.Heroes)
            {
                proBusinessCard.Heroes.Add(BattleHero.BattleHeroToPBBattleHero(battleHero));
            }
            foreach (BattleHero battleHero2 in businessCard.MostSkilledHeroes)
            {
                proBusinessCard.MostSkilledHeroes.Add(BattleHero.BattleHeroToPBBattleHero(battleHero2));
            }
            foreach (TrainingTech trainingTech in businessCard.Techs)
            {
                proBusinessCard.Techs.Add(trainingTech.ToPro());
            }
            return(proBusinessCard);
        }
Пример #2
0
 // Token: 0x060031D5 RID: 12757 RVA: 0x000C42C4 File Offset: 0x000C24C4
 public static ProBattleHeroSetupInfo BattleHeroSetupInfoToPbProBattleHeroSetupInfo(BattleHeroSetupInfo info)
 {
     return(new ProBattleHeroSetupInfo
     {
         PlayerIndex = info.PlayerIndex,
         Position = info.Position,
         Hero = ((info.Hero == null) ? null : BattleHero.BattleHeroToPBBattleHero(info.Hero)),
         Flag = (int)info.Flag
     });
 }
Пример #3
0
        // Token: 0x06004E1E RID: 19998 RVA: 0x0017C108 File Offset: 0x0017A308
        public static ProArenaBattleReport ArenaBattleReportToPBArenaBattleReport(ArenaBattleReport arenaBattleReport, bool isBattleData)
        {
            ProArenaBattleReport proArenaBattleReport = new ProArenaBattleReport();

            proArenaBattleReport.Version    = arenaBattleReport.Version;
            proArenaBattleReport.InstanceId = arenaBattleReport.InstanceId;
            if (isBattleData)
            {
                proArenaBattleReport.BattleType          = (int)arenaBattleReport.BattleType;
                proArenaBattleReport.BattleId            = arenaBattleReport.BattleId;
                proArenaBattleReport.RandomSeed          = arenaBattleReport.RandomSeed;
                proArenaBattleReport.ArenaDefenderRuleId = arenaBattleReport.ArenaDefenderRuleId;
                foreach (BattleCommand battleCommand in arenaBattleReport.Commands)
                {
                    proArenaBattleReport.Commands.Add(BattleCommand.BattleCommandToPBBattleCommand(battleCommand));
                }
                foreach (BattleHero battleHero in arenaBattleReport.AttackerHeroes)
                {
                    proArenaBattleReport.AttackerHeroes.Add(BattleHero.BattleHeroToPBBattleHero(battleHero));
                }
                foreach (BattleHero battleHero2 in arenaBattleReport.DefenderHeroes)
                {
                    proArenaBattleReport.DefenderHeroes.Add(BattleHero.BattleHeroToPBBattleHero(battleHero2));
                }
                foreach (TrainingTech trainingTech in arenaBattleReport.AttackerTechs)
                {
                    proArenaBattleReport.AttackerTechs.Add(trainingTech.ToPro());
                }
                foreach (TrainingTech trainingTech2 in arenaBattleReport.DefenderTechs)
                {
                    proArenaBattleReport.DefenderTechs.Add(trainingTech2.ToPro());
                }
            }
            else
            {
                proArenaBattleReport.Status                 = (int)arenaBattleReport.Status;
                proArenaBattleReport.AttackerUserId         = arenaBattleReport.AttackerUserId;
                proArenaBattleReport.AttackerLevel          = arenaBattleReport.AttackerLevel;
                proArenaBattleReport.AttackerName           = arenaBattleReport.AttackerName;
                proArenaBattleReport.DefenderUserId         = arenaBattleReport.DefenderUserId;
                proArenaBattleReport.DefenderLevel          = arenaBattleReport.DefenderLevel;
                proArenaBattleReport.DefenderName           = arenaBattleReport.DefenderName;
                proArenaBattleReport.CreateTime             = arenaBattleReport.CreateTime;
                proArenaBattleReport.AttackerGotArenaPoints = arenaBattleReport.AttackerGotArenaPoints;
                proArenaBattleReport.DefenderGotArenaPoints = arenaBattleReport.DefenderGotArenaPoints;
                proArenaBattleReport.OpponentHeadIcon       = arenaBattleReport.OpponentHeadIcon;
            }
            return(proArenaBattleReport);
        }
        // Token: 0x0600510C RID: 20748 RVA: 0x00182584 File Offset: 0x00180784
        public static ProRealTimePVPBattleReportPlayerData ToPro(this RealTimePVPBattleReportPlayerData Data)
        {
            ProRealTimePVPBattleReportPlayerData proRealTimePVPBattleReportPlayerData = new ProRealTimePVPBattleReportPlayerData
            {
                HeadIcon  = Data.HeadIcon,
                Level     = Data.Level,
                Name      = Data.Name,
                UserId    = Data.UserId,
                ScoreDiff = Data.ScoreDiff
            };

            foreach (BattleHero battleHero in Data.Heroes)
            {
                proRealTimePVPBattleReportPlayerData.Heroes.Add(BattleHero.BattleHeroToPBBattleHero(battleHero));
            }
            foreach (TrainingTech trainingTech in Data.Techs)
            {
                proRealTimePVPBattleReportPlayerData.Techs.Add(trainingTech.ToPro());
            }
            return(proRealTimePVPBattleReportPlayerData);
        }
        // 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);
        }