mirror of
https://github.com/eigenein/wotbreplay-parser.git
synced 2026-10-21 18:37:00 +02:00
Break: extract TeamNumber
This commit is contained in:
1 parent
6fb70da06f
commit
68e00c5eca
1 file changed
+15
-2
@@ -15,30 +15,43 @@ impl BattleResults {
|
||||
|
||||
#[derive(Message)]
|
||||
pub struct BattleResults {
|
||||
/// Battle timestamp.
|
||||
#[prost(int64, tag = "2")]
|
||||
pub timestamp: i64,
|
||||
|
||||
/// Players in the battle.
|
||||
#[prost(message, repeated, tag = "201")]
|
||||
pub players: Vec<Player>,
|
||||
}
|
||||
|
||||
#[derive(Message)]
|
||||
pub struct Player {
|
||||
/// Player's account ID.
|
||||
#[prost(uint32, tag = "1")]
|
||||
pub account_id: u32,
|
||||
|
||||
/// Player's extended information.
|
||||
#[prost(message, required, tag = "2")]
|
||||
pub info: PlayerInfo,
|
||||
}
|
||||
|
||||
#[derive(Message)]
|
||||
pub struct PlayerInfo {
|
||||
/// Player's nickname.
|
||||
#[prost(string, tag = "1")]
|
||||
pub nickname: String,
|
||||
|
||||
#[prost(uint32, optional, tag = "2")]
|
||||
pub platoon_id: Option<u32>,
|
||||
|
||||
#[prost(uint32, tag = "3")]
|
||||
pub team_number: u32,
|
||||
/// Player's team assignment.
|
||||
#[prost(enumeration = "TeamNumber", tag = "3")]
|
||||
pub team_number: i32,
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, prost::Enumeration)]
|
||||
#[repr(i32)]
|
||||
pub enum TeamNumber {
|
||||
One = 1,
|
||||
Two = 2,
|
||||
}
|
||||
Reference in new issue
Block a user