aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Schadt <kingdread@gmx.de>2021-11-13 11:55:30 +0100
committerDaniel Schadt <kingdread@gmx.de>2021-11-13 11:58:24 +0100
commit0aee5f34c9f384656740666c6fdc03ccf537d2a3 (patch)
treeecbc11503ed6fb08b7cb495f65f66f5935f203ea /src
parent4a7af01b1d3cb1f4e0d1812d21b8e8ef216ee777 (diff)
downloadevtclib-0aee5f34c9f384656740666c6fdc03ccf537d2a3.tar.gz
evtclib-0aee5f34c9f384656740666c6fdc03ccf537d2a3.tar.bz2
evtclib-0aee5f34c9f384656740666c6fdc03ccf537d2a3.zip
Add a "is_generic" to detect WvW logs
The wording on the evtc README is > an npcid of 1 indicates log is generic - triggers by squadmember > entering combat and not as a result of a boss species id. It is not quite clear whether "generic" implies WvW or if there are PvE generic logs as well if you manage to set up arcdps in the right way. Therefore, the wording in evtclib is rather unspecific as well.
Diffstat (limited to 'src')
-rw-r--r--src/lib.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 293be64..60f4903 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -257,6 +257,18 @@ impl Log {
let last = self.events().last().map(Event::time).unwrap_or(0);
last - first
}
+
+ /// Check whether this log represents a "generic" log.
+ ///
+ /// A generic log is a log that is not tied to a specific boss ID, but rather is triggered by
+ /// squad members entering and leaving combat. This is for example the case in WvW logs, which
+ /// can be identified using this function.
+ ///
+ /// Note that many of the analyzing functions (such as [`Log::was_rewarded`]) do not have
+ /// sensible results for generic functions.
+ pub fn is_generic(&self) -> bool {
+ self.boss_id == 1
+ }
}
/// Convenience data accessing funtions for [`Log`][Log]s.