From f51979b69a849dd374af2ea83bc66b3eea06d15c Mon Sep 17 00:00:00 2001 From: DarkPhoenix Date: Tue, 2 Jul 2019 13:49:29 +0300 Subject: [PATCH] Plug new cache format into dmg vs time graph --- gui/builtinGraphs/fitDamageStats.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/gui/builtinGraphs/fitDamageStats.py b/gui/builtinGraphs/fitDamageStats.py index 8d087fff8..dc9cea7ff 100644 --- a/gui/builtinGraphs/fitDamageStats.py +++ b/gui/builtinGraphs/fitDamageStats.py @@ -125,13 +125,17 @@ class FitDamageStatsGraph(FitGraph): def _time2damage(self, mainInput, miscInputs, fit, tgt): xs = [] ys = [] + + def calcDamageTmp(timeDmg): + return roundToPrec(sum(dt.total for dt in timeDmg.values()), 6) + minTime, maxTime = mainInput[1] self._generateTimeCacheDmg(fit, maxTime) - cache = self._calcCache[fit.ID]['timeDmg'] + cache = self._calcCache[fit.ID]['timeCache']['finalDmg'] currentDmg = None for currentTime in sorted(cache): prevDmg = currentDmg - currentDmg = roundToPrec(cache[currentTime], 6) + currentDmg = calcDamageTmp(cache[currentTime]) if currentTime < minTime: continue # First set of data points