private uint UpdateMaps(string id, string player, uint playerCount, Dictionary <string, uint> maxCounts, Dictionary <string, uint> totalCountMap, Dictionary <string, uint> uniqueSpellsMap, Dictionary <string, Dictionary <string, uint> > filteredPlayerMap, bool received, uint totalCasts) { var spellData = TheSpellCounts.UniqueSpells[id]; var spellTypeCheck = CurrentSpellType == 0 || (CurrentSpellType == 1 && spellData.IsBeneficial) || (CurrentSpellType == 2 && !spellData.IsBeneficial); var selfOnlyCheck = !received || CurrentShowSelfOnly == true || !string.IsNullOrEmpty(spellData.LandsOnOther); var procCheck = received || CurrentShowProcs == true || !spellData.IsProc; if (spellTypeCheck && selfOnlyCheck && procCheck) { string name = spellData.NameAbbrv; if (received) { name = "Received " + name; } if (!HiddenSpells.ContainsKey(name) && maxCounts[id] > CurrentMinFreqCount) { AddHelper.Add(totalCountMap, player, playerCount); AddHelper.Add(uniqueSpellsMap, name, playerCount); AddHelper.Add(filteredPlayerMap[player], name, playerCount); totalCasts += playerCount; } } return(totalCasts); }
private void LookForDIValues() { DictionaryAddHelper <long, int> addHelper = new DictionaryAddHelper <long, int>(); Dictionary <long, int> counts = new Dictionary <long, int>(); List <long> unique = XValuesDiff.ToList(); while (unique.Count > 0) { long value = unique[0]; unique.RemoveAt(0); unique.ForEach(damage => { if (Math.Abs(value - damage) <= 5 && damage > 20) { addHelper.Add(counts, value, 1); } }); } int max = -1; long foundKey = -1; foreach (long key in counts.Keys) { if (counts[key] > max) { max = counts[key]; foundKey = key; } } if (foundKey > -1) { int diCount = 0; DIMap = new Dictionary <long, DIValue>(); for (int i = 0; i < XValuesDiff.Count; i++) { if (Math.Abs(XValuesDiff[i] - foundKey) <= 4) { diCount++; if (diCount == 1) { DIMap[XValues[i]] = new DIValue() { DI = diCount }; } else { DIMap[XValues[i]] = new DIValue() { DI = diCount, Diff = XValuesDiff[i] }; } } } ; if (DIMap.Count > 5) { } } }