public void Load(Dictionary <string, JObject> conditions)
        {
            using (var enumerator = conditions.GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    var current = enumerator.Current;
                    AchievementCondition achievementCondition;
                    if (_conditions.TryGetValue(current.Key, out achievementCondition))
                    {
                        achievementCondition.Load(current.Value);
                        if (achievementCondition.IsCompleted)
                        {
                            ++_completedCount;
                        }
                    }
                }
            }

            if (_tracker == null)
            {
                return;
            }
            _tracker.Load();
        }
Beispiel #2
0
 public void Load(Dictionary <string, JObject> conditions)
 {
     foreach (KeyValuePair <string, JObject> condition in conditions)
     {
         if (_conditions.TryGetValue(condition.Key, out var value))
         {
             value.Load(condition.Value);
             if (value.IsCompleted)
             {
                 _completedCount++;
             }
         }
     }
     if (_tracker != null)
     {
         _tracker.Load();
     }
 }