From cc5d9ae7bc617bbafa50b63f0a882887c5b1e58a Mon Sep 17 00:00:00 2001 From: Joshua Goins Date: Tue, 24 Jun 2025 18:30:22 -0400 Subject: [PATCH] Return both parameters in EventHandlerReturn This allows scripting things like Aetherytes in the future. --- src/bin/kawari-world.rs | 6 +++--- src/ipc/zone/mod.rs | 3 +-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/bin/kawari-world.rs b/src/bin/kawari-world.rs index 9d1374a..0550ee7 100644 --- a/src/bin/kawari-world.rs +++ b/src/bin/kawari-world.rs @@ -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, ¶ms[..*num_results as usize], &mut lua_player); } } } diff --git a/src/ipc/zone/mod.rs b/src/ipc/zone/mod.rs index ea4e287..061709a 100644 --- a/src/ipc/zone/mod.rs +++ b/src/ipc/zone/mod.rs @@ -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], }, }