1
Fork 0
mirror of https://github.com/redstrate/Kawari.git synced 2025-07-17 10:47:44 +00:00

Add support for manually removing effects

This commit is contained in:
Joshua Goins 2025-07-14 19:58:12 -04:00
parent 3d81d1ed01
commit f54fc126b3
2 changed files with 13 additions and 0 deletions

View file

@ -61,6 +61,12 @@ pub enum ClientTriggerCommand {
},
#[brw(magic = 0x12Fu16)]
RequestTitleList {},
/// When the player right-clicks their status effect to remove it.
#[brw(magic = 0x68u16)]
ManuallyRemoveEffect {
#[brw(pad_before = 2)] // padding
effect_id: u32,
},
Unknown {
category: u16,
// seen in haircut event

View file

@ -418,6 +418,13 @@ pub async fn server_main_loop(mut recv: Receiver<ToServer>) -> Result<(), std::i
to_remove.push(id);
}
}
ClientTriggerCommand::ManuallyRemoveEffect { effect_id } => {
let msg = FromServer::LoseEffect(*effect_id as u16);
if handle.send(msg).is_err() {
to_remove.push(id);
}
}
_ => tracing::warn!("Server doesn't know what to do with {:#?}", trigger),
}
}