mirror of
https://github.com/eigenein/wotbreplay-parser.git
synced 2026-10-23 19:29:48 +02:00
Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
705280fc19 | ||
|
|
3f557e33bf |
No files matched your search
@@ -14,7 +14,8 @@ World of Tanks Blitz replay parser in Rust.
|
|||||||
use std::fs::File;
|
use std::fs::File;
|
||||||
|
|
||||||
use anyhow::Result;
|
use anyhow::Result;
|
||||||
use wotbreplay_parser::prelude::*;
|
use wotbreplay_parser::models::battle_results::TeamNumber;
|
||||||
|
use wotbreplay_parser::replay::Replay;
|
||||||
|
|
||||||
fn main() -> Result<()> {
|
fn main() -> Result<()> {
|
||||||
let battle_results = Replay::open(File::open("tests/replays/battle_results.wotbreplay")?)?
|
let battle_results = Replay::open(File::open("tests/replays/battle_results.wotbreplay")?)?
|
||||||
|
|||||||
@@ -1,15 +1,22 @@
|
|||||||
use byteorder::{LittleEndian, ReadBytesExt};
|
use byteorder::{LittleEndian, ReadBytesExt};
|
||||||
use serde::Serialize;
|
use serde::Serialize;
|
||||||
|
use serde_with::serde_as;
|
||||||
|
|
||||||
use crate::result::Result;
|
use crate::result::Result;
|
||||||
|
|
||||||
|
#[serde_as]
|
||||||
#[derive(Debug, Serialize)]
|
#[derive(Debug, Serialize)]
|
||||||
pub enum EntityMethod {
|
pub enum EntityMethod {
|
||||||
/// TODO: team composition.
|
/// TODO: team composition.
|
||||||
Subtype2F,
|
Subtype2F,
|
||||||
|
|
||||||
/// Default variant when subtype is not known.
|
/// Default variant when subtype is not known.
|
||||||
Unknown { sub_type: u32, payload: Vec<u8> },
|
Unknown {
|
||||||
|
sub_type: u32,
|
||||||
|
|
||||||
|
#[serde_as(as = "serde_with::hex::Hex")]
|
||||||
|
payload: Vec<u8>,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
impl EntityMethod {
|
impl EntityMethod {
|
||||||
|
|||||||
Reference in new issue
Block a user