1
0
mirror of https://git.ngram.ca/OpenJam/rc-servers synced 2026-08-23 23:08:52 +00:00
Files
ojrc/rc_social_room/src/events/clan_invite_cancelled.rs
2026-02-22 22:39:34 -05:00

27 lines
768 B
Rust

pub struct ClanInviteCancelled {
pub clan_name: String,
}
impl ClanInviteCancelled {
pub const CODE: u8 = 25;
pub fn as_event_params<C>(&self) -> polariton::operation::ParameterTable<C> {
let mut params = std::collections::HashMap::with_capacity(1);
params.insert(31, polariton::operation::Typed::Str(self.clan_name.clone().into()));
params.into()
}
}
impl <C: Send + 'static> polariton_server::events::IntoEvent<C> for ClanInviteCancelled {
const CHANNEL: u8 = 0;
const ENCRYPT: bool = true;
const RELIABLE: bool = true;
fn into_event(self) -> polariton::operation::Event<C> {
polariton::operation::Event {
code: Self::CODE,
params: self.as_event_params(),
}
}
}