// Token: 0x06004A54 RID: 19028 RVA: 0x00173E84 File Offset: 0x00172084
        public void AddArenaBattleReport(ArenaBattleReport report)
        {
            int value = this.ArenaBattleReportInfo.Add(report);

            this.m_instanceId2CacheIndex.Add(report.InstanceId, value);
            base.SetDirty(true);
        }
        // Token: 0x06004A53 RID: 19027 RVA: 0x00173E2C File Offset: 0x0017202C
        public void SetArenaBattleReport(int index, ArenaBattleReport report)
        {
            UpdateCache <ArenaBattleReport> updateCache = this.ArenaBattleReportInfo.Find(index);

            this.m_instanceId2CacheIndex.Remove(updateCache.Data.InstanceId);
            this.ArenaBattleReportInfo.Set(index, report);
            this.m_instanceId2CacheIndex.Add(report.InstanceId, index);
            base.SetDirty(true);
        }
Exemplo n.º 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);
        }
Exemplo n.º 4
0
        // Token: 0x06004E1D RID: 19997 RVA: 0x0017BE64 File Offset: 0x0017A064
        public static ArenaBattleReport PBArenaBattleReportToArenaBattleReport(ProArenaBattleReport pbArenaBattleReport, bool isBattleData)
        {
            ArenaBattleReport arenaBattleReport = new ArenaBattleReport();

            arenaBattleReport.InstanceId = pbArenaBattleReport.InstanceId;
            arenaBattleReport.Version    = pbArenaBattleReport.Version;
            if (isBattleData)
            {
                arenaBattleReport.BattleType          = (BattleType)pbArenaBattleReport.BattleType;
                arenaBattleReport.BattleId            = pbArenaBattleReport.BattleId;
                arenaBattleReport.RandomSeed          = pbArenaBattleReport.RandomSeed;
                arenaBattleReport.ArenaDefenderRuleId = pbArenaBattleReport.ArenaDefenderRuleId;
                foreach (ProBattleCommand pbBattleCommand in pbArenaBattleReport.Commands)
                {
                    arenaBattleReport.Commands.Add(BattleCommand.PBBattleCommandToBattleCommand(pbBattleCommand));
                }
                foreach (ProBattleHero pbBattleHero in pbArenaBattleReport.AttackerHeroes)
                {
                    arenaBattleReport.AttackerHeroes.Add(BattleHero.PBBattleHeroToBattleHero(pbBattleHero));
                }
                foreach (ProBattleHero pbBattleHero2 in pbArenaBattleReport.DefenderHeroes)
                {
                    arenaBattleReport.DefenderHeroes.Add(BattleHero.PBBattleHeroToBattleHero(pbBattleHero2));
                }
                foreach (ProTrainingTech tech in pbArenaBattleReport.AttackerTechs)
                {
                    arenaBattleReport.AttackerTechs.Add(TrainingTech.FromDataSection(tech));
                }
                foreach (ProTrainingTech tech2 in pbArenaBattleReport.DefenderTechs)
                {
                    arenaBattleReport.DefenderTechs.Add(TrainingTech.FromDataSection(tech2));
                }
            }
            else
            {
                arenaBattleReport.Status                 = (ArenaBattleReportStatus)pbArenaBattleReport.Status;
                arenaBattleReport.AttackerUserId         = pbArenaBattleReport.AttackerUserId;
                arenaBattleReport.AttackerLevel          = pbArenaBattleReport.AttackerLevel;
                arenaBattleReport.AttackerName           = pbArenaBattleReport.AttackerName;
                arenaBattleReport.DefenderUserId         = pbArenaBattleReport.DefenderUserId;
                arenaBattleReport.DefenderLevel          = pbArenaBattleReport.DefenderLevel;
                arenaBattleReport.DefenderName           = pbArenaBattleReport.DefenderName;
                arenaBattleReport.CreateTime             = pbArenaBattleReport.CreateTime;
                arenaBattleReport.AttackerGotArenaPoints = pbArenaBattleReport.AttackerGotArenaPoints;
                arenaBattleReport.DefenderGotArenaPoints = pbArenaBattleReport.DefenderGotArenaPoints;
                arenaBattleReport.OpponentHeadIcon       = pbArenaBattleReport.OpponentHeadIcon;
            }
            return(arenaBattleReport);
        }
Exemplo n.º 5
0
 // Token: 0x06004E04 RID: 19972 RVA: 0x0017BC38 File Offset: 0x00179E38
 public ArenaBattleReport(ArenaBattleReport other)
 {
     this.Status     = other.Status;
     base.Version    = other.Version;
     base.BattleType = other.BattleType;
     base.BattleId   = other.BattleId;
     base.RandomSeed = other.RandomSeed;
     this.Commands.AddRange(other.Commands);
     this.ArenaDefenderRuleId = other.ArenaDefenderRuleId;
     this.DefenderUserId      = other.DefenderUserId;
     this.DefenderName        = other.DefenderName;
     this.DefenderLevel       = other.DefenderLevel;
     this.AttackerUserId      = other.AttackerUserId;
     this.AttackerName        = other.AttackerName;
     this.AttackerLevel       = other.AttackerLevel;
     this.CreateTime          = other.CreateTime;
     this.OpponentHeadIcon    = other.OpponentHeadIcon;
     this.AttackerHeroes.AddRange(other.AttackerHeroes);
     this.DefenderHeroes.AddRange(other.DefenderHeroes);
     this.AttackerTechs.AddRange(other.AttackerTechs);
     this.DefenderTechs.AddRange(other.DefenderTechs);
 }
        // Token: 0x06004A52 RID: 19026 RVA: 0x00173E00 File Offset: 0x00172000
        public void InitArenaBattleReport(ArenaBattleReport report)
        {
            int value = this.ArenaBattleReportInfo.Init(report);

            this.m_instanceId2CacheIndex.Add(report.InstanceId, value);
        }