scroll.server/crates/logic/src/messages/available_server_command.rs
WiseDev d25a6de423 move all crates into crates/, glob members
pure move, no code touched. readme and protocol.md paths fixed up.
2026-08-23 08:15:45 +03:00

23 lines
617 B
Rust

use titan::Message;
use crate::commands::{LogicClaimRewardCommand, LogicCommand};
#[derive(Debug, Message)]
#[message(
id = 24111,
direction = "server",
name = "AvailableServerCommandMessage"
)]
pub struct AvailableServerCommandMessage {
pub command: Box<dyn LogicCommand>,
}
impl AvailableServerCommandMessage {
pub fn claim_reward(command: LogicClaimRewardCommand) -> Self {
Self {
command: Box::new(command),
}
}
}
impl Default for AvailableServerCommandMessage {
fn default() -> Self {
Self::claim_reward(LogicClaimRewardCommand::default())
}
}