// Token: 0x06006C28 RID: 27688 RVA: 0x001E4D6C File Offset: 0x001E2F6C
        public void RevengeOpponent(ulong battleReportInstanceId, bool autoBattle, ProArenaDefensiveBattleInfo pbBattleInfo)
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_RevengeOpponentUInt64BooleanProArenaDefensiveBattleInfo_hotfix != null)
            {
                this.m_RevengeOpponentUInt64BooleanProArenaDefensiveBattleInfo_hotfix.call(new object[]
                {
                    this,
                    battleReportInstanceId,
                    autoBattle,
                    pbBattleInfo
                });
                return;
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            ArenaOpponentDefensiveBattleInfo arenaOpponentDefensiveBattleInfo = ArenaOpponentDefensiveBattleInfo.PBDefensiveBattleInfoToDefensiveBattleInfo(pbBattleInfo);

            foreach (TrainingTech trainingTech in arenaOpponentDefensiveBattleInfo.BattleTeamSnapshot.Techs)
            {
                trainingTech.ConfigDataLoader = this.m_configDataLoader;
            }
            ArenaBattleReport battleReportRevenged = base.m_arenaBattleReportDS.FindArenaBattleReportByInstanceId(battleReportInstanceId);

            base.SetBattleReportRevenged(battleReportRevenged);
            base.ArenaPlayerInfo.IsAutoBattle = autoBattle;
            this.OnStartArenaBattle(arenaOpponentDefensiveBattleInfo);
        }
Exemple #2
0
    public static int DefensiveBattleInfoToPBDefensiveBattleInfo_s(IntPtr l)
    {
        int result;

        try
        {
            ArenaOpponentDefensiveBattleInfo defensiveBattleInfo;
            LuaObject.checkType <ArenaOpponentDefensiveBattleInfo>(l, 1, out defensiveBattleInfo);
            ProArenaDefensiveBattleInfo o = ArenaOpponentDefensiveBattleInfo.DefensiveBattleInfoToPBDefensiveBattleInfo(defensiveBattleInfo);
            LuaObject.pushValue(l, true);
            LuaObject.pushValue(l, o);
            result = 2;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
        // Token: 0x06006C27 RID: 27687 RVA: 0x001E4C90 File Offset: 0x001E2E90
        public void ReconnectArenaBattle(ProArenaDefensiveBattleInfo pbBattleInfo)
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_ReconnectArenaBattleProArenaDefensiveBattleInfo_hotfix != null)
            {
                this.m_ReconnectArenaBattleProArenaDefensiveBattleInfo_hotfix.call(new object[]
                {
                    this,
                    pbBattleInfo
                });
                return;
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            ArenaOpponentDefensiveBattleInfo arenaOpponentDefensiveBattleInfo = ArenaOpponentDefensiveBattleInfo.PBDefensiveBattleInfoToDefensiveBattleInfo(pbBattleInfo);

            foreach (TrainingTech trainingTech in arenaOpponentDefensiveBattleInfo.BattleTeamSnapshot.Techs)
            {
                trainingTech.ConfigDataLoader = this.m_configDataLoader;
            }
            this.m_arenaDS.SetArenaDefensiveBattleInfo(arenaOpponentDefensiveBattleInfo);
        }
        // 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);
        }
        // Token: 0x06006C26 RID: 27686 RVA: 0x001E4B94 File Offset: 0x001E2D94
        public void StartArenaBattle(ProArenaDefensiveBattleInfo pbBattleInfo, bool autoBattle)
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_StartArenaBattleProArenaDefensiveBattleInfoBoolean_hotfix != null)
            {
                this.m_StartArenaBattleProArenaDefensiveBattleInfoBoolean_hotfix.call(new object[]
                {
                    this,
                    pbBattleInfo,
                    autoBattle
                });
                return;
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            ArenaOpponentDefensiveBattleInfo arenaOpponentDefensiveBattleInfo = ArenaOpponentDefensiveBattleInfo.PBDefensiveBattleInfoToDefensiveBattleInfo(pbBattleInfo);

            foreach (TrainingTech trainingTech in arenaOpponentDefensiveBattleInfo.BattleTeamSnapshot.Techs)
            {
                trainingTech.ConfigDataLoader = this.m_configDataLoader;
            }
            arenaOpponentDefensiveBattleInfo.Status = ArenaBattleReportStatus.Attack;
            this.m_arenaDS.SetAttackedOpponent(autoBattle);
            this.OnStartArenaBattle(arenaOpponentDefensiveBattleInfo);
        }
        // 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);
        }