1
Fork 0
mirror of https://github.com/redstrate/Kawari.git synced 2025-07-01 04:07:45 +00:00
kawari/src/ipc/zone/chat_message.rs
Joshua Goins 5111a38424 Re-organize IPC segments into the ipc module
These were kind of scattered everywhere, instead we should move them
into their own module. Kawari's custom IPC is moved here too.
2025-05-02 00:47:11 -04:00

23 lines
480 B
Rust

use binrw::binrw;
use crate::common::{read_string, write_string};
#[binrw]
#[derive(Debug, Clone, Default)]
pub struct ChatMessage {
// TODO: incomplete
#[brw(pad_before = 4)] // empty
pub player_id: u32,
#[brw(pad_before = 4)] // empty
pub timestamp: u32,
#[brw(pad_before = 8)] // NOT empty
pub channel: u16,
#[br(count = 32)]
#[bw(pad_size_to = 32)]
#[br(map = read_string)]
#[bw(map = write_string)]
pub message: String,
}