Beispiel #1
0
 public IReadOnlyDictionary <long, FinalBuffs> GetBuffs(ParsedEvtcLog log, long start, long end)
 {
     if (_buffs == null)
     {
         _buffs = new CachingCollection <Dictionary <long, FinalBuffs> >(log);
     }
     if (!_buffs.TryGetValue(start, end, out Dictionary <long, FinalBuffs> value))
     {
         value = ComputeBuffs(log, start, end);
         _buffs.Set(start, end, value);
     }
     return(value);
 }
Beispiel #2
0
 public FinalToPlayersSupport GetToPlayerSupportStats(ParsedEvtcLog log, long start, long end)
 {
     if (_toPlayerSupportStats == null)
     {
         _toPlayerSupportStats = new CachingCollection <FinalToPlayersSupport>(log);
     }
     if (!_toPlayerSupportStats.TryGetValue(start, end, out FinalToPlayersSupport value))
     {
         value = new FinalToPlayersSupport(log, this, start, end);
         _toPlayerSupportStats.Set(start, end, value);
     }
     return(value);
 }
Beispiel #3
0
        // Gameplay Stats

        public FinalGameplayStats GetGameplayStats(ParsedEvtcLog log, long start, long end)
        {
            if (_gameplayStats == null)
            {
                _gameplayStats = new CachingCollection <FinalGameplayStats>(log);
            }
            if (!_gameplayStats.TryGetValue(start, end, out FinalGameplayStats value))
            {
                value = new FinalGameplayStats(log, start, end, this);
                _gameplayStats.Set(start, end, value);
            }
            return(value);
        }
        private void ProcessMechanics(ParsedEvtcLog log)
        {
            if (_presentMechanics != null)
            {
                return;
            }
            _presentOnPlayerMechanics = new CachingCollection <HashSet <Mechanic> >(log);
            _presentOnEnemyMechanics  = new CachingCollection <HashSet <Mechanic> >(log);
            _presentMechanics         = new CachingCollection <HashSet <Mechanic> >(log);
            _enemyList = new CachingCollection <List <AbstractSingleActor> >(log);
            ComputeMechanics(log);
            var emptyMechanic = _mechanicLogs.Where(pair => pair.Value.Count == 0).Select(pair => pair.Key).ToList();

            foreach (Mechanic m in emptyMechanic)
            {
                _mechanicLogs.Remove(m);
            }
        }
        private void ProcessMechanics(ParsedEvtcLog log)
        {
            if (_presentMechanics != null)
            {
                return;
            }
            _presentOnFriendliesMechanics = new CachingCollection <HashSet <Mechanic> >(log);
            _presentOnEnemyMechanics      = new CachingCollection <HashSet <Mechanic> >(log);
            _presentMechanics             = new CachingCollection <HashSet <Mechanic> >(log);
            _enemyList = new CachingCollection <List <AbstractSingleActor> >(log);
            ComputeMechanics(log);
            var emptyMechanic = _mechanicLogs.Where(pair => pair.Value.Count == 0).Select(pair => pair.Key).ToList();

            foreach (Mechanic m in emptyMechanic)
            {
                _mechanicLogs.Remove(m);
            }
            foreach (KeyValuePair <Mechanic, List <MechanicEvent> > pair in _mechanicLogs)
            {
                pair.Value.Sort((x, y) => x.Time.CompareTo(y.Time));
            }
        }