Пример #1
0
        // Token: 0x06006C25 RID: 27685 RVA: 0x001E48F0 File Offset: 0x001E2AF0
        public int AddArenaBattleReportPlayBackData(ProArenaBattleReport pbArenaBattleReport)
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_AddArenaBattleReportPlayBackDataProArenaBattleReport_hotfix != null)
            {
                return(Convert.ToInt32(this.m_AddArenaBattleReportPlayBackDataProArenaBattleReport_hotfix.call(new object[]
                {
                    this,
                    pbArenaBattleReport
                })));
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            ArenaBattleReport arenaBattleReport = base.m_arenaBattleReportDS.FindArenaBattleReportByInstanceId(pbArenaBattleReport.InstanceId);

            if (arenaBattleReport == null)
            {
                return(-2007);
            }
            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)
            {
                TrainingTech trainingTech = TrainingTech.FromDataSection(tech);
                trainingTech.ConfigDataLoader = this.m_configDataLoader;
                arenaBattleReport.AttackerTechs.Add(trainingTech);
            }
            foreach (ProTrainingTech tech2 in pbArenaBattleReport.DefenderTechs)
            {
                TrainingTech trainingTech2 = TrainingTech.FromDataSection(tech2);
                trainingTech2.ConfigDataLoader = this.m_configDataLoader;
                arenaBattleReport.DefenderTechs.Add(trainingTech2);
            }
            return(0);
        }
    public static int PBBattleCommandToBattleCommand_s(IntPtr l)
    {
        int result;

        try
        {
            ProBattleCommand pbBattleCommand;
            LuaObject.checkType <ProBattleCommand>(l, 1, out pbBattleCommand);
            BattleCommand o = BattleCommand.PBBattleCommandToBattleCommand(pbBattleCommand);
            LuaObject.pushValue(l, true);
            LuaObject.pushValue(l, o);
            result = 2;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }