From e04b12aebb2b5707d4af53d047ca20660b441f3f Mon Sep 17 00:00:00 2001 From: Daniel Schadt Date: Fri, 11 Dec 2020 21:33:28 +0100 Subject: add BuffInitial event handling --- src/event.rs | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/event.rs b/src/event.rs index 150c60b..ba415c1 100644 --- a/src/event.rs +++ b/src/event.rs @@ -125,6 +125,14 @@ pub enum EventKind { removal: raw::CbtBuffRemove, }, + /// Initial buff + BuffInitial { + source_agent_addr: u64, + destination_agent_addr: u64, + buff_id: u32, + duration: i32, + }, + /// Position of the agent has changed. Position { agent_addr: u64, @@ -380,9 +388,14 @@ impl TryFrom<&raw::CbtEvent> for Event { agent_addr: raw_event.src_agent, tag_id: raw_event.value, }, + CbtStateChange::BuffInitial => EventKind::BuffInitial { + source_agent_addr: raw_event.src_agent, + destination_agent_addr: raw_event.dst_agent, + buff_id: raw_event.skillid, + duration: raw_event.value, + }, // XXX: implement proper handling of those events! - CbtStateChange::BuffInitial - | CbtStateChange::ReplInfo + CbtStateChange::ReplInfo | CbtStateChange::StackActive | CbtStateChange::StackReset | CbtStateChange::BuffInfo -- cgit v1.2.3