diff --git a/packet-service/src/types.rs b/packet-service/src/types.rs index 5c0899d..d952e16 100644 --- a/packet-service/src/types.rs +++ b/packet-service/src/types.rs @@ -2,35 +2,22 @@ use std::time::{Duration}; use bincode::{Encode, Decode}; // `HotbarItem` structure converted to Rust. -#[derive(Clone, Copy)] -struct HotbarItem { - data: HotbarItemData, -} - -// Definition for `data` union in `HotbarItem`. -#[derive(Clone, Copy)] -union HotbarItemData { - item: u16, - components: HotbarItemComponents, -} - -#[derive(Debug, Clone, Copy, PartialEq, Eq, Encode, Decode)] -#[repr(C)] -struct HotbarItemComponents { +#[derive(Debug, Clone, Copy, Encode, Decode)] +pub(crate) struct HotbarItem { type_: u8, slot_id: u16, } // `Skill` structure converted to Rust. #[derive(Debug, Clone, Copy, PartialEq, Eq, Encode, Decode)] -struct Skill { +pub(crate) struct Skill { id: u16, level: u8, } // `StatusEffect` structure converted to Rust. #[derive(Debug, Clone, Copy, PartialEq, Eq, Encode, Decode)] -struct StatusEffect { +pub(crate) struct StatusEffect { expired: Duration, value: u16, unknown: u16,