mirror of
https://github.com/eigenein/wotbreplay-parser.git
synced 2026-10-24 11:49:48 +02:00
Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1fb4bea267 |
No files matched your search
@@ -14,6 +14,7 @@ pub enum EntityMethod {
|
|||||||
Unknown {
|
Unknown {
|
||||||
sub_type: u32,
|
sub_type: u32,
|
||||||
|
|
||||||
|
/// Whole packet payload (including the sub-type).
|
||||||
#[serde_as(as = "serde_with::hex::Hex")]
|
#[serde_as(as = "serde_with::hex::Hex")]
|
||||||
payload: Vec<u8>,
|
payload: Vec<u8>,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -15,7 +15,13 @@ pub enum Payload {
|
|||||||
EntityMethod(EntityMethod),
|
EntityMethod(EntityMethod),
|
||||||
|
|
||||||
/// Default payload when type is not known.
|
/// 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 {
|
impl Payload {
|
||||||
@@ -44,7 +50,10 @@ impl Payload {
|
|||||||
|
|
||||||
8 => Self::EntityMethod(EntityMethod::new(payload)?),
|
8 => Self::EntityMethod(EntityMethod::new(payload)?),
|
||||||
|
|
||||||
_ => Self::Unknown(payload),
|
_ => Self::Unknown {
|
||||||
|
raw: payload,
|
||||||
|
type_,
|
||||||
|
},
|
||||||
};
|
};
|
||||||
Ok(this)
|
Ok(this)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user