mirror of
https://github.com/eigenein/wotbreplay-parser.git
synced 2026-10-21 10:27:01 +02:00
Fix: include raw payload in Payload::Unknown as well
This commit is contained in:
1 parent
705280fc19
commit
1fb4bea267
2 files changed
+12
-2
No files matched your search
@@ -14,6 +14,7 @@ pub enum EntityMethod {
|
||||
Unknown {
|
||||
sub_type: u32,
|
||||
|
||||
/// Whole packet payload (including the sub-type).
|
||||
#[serde_as(as = "serde_with::hex::Hex")]
|
||||
payload: Vec<u8>,
|
||||
},
|
||||
|
||||
@@ -15,7 +15,13 @@ pub enum Payload {
|
||||
EntityMethod(EntityMethod),
|
||||
|
||||
/// Default payload when type is not known.
|
||||
Unknown(#[serde_as(as = "serde_with::hex::Hex")] Vec<u8>),
|
||||
Unknown {
|
||||
type_: u32,
|
||||
|
||||
/// Whole packet payload.
|
||||
#[serde_as(as = "serde_with::hex::Hex")]
|
||||
raw: Vec<u8>,
|
||||
},
|
||||
}
|
||||
|
||||
impl Payload {
|
||||
@@ -44,7 +50,10 @@ impl Payload {
|
||||
|
||||
8 => Self::EntityMethod(EntityMethod::new(payload)?),
|
||||
|
||||
_ => Self::Unknown(payload),
|
||||
_ => Self::Unknown {
|
||||
raw: payload,
|
||||
type_,
|
||||
},
|
||||
};
|
||||
Ok(this)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user