Пример #1
0
 // Token: 0x06004342 RID: 17218 RVA: 0x00142920 File Offset: 0x00140B20
 protected virtual void FinishedHeroPhantomLevel(HeroPhantomLevel Level, List <int> heroes)
 {
     if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_FinishedHeroPhantomLevelHeroPhantomLevelList ` 1_hotfix != null)
     {
         this.m_FinishedHeroPhantomLevelHeroPhantomLevelList ` 1_hotfix.call(new object[]
         {
             this,
             Level,
             heroes
         });
         return;
     }
     BJLuaObjHelper.IsSkipLuaHotfix = false;
     if (!Level.Cleared)
     {
         Level.FirstClear = this.m_basicInfo.GetCurrentTime();
     }
     if (this.CompleteHeroPhantomMissionEvent != null)
     {
         this.CompleteHeroPhantomMissionEvent(BattleType.HeroPhantom, Level.ID, heroes);
     }
 }
Пример #2
0
        // Token: 0x06005000 RID: 20480 RVA: 0x0017FDD0 File Offset: 0x0017DFD0
        private void ReloadConfigData()
        {
            using (List <int> .Enumerator enumerator = this.Config.LevelList.GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    int Level = enumerator.Current;
                    HeroPhantomLevel heroPhantomLevel = this.Levels.Find((HeroPhantomLevel l) => l.ID == Level);
                    if (heroPhantomLevel == null)
                    {
                        this.Levels.Add(new HeroPhantomLevel
                        {
                            ID               = Level,
                            WhichPhantom     = this,
                            ConfigDataLoader = this.ConfigDataLoader
                        });
                    }
                    else
                    {
                        heroPhantomLevel.ConfigDataLoader = this.ConfigDataLoader;
                    }
                }
            }
            List <int> list = new List <int>();
            int        i;

            for (i = this.Levels.Count - 1; i >= 0; i--)
            {
                int num = this.Config.LevelList.FindIndex((int l) => l == this.Levels[i].ID);
                if (num < 0)
                {
                    list.Add(i);
                }
            }
            foreach (int index in list)
            {
                this.Levels.RemoveAt(index);
            }
        }
Пример #3
0
        // Token: 0x06004341 RID: 17217 RVA: 0x00142768 File Offset: 0x00140968
        public void SetCommonSuccessHeroPhantomLevel(HeroPhantomLevel Level, List <int> Heroes, List <int> BattleTreasures, List <int> newAchievementIds)
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_SetCommonSuccessHeroPhantomLevelHeroPhantomLevelList ` 1List ` 1List ` 1_hotfix != null)
            {
                this.m_SetCommonSuccessHeroPhantomLevelHeroPhantomLevelList ` 1List ` 1List ` 1_hotfix.call(new object[]
                {
                    this,
                    Level,
                    Heroes,
                    BattleTreasures,
                    newAchievementIds
                });
                return;
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            this.m_battle.AddBattleTreasures(BattleTreasures);
            this.m_basicInfo.AddPlayerExp(Level.UserExp);
            this.m_battle.AddFightHeroFightNumsAndExp(Heroes, Level.HeroExp);
            this.m_basicInfo.AddGold(Level.GoldBonus, GameFunctionType.GameFunctionType_HeroPhantom, Level.ID.ToString());
            int num = Level.EnergySuccess - Level.EnergyFail;

            if (num > 0)
            {
                this.m_basicInfo.DecreaseEnergy(num, GameFunctionType.GameFunctionType_HeroPhantom, Level.ID.ToString());
            }
            this.m_battle.WinPveBattle(this.m_battle.GetBattleId());
            this.FinishedHeroPhantomLevel(Level, Heroes);
            foreach (int num2 in newAchievementIds)
            {
                Level.AchievementIdsFinished.Add(num2);
                if (this.GetBattleAchievementMissionEvent != null)
                {
                    this.GetBattleAchievementMissionEvent(num2);
                }
            }
        }