aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Schadt <kingdread@gmx.de>2020-12-11 21:33:28 +0100
committerDaniel Schadt <kingdread@gmx.de>2020-12-11 21:33:28 +0100
commite04b12aebb2b5707d4af53d047ca20660b441f3f (patch)
treef047ad87af61f3b6c92724c2fa8ce2bd2ba4adb6
parentdf94ea735a28f5422ab7c7b4210eb99f67ca133f (diff)
downloadevtclib-e04b12aebb2b5707d4af53d047ca20660b441f3f.tar.gz
evtclib-e04b12aebb2b5707d4af53d047ca20660b441f3f.tar.bz2
evtclib-e04b12aebb2b5707d4af53d047ca20660b441f3f.zip
add BuffInitial event handling
-rw-r--r--src/event.rs17
1 files 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