public List <FinalPlayerSupport> GetPlayerSupport(ParsedEvtcLog log) { if (_playerSupport == null) { _playerSupport = new List <FinalPlayerSupport>(); List <PhaseData> phases = log.FightData.GetPhases(log); for (int phaseIndex = 0; phaseIndex < phases.Count; phaseIndex++) { var playerSup = new FinalPlayerSupport(); _playerSupport.Add(playerSup); FinalSupportAll totals = GetSupport(log, phaseIndex); playerSup.Resurrects = totals.Resurrects; playerSup.ResurrectTime = Math.Round(totals.ResurrectTime / 1000.0, ParserHelper.TimeDigit); FinalSupport self = GetSupport(log, this, phaseIndex); foreach (Buff boon in log.Buffs.BuffsByNature[BuffNature.Boon]) { // add everything from total if (totals.Removals.TryGetValue(boon.ID, out (int count, long time)item)) { playerSup.BoonStrips += item.count; playerSup.BoonStripsTime += item.time; } // remove everything from self if (self.Removals.TryGetValue(boon.ID, out item)) { playerSup.BoonStrips -= item.count; playerSup.BoonStripsTime -= item.time; } } foreach (Buff condition in log.Buffs.BuffsByNature[BuffNature.Condition]) { // add everything from self if (self.Removals.TryGetValue(condition.ID, out (int count, long time)item)) { playerSup.CondiCleanseSelf += item.count; playerSup.CondiCleanseTimeSelf += item.time; } foreach (Player p in log.PlayerList) { if (p == this) { continue; } FinalSupport other = GetSupport(log, p, phaseIndex); // Add everything from other if (other.Removals.TryGetValue(condition.ID, out item)) { playerSup.CondiCleanse += item.count; playerSup.CondiCleanseTime += item.time; } } } playerSup.CondiCleanseTime = Math.Round(playerSup.CondiCleanseTime / 1000.0, ParserHelper.TimeDigit); playerSup.CondiCleanseTimeSelf = Math.Round(playerSup.CondiCleanseTimeSelf / 1000.0, ParserHelper.TimeDigit); playerSup.BoonStripsTime = Math.Round(playerSup.BoonStripsTime / 1000.0, ParserHelper.TimeDigit); } } return(_playerSupport); }
internal FinalPlayerSupport(ParsedEvtcLog log, Player player, long start, long end) { FinalSupportAll totals = player.GetSupportStats(log, start, end); Resurrects = totals.Resurrects; ResurrectTime = Math.Round(totals.ResurrectTime / 1000.0, ParserHelper.TimeDigit); FinalSupport self = player.GetSupportStats(player, log, start, end); foreach (Buff boon in log.Buffs.BuffsByNature[BuffNature.Boon]) { // add everything from total if (totals.Removals.TryGetValue(boon.ID, out (int count, long time)item)) { BoonStrips += item.count; BoonStripsTime += item.time; } // remove everything from self if (self.Removals.TryGetValue(boon.ID, out item)) { BoonStrips -= item.count; BoonStripsTime -= item.time; } } foreach (Buff condition in log.Buffs.BuffsByNature[BuffNature.Condition]) { // add everything from self if (self.Removals.TryGetValue(condition.ID, out (int count, long time)item)) { CondiCleanseSelf += item.count; CondiCleanseTimeSelf += item.time; } foreach (Player p in log.PlayerList) { if (p == player) { continue; } FinalSupport other = player.GetSupportStats(p, log, start, end); // Add everything from other if (other.Removals.TryGetValue(condition.ID, out item)) { CondiCleanse += item.count; CondiCleanseTime += item.time; } } } CondiCleanseTime = Math.Round(CondiCleanseTime / 1000.0, ParserHelper.TimeDigit); CondiCleanseTimeSelf = Math.Round(CondiCleanseTimeSelf / 1000.0, ParserHelper.TimeDigit); BoonStripsTime = Math.Round(BoonStripsTime / 1000.0, ParserHelper.TimeDigit); }