aboutsummaryrefslogtreecommitdiff
path: root/src/statistics/trackers.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/statistics/trackers.rs')
-rw-r--r--src/statistics/trackers.rs36
1 files changed, 32 insertions, 4 deletions
diff --git a/src/statistics/trackers.rs b/src/statistics/trackers.rs
index d8a9656..66a7bf8 100644
--- a/src/statistics/trackers.rs
+++ b/src/statistics/trackers.rs
@@ -395,14 +395,42 @@ impl Tracker for MechanicTracker {
..
},
Trigger::SkillOnPlayer(trigger_id),
- ) if skill_id == trigger_id
- && self.is_boss(*source_agent_addr)
- && *result != CbtResult::Evade
- && *result != CbtResult::Block =>
+ )
+ if skill_id == trigger_id
+ && self.is_boss(*source_agent_addr)
+ && *result != CbtResult::Evade
+ && *result != CbtResult::Absorb
+ && *result != CbtResult::Block =>
{
self.log
.increase(event.time, mechanic, *destination_agent_addr);
}
+
+ (
+ EventKind::BuffApplication {
+ destination_agent_addr,
+ buff_id,
+ ..
+ },
+ Trigger::BoonPlayer(trigger_id),
+ )
+ if buff_id == trigger_id =>
+ {
+ // Some buff applications are registered multiple times. So
+ // instead of counting those quick successions separately
+ // (and thus having a wrong count), we check if this
+ // mechanic has already been logged "shortly before" (10 millisecons).
+ if self
+ .log
+ .count_between(event.time - 10, event.time + 1, |m, w| {
+ &m == mechanic && w == *destination_agent_addr
+ })
+ == 0
+ {
+ self.log
+ .increase(event.time, mechanic, *destination_agent_addr);
+ }
+ }
_ => (),
}
}