aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Schadt <kingdread@gmx.de>2020-09-23 14:53:38 +0200
committerDaniel Schadt <kingdread@gmx.de>2020-09-23 14:53:38 +0200
commit69da697e4f77504e4042da07f4f5c26b2e8a16f9 (patch)
tree7600a8bfcbae936018d2aba98fb2b52c8079957d /src
parent8330abd3d42aadc30d1d819c9486c1341b4244c9 (diff)
downloadevtclib-69da697e4f77504e4042da07f4f5c26b2e8a16f9.tar.gz
evtclib-69da697e4f77504e4042da07f4f5c26b2e8a16f9.tar.bz2
evtclib-69da697e4f77504e4042da07f4f5c26b2e8a16f9.zip
use Log::is_boss instead of manually checking
Diffstat (limited to 'src')
-rw-r--r--src/analyzers/fractals.rs12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/analyzers/fractals.rs b/src/analyzers/fractals.rs
index 85063bc..69b7f17 100644
--- a/src/analyzers/fractals.rs
+++ b/src/analyzers/fractals.rs
@@ -1,7 +1,7 @@
//! Analyzers for (challenge mote) fractal encounters.
use crate::{
analyzers::{helpers, Analyzer, Outcome},
- Boss, EventKind, Log,
+ EventKind, Log,
};
/// The ID of the invulnerability buff that Ai gets when she has been defeated.
@@ -85,14 +85,8 @@ impl<'log> Analyzer for Ai<'log> {
..
} = event.kind()
{
- let agent = self
- .log
- .agent_by_addr(*destination_agent_addr)
- .and_then(|a| a.as_character());
- if let Some(c) = agent {
- if c.id() == Boss::Ai as u16 && *buff_id == AI_INVULNERABILITY_ID {
- return Some(Outcome::Success);
- }
+ if *buff_id == AI_INVULNERABILITY_ID && self.log.is_boss(*destination_agent_addr) {
+ return Some(Outcome::Success);
}
}
}