From 3951dcbce2f229235b77945b3493524ef970af4f Mon Sep 17 00:00:00 2001 From: Daniel Schadt Date: Fri, 12 Jun 2020 17:08:12 +0200 Subject: implement CBTS_TAG --- src/event.rs | 10 ++++++++++ src/raw/types.rs | 2 ++ 2 files changed, 12 insertions(+) (limited to 'src') diff --git a/src/event.rs b/src/event.rs index 971a1a3..d0d3181 100644 --- a/src/event.rs +++ b/src/event.rs @@ -182,6 +182,12 @@ pub enum EventKind { /// An error was reported by arcdps. Error { text: String }, + + /// The given agent has the tag. + /// + /// Note that the tag id is volatile and depends on the game build. Do not rely on the actual + /// value of this! + Tag { agent_addr: u64, tag_id: i32 }, } /// A higher-level representation of a combat event. @@ -368,6 +374,10 @@ impl TryFrom<&raw::CbtEvent> for Event { .into_owned(), } } + CbtStateChange::Tag => EventKind::Tag { + agent_addr: raw_event.src_agent, + tag_id: raw_event.value, + }, // XXX: implement proper handling of those events! CbtStateChange::BuffInitial | CbtStateChange::ReplInfo diff --git a/src/raw/types.rs b/src/raw/types.rs index 820d7a5..fe4a907 100644 --- a/src/raw/types.rs +++ b/src/raw/types.rs @@ -201,6 +201,8 @@ pub enum CbtStateChange { BreakbarPercent, /// `time` is the start of the error string. Error, + /// `src_agent` is the agent, `value` is the tag id + Tag, } impl Default for CbtStateChange { -- cgit v1.2.3