public void OnDiff(BaseModelDiff.DiffAchievement diff)
 {
     if (Utility.IsExist(diff.add))
     {
         achievementCounterList.AddRange(diff.add);
     }
     if (Utility.IsExist(diff.update))
     {
         long num = 0L;
         if (_GetAchievementCounter(ACHIEVEMENT_TYPE.BOSS_KILL, 0) != null)
         {
             num = _GetAchievementCounter(ACHIEVEMENT_TYPE.BOSS_KILL, 0).Count;
         }
         diff.update.ForEach(delegate(AchievementCounter achieve)
         {
             AchievementCounter achievementCounter = _GetAchievementCounter(achieve.Type, achieve.subType);
             if (achievementCounter != null)
             {
                 achievementCounter.count = achieve.count;
             }
         });
         long num2 = 0L;
         if (_GetAchievementCounter(ACHIEVEMENT_TYPE.BOSS_KILL, 0) != null)
         {
             num2 = _GetAchievementCounter(ACHIEVEMENT_TYPE.BOSS_KILL, 0).Count;
         }
         if ((num2 >= 20 && num < 20) || (num2 >= 50 && num < 50) || (num2 >= 100 && num < 100) || (num2 >= 200 && num < 200) || (num2 >= 300 && num < 300) || (num2 >= 400 && num < 400))
         {
             GameSaveData.instance.happyTimeForRating = true;
         }
     }
 }
    public int GetEnemyCollectionNum()
    {
        AchievementCounter achievementCounter = _GetAchievementCounter(ACHIEVEMENT_TYPE.ENEMY_COLLECTION, 0);

        if (achievementCounter == null)
        {
            return(0);
        }
        return((int)achievementCounter.Count);
    }
    public int GetEquipItemCollectionNum()
    {
        AchievementCounter achievementCounter = _GetAchievementCounter(ACHIEVEMENT_TYPE.EQUIP_ITEM_COLLECTION, 0);

        if (achievementCounter == null)
        {
            return(0);
        }
        return((int)achievementCounter.Count);
    }
    public PlayData[] GetSortedPlayData(AchievementCounter[] dataList)
    {
        DateTime        now      = TimeManager.GetNow();
        List <PlayData> sortData = new List <PlayData>();

        playDataTable.ForEach(delegate(PlayData o)
        {
            if (o.startAt <= now)
            {
                AchievementCounter achievementCounter = dataList.Find((AchievementCounter x) => x.type == o.type && x.subType == o.subType);
                string s = (achievementCounter == null) ? "0" : achievementCounter.count;
                o.count  = int.Parse(s);
                sortData.Add(o);
            }
        });
        sortData.Sort((PlayData a, PlayData b) => a.orderNo - b.orderNo);
        return(sortData.ToArray());
    }