From 172c17db58f6a57d0867778e98a7d69430e0d3d0 Mon Sep 17 00:00:00 2001 From: Daniel Schadt Date: Fri, 11 Dec 2020 21:36:53 +0100 Subject: add comment about ReplInfo --- src/event.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/event.rs b/src/event.rs index ba415c1..8004002 100644 --- a/src/event.rs +++ b/src/event.rs @@ -21,6 +21,8 @@ pub enum FromRawEventError { UnknownDamageEvent, #[error("the event contains invalid text")] InvalidText, + #[error("an unexpected REPLINFO was found")] + UnexpectedReplInfo, } /// A rusty enum for all possible combat events. @@ -394,9 +396,11 @@ impl TryFrom<&raw::CbtEvent> for Event { buff_id: raw_event.skillid, duration: raw_event.value, }, + // The README says "internal use, won't see anywhere", so if we find one, we treat it + // as an error. + CbtStateChange::ReplInfo => return Err(FromRawEventError::UnexpectedReplInfo), // XXX: implement proper handling of those events! - CbtStateChange::ReplInfo - | CbtStateChange::StackActive + CbtStateChange::StackActive | CbtStateChange::StackReset | CbtStateChange::BuffInfo | CbtStateChange::BuffFormula -- cgit v1.2.3