Skip to content

Commit

Permalink
Analytics: Fix processing failing if Emboldened is applied midfight
Browse files Browse the repository at this point in the history
  • Loading branch information
Sejsel committed Aug 22, 2023
1 parent 702b4ea commit c435f69
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,13 @@ public class EmboldenedDetectingModeDeterminer : IModeDeterminer
}
}

var maxEmboldenedCount = emboldenedCounts.Values.Max();
// In case Emboldened appears only due to buff applications, we currently default to 0.
// Note that this can be both correct and wrong, depending on when this happens:
// - at the end of the fight, the log can capture the emboldened buff being applied (if coming from CM fight) / reset, we want to ignore this
// - in the middle of a fight, this can be legitimate when the emboldened wing changes to the one the fight is happening in, we want to count this
// TODO: fix this ^

var maxEmboldenedCount = emboldenedCounts.Values.DefaultIfEmpty(0).Max();
var mode = maxEmboldenedCount switch {
<= 0 => EncounterMode.Normal,
1 => EncounterMode.Emboldened1,
Expand Down

0 comments on commit c435f69

Please sign in to comment.