コード例 #1
0
 // Token: 0x06004BBB RID: 19387 RVA: 0x0017714C File Offset: 0x0017534C
 public void UpdateInstantiatedData(DSHeroPhantomNtf DS)
 {
     using (List <ProHeroPhantom> .Enumerator enumerator = DS.HeroPhantoms.GetEnumerator())
     {
         while (enumerator.MoveNext())
         {
             ProHeroPhantom HP  = enumerator.Current;
             int            num = this.PhantomCollections.HeroPhantoms.FindIndex((HeroPhantom p) => p.ID == HP.ConfigId);
             if (num >= 0)
             {
                 HeroPhantom heroPhantom = this.PhantomCollections.HeroPhantoms[num];
                 using (List <ProHeroPhantomLevel> .Enumerator enumerator2 = HP.LevelsCleared.GetEnumerator())
                 {
                     while (enumerator2.MoveNext())
                     {
                         ProHeroPhantomLevel LevelCleared     = enumerator2.Current;
                         HeroPhantomLevel    heroPhantomLevel = heroPhantom.Levels.Find((HeroPhantomLevel l) => l.ID == LevelCleared.ConfigId);
                         if (heroPhantomLevel != null)
                         {
                             heroPhantomLevel.FirstClear = new DateTime(LevelCleared.FirstClear);
                             heroPhantomLevel.AchievementIdsFinished.AddRange(LevelCleared.AchievementsFinished);
                         }
                     }
                 }
             }
         }
     }
 }
コード例 #2
0
        // Token: 0x0600500C RID: 20492 RVA: 0x001800B8 File Offset: 0x0017E2B8
        public void ReloadConfigData()
        {
            IEnumerable <KeyValuePair <int, ConfigDataHeroPhantomInfo> > allConfigDataHeroPhantomInfo = this.ConfigDataLoader.GetAllConfigDataHeroPhantomInfo();

            using (IEnumerator <KeyValuePair <int, ConfigDataHeroPhantomInfo> > enumerator = allConfigDataHeroPhantomInfo.GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    KeyValuePair <int, ConfigDataHeroPhantomInfo> kv = enumerator.Current;
                    HeroPhantom heroPhantom = this.HeroPhantoms.Find((HeroPhantom p) => p.ID == kv.Key);
                    if (heroPhantom == null)
                    {
                        this.HeroPhantoms.Add(new HeroPhantom
                        {
                            ID = kv.Key,
                            ConfigDataLoader = this.ConfigDataLoader,
                            WhichCollection  = this
                        });
                    }
                    else
                    {
                        heroPhantom.ConfigDataLoader = this.ConfigDataLoader;
                    }
                }
            }
            List <int> list = new List <int>();
            int        i;

            for (i = this.HeroPhantoms.Count - 1; i >= 0; i--)
            {
                HeroPhantom heroPhantom2 = this.HeroPhantoms[i];
                if (!allConfigDataHeroPhantomInfo.Any((KeyValuePair <int, ConfigDataHeroPhantomInfo> kv) => kv.Key == this.HeroPhantoms[i].ID))
                {
                    list.Add(i);
                }
            }
            foreach (int index in list)
            {
                this.HeroPhantoms.RemoveAt(index);
            }
        }