Skip to content

Commit

Permalink
add voidgrubs to ingame api model
Browse files Browse the repository at this point in the history
  • Loading branch information
FFFFFFFXXXXXXX committed Jan 12, 2024
1 parent acb0c82 commit 579d818
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/model/ingame.rs
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,7 @@ pub(crate) struct IngameEvents {
#[serde(tag = "EventName")]
pub enum GameEvent {
Ace(Ace),
HordeKill(HordeKill),
BaronKill(BaronKill),
ChampionKill(ChampionKill),
DragonKill(DragonKill),
Expand All @@ -401,6 +402,7 @@ impl GameEvent {
pub fn get_event_id(&self) -> EventId {
match self {
GameEvent::Ace(e) => e.event_id,
GameEvent::HordeKill(e) => e.event_id,
GameEvent::BaronKill(e) => e.event_id,
GameEvent::ChampionKill(e) => e.event_id,
GameEvent::DragonKill(e) => e.event_id,
Expand All @@ -421,6 +423,7 @@ impl GameEvent {
pub fn get_event_time(&self) -> Time {
match self {
GameEvent::Ace(e) => e.event_time,
GameEvent::HordeKill(e) => e.event_time,
GameEvent::BaronKill(e) => e.event_time,
GameEvent::ChampionKill(e) => e.event_time,
GameEvent::DragonKill(e) => e.event_time,
Expand Down Expand Up @@ -449,6 +452,18 @@ pub struct Ace {
pub event_time: Time,
}

#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct HordeKill {
pub assisters: Vec<SummonerName>,
#[serde(rename = "EventID")]
pub event_id: EventId,
pub event_time: Time,
pub killer_name: Killer,
#[serde(deserialize_with = "deserialize_bool")]
pub stolen: bool,
}

#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct BaronKill {
Expand Down

0 comments on commit 579d818

Please # to comment.