diff --git a/resources/opcodes.json b/resources/opcodes.json index 14c4a09..ea97761 100644 --- a/resources/opcodes.json +++ b/resources/opcodes.json @@ -249,6 +249,16 @@ "name": "InventoryTransactionFinish", "opcode": 854, "size": 16 + }, + { + "name": "ContentFinderFound", + "opcode": 619, + "size": 40 + }, + { + "name": "ContentFinderFound2", + "opcode": 619, + "size": 812 } ], "ClientZoneIpcType": [ @@ -401,6 +411,11 @@ "name": "StandardControlsPivot", "opcode": 836, "size": 8 + }, + { + "name": "ContentFinderRegister", + "opcode": 991, + "size": 40 } ], "ServerLobbyIpcType": [ diff --git a/src/bin/kawari-world.rs b/src/bin/kawari-world.rs index b3553dc..edf475c 100644 --- a/src/bin/kawari-world.rs +++ b/src/bin/kawari-world.rs @@ -1032,6 +1032,66 @@ async fn client_loop( }) .await; } + ClientZoneIpcData::ContentFinderRegister { .. } => { + let ipc = ServerZoneIpcSegment { + op_code: ServerZoneIpcType::ContentFinderFound, + timestamp: timestamp_secs(), + data: ServerZoneIpcData::ContentFinderFound { + state1: 2, + classjob_id: 1, + unk1: [ + 5, + 2, + 5, + 2, + 5, + 2, + 96, + 4, + 5, + 64, + 2, + 5, + 2, + 5, + 2, + 2, + 2, + 2, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + ] + }, + ..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 f86fa00..eef5449 100644 --- a/src/ipc/zone/mod.rs +++ b/src/ipc/zone/mod.rs @@ -422,6 +422,20 @@ pub enum ServerZoneIpcData { /// Unknown, seems to always be 0x00000200. unk4: u32, }, + #[br(pre_assert(*magic == ServerZoneIpcType::ContentFinderFound))] + ContentFinderFound { + /// 0 = Nothing happens + /// 1 = Reserving server + /// 2 = again? ^ + /// 3 = duty ready + /// 4 = checking member status + /// nothing appears to happen above 5 + state1: u8, + classjob_id: u8, + unk1: [u8; 38], + }, + #[br(pre_assert(*magic == ServerZoneIpcType::ContentFinderFound2))] + ContentFinderFound2 { unk1: [u8; 8] }, Unknown { #[br(count = size - 32)] unk: Vec, @@ -597,6 +611,8 @@ pub enum ClientZoneIpcData { /// 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] }, + #[br(pre_assert(*magic == ClientZoneIpcType::ContentFinderRegister))] + ContentFinderRegister { unk1: [u8; 40] }, Unknown { #[br(count = size - 32)] unk: Vec,