- add: utils library

- add: packet-service to handle game client packets
- fix: health check for database-service
- fix: health check for auth-service
This commit is contained in:
2024-12-09 23:10:26 -05:00
parent 20e86dd117
commit e5c961d1b4
25 changed files with 1176 additions and 120 deletions

View File

@@ -0,0 +1,38 @@
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 {
type_: u8,
slot_id: u16,
}
// `Skill` structure converted to Rust.
#[derive(Debug, Clone, Copy, PartialEq, Eq, Encode, Decode)]
struct Skill {
id: u16,
level: u8,
}
// `StatusEffect` structure converted to Rust.
#[derive(Debug, Clone, Copy, PartialEq, Eq, Encode, Decode)]
struct StatusEffect {
expired: Duration,
value: u16,
unknown: u16,
dt: Duration,
}