diff --git a/resources/opcodes.json b/resources/opcodes.json index b3563a6..add7f12 100644 --- a/resources/opcodes.json +++ b/resources/opcodes.json @@ -234,6 +234,11 @@ "name": "QuestCompleteList", "opcode": 637, "size": 760 + }, + { + "name": "UnkResponse2", + "opcode": 772, + "size": 8 } ], "ClientZoneIpcType": [ @@ -376,6 +381,11 @@ "name": "GilShopTransaction", "opcode": 327, "size": 24 + }, + { + "name": "UnkCall2", + "opcode": 632, + "size": 8 } ], "ServerLobbyIpcType": [ diff --git a/src/bin/kawari-world.rs b/src/bin/kawari-world.rs index 259be8e..4cabb6e 100644 --- a/src/bin/kawari-world.rs +++ b/src/bin/kawari-world.rs @@ -935,6 +935,25 @@ async fn client_loop( }) .await; } + ClientZoneIpcData::UnkCall2 { .. } => { + let ipc = ServerZoneIpcSegment { + op_code: ServerZoneIpcType::UnkResponse2, + timestamp: timestamp_secs(), + data: ServerZoneIpcData::UnkResponse2 { + unk1: 1, + }, + ..Default::default() + }; + + connection + .send_segment(PacketSegment { + source_actor: connection.player_data.actor_id, + target_actor: connection.player_data.actor_id, + segment_type: SegmentType::Ipc, + data: SegmentData::Ipc { data: ipc }, + }) + .await; + } ClientZoneIpcData::Unknown { .. } => { tracing::warn!("Unknown packet {:?} recieved, this should be handled!", data.op_code); } diff --git a/src/ipc/zone/mod.rs b/src/ipc/zone/mod.rs index 88f1c17..c7838ae 100644 --- a/src/ipc/zone/mod.rs +++ b/src/ipc/zone/mod.rs @@ -341,6 +341,12 @@ pub enum ServerZoneIpcData { #[bw(pad_size_to = 760)] unk1: Vec, }, + /// Unsure the true purpose of this, but it's needed for the Unending Journey to function. + #[br(pre_assert(*magic == ServerZoneIpcType::UnkResponse2))] + UnkResponse2 { + #[brw(pad_after = 7)] + unk1: u8, + }, Unknown { #[br(count = size - 32)] unk: Vec, @@ -504,6 +510,9 @@ pub enum ClientZoneIpcData { #[brw(pad_after = 8)] unk3: u8, }, + /// Unsure the true purpose of this, but it's needed for the Unending Journey to function. + #[br(pre_assert(*magic == ClientZoneIpcType::UnkCall2))] + UnkCall2 { unk1: [u8; 8] }, Unknown { #[br(count = size - 32)] unk: Vec,