1
Fork 0
mirror of https://github.com/redstrate/Kawari.git synced 2025-06-30 11:47:45 +00:00

Return both parameters in EventHandlerReturn

This allows scripting things like Aetherytes in the future.
This commit is contained in:
Joshua Goins 2025-06-24 18:30:22 -04:00
parent 9d01a5d595
commit cc5d9ae7bc
2 changed files with 4 additions and 5 deletions

View file

@ -850,14 +850,14 @@ async fn client_loop(
connection.send_message(&*format!("Event {event_id} tried to start, but it doesn't have a script associated with it!")).await;
}
}
ClientZoneIpcData::EventHandlerReturn { handler_id, scene, error_code, num_results, results } => {
tracing::info!("Finishing this event... {handler_id} {scene} {error_code} {num_results} {results:#?}");
ClientZoneIpcData::EventHandlerReturn { handler_id, scene, error_code, num_results, params } => {
tracing::info!("Finishing this event... {handler_id} {error_code} {scene} {params:#?}");
connection
.event
.as_mut()
.unwrap()
.finish(*scene, results, &mut lua_player);
.finish(*scene, &params[..*num_results as usize], &mut lua_player);
}
}
}

View file

@ -379,8 +379,7 @@ pub enum ClientZoneIpcData {
scene: u16,
error_code: u8,
num_results: u8,
#[brw(pad_after = 4)] // padding
results: [u32; 1],
params: [u32; 2],
},
}