mirror of
https://github.com/redstrate/Kawari.git
synced 2025-04-20 06:37:45 +00:00
More misc packet size fixes
This commit is contained in:
parent
eae962cc85
commit
fccd752246
7 changed files with 10 additions and 66 deletions
|
@ -18,17 +18,17 @@
|
||||||
{
|
{
|
||||||
"name": "PlayerStats",
|
"name": "PlayerStats",
|
||||||
"opcode": 401,
|
"opcode": 401,
|
||||||
"size": 224
|
"size": 144
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "PlayerSetup",
|
"name": "PlayerSetup",
|
||||||
"opcode": 218,
|
"opcode": 218,
|
||||||
"size": 2784
|
"size": 2808
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "UpdateClassInfo",
|
"name": "UpdateClassInfo",
|
||||||
"opcode": 119,
|
"opcode": 119,
|
||||||
"size": 48
|
"size": 16
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "PlayerSpawn",
|
"name": "PlayerSpawn",
|
||||||
|
@ -78,7 +78,7 @@
|
||||||
{
|
{
|
||||||
"name": "Unk15",
|
"name": "Unk15",
|
||||||
"opcode": 652,
|
"opcode": 652,
|
||||||
"size": 8
|
"size": 16
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Unk16",
|
"name": "Unk16",
|
||||||
|
@ -197,11 +197,6 @@
|
||||||
"opcode": 417,
|
"opcode": 417,
|
||||||
"size": 16
|
"size": 16
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "Unk7",
|
|
||||||
"opcode": 693,
|
|
||||||
"size": 32
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "UpdatePositionHandler",
|
"name": "UpdatePositionHandler",
|
||||||
"opcode": 561,
|
"opcode": 561,
|
||||||
|
|
|
@ -581,32 +581,6 @@ async fn client_loop(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ClientZoneIpcData::Unk7 {
|
|
||||||
timestamp, unk1, ..
|
|
||||||
} => {
|
|
||||||
tracing::info!("Recieved Unk7! {:#?}", unk1);
|
|
||||||
|
|
||||||
// send unk11 in response
|
|
||||||
{
|
|
||||||
let ipc = ServerZoneIpcSegment {
|
|
||||||
op_code: ServerZoneIpcType::Unk11,
|
|
||||||
timestamp: timestamp_secs(),
|
|
||||||
data: ServerZoneIpcData::Unk11 {
|
|
||||||
timestamp: *timestamp,
|
|
||||||
unk: 333,
|
|
||||||
},
|
|
||||||
..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: ipc },
|
|
||||||
})
|
|
||||||
.await;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
ClientZoneIpcData::UpdatePositionHandler { position, rotation } => {
|
ClientZoneIpcData::UpdatePositionHandler { position, rotation } => {
|
||||||
tracing::info!(
|
tracing::info!(
|
||||||
"Character moved to {position:#?} {}",
|
"Character moved to {position:#?} {}",
|
||||||
|
|
|
@ -149,7 +149,7 @@ impl OodleNetwork {
|
||||||
let mut out_buf: Vec<u8> = vec![0u8; decompressed_size.try_into().unwrap()];
|
let mut out_buf: Vec<u8> = vec![0u8; decompressed_size.try_into().unwrap()];
|
||||||
let success = OodleNetwork1TCP_Decode(
|
let success = OodleNetwork1TCP_Decode(
|
||||||
self.state.as_mut_ptr() as *mut c_void,
|
self.state.as_mut_ptr() as *mut c_void,
|
||||||
self.shared.as_mut_ptr() as *const c_void,
|
self.shared.as_ptr() as *const c_void,
|
||||||
padded_buffer.as_mut_ptr() as *const c_void,
|
padded_buffer.as_mut_ptr() as *const c_void,
|
||||||
input.len().try_into().unwrap(),
|
input.len().try_into().unwrap(),
|
||||||
out_buf.as_mut_ptr() as *mut c_void,
|
out_buf.as_mut_ptr() as *mut c_void,
|
||||||
|
@ -169,7 +169,7 @@ impl OodleNetwork {
|
||||||
let mut out_buf: Vec<u8> = vec![0u8; input.len()];
|
let mut out_buf: Vec<u8> = vec![0u8; input.len()];
|
||||||
let len = OodleNetwork1TCP_Encode(
|
let len = OodleNetwork1TCP_Encode(
|
||||||
self.state.as_mut_ptr() as *mut c_void,
|
self.state.as_mut_ptr() as *mut c_void,
|
||||||
self.shared.as_mut_ptr() as *const c_void,
|
self.shared.as_ptr() as *const c_void,
|
||||||
input.as_mut_ptr() as *const c_void,
|
input.as_mut_ptr() as *const c_void,
|
||||||
input.len().try_into().unwrap(),
|
input.len().try_into().unwrap(),
|
||||||
out_buf.as_mut_ptr() as *mut c_void,
|
out_buf.as_mut_ptr() as *mut c_void,
|
||||||
|
|
|
@ -172,30 +172,14 @@ pub enum ServerZoneIpcData {
|
||||||
#[bw(map = write_string)]
|
#[bw(map = write_string)]
|
||||||
message: String,
|
message: String,
|
||||||
},
|
},
|
||||||
/// Unknown, server sends to the client before player spawn
|
|
||||||
Unk8 { unk: [u8; 808] },
|
|
||||||
/// Unknown, but seems to contain information on cross-world linkshells
|
/// Unknown, but seems to contain information on cross-world linkshells
|
||||||
LinkShellInformation { unk: [u8; 456] },
|
LinkShellInformation { unk: [u8; 456] },
|
||||||
/// Unknown, server sends to the client before player spawn
|
|
||||||
Unk9 { unk: [u8; 24] },
|
|
||||||
/// Unknown, server sends this in response to Unk7
|
|
||||||
Unk11 {
|
|
||||||
timestamp: u32,
|
|
||||||
#[brw(pad_after = 24)] // empty bytes
|
|
||||||
unk: u32,
|
|
||||||
},
|
|
||||||
/// Sent by the server when it wants the client to... prepare to zone?
|
/// Sent by the server when it wants the client to... prepare to zone?
|
||||||
PrepareZoning { unk: [u32; 4] },
|
PrepareZoning { unk: [u32; 4] },
|
||||||
/// Sent by the server???
|
|
||||||
Unk15 { unk: u32, player_id: u32 },
|
|
||||||
/// Sent by the server before init zone???
|
|
||||||
Unk16 { unk: [u8; 136] },
|
|
||||||
/// Sent by the server
|
/// Sent by the server
|
||||||
ActorControl(ActorControl),
|
ActorControl(ActorControl),
|
||||||
/// Sent by the server
|
/// Sent by the server
|
||||||
ActorMove(ActorMove),
|
ActorMove(ActorMove),
|
||||||
/// Sent by the server
|
|
||||||
Unk17 { unk: [u8; 104] },
|
|
||||||
/// Sent by the server in response to SocialListRequest
|
/// Sent by the server in response to SocialListRequest
|
||||||
SocialList(SocialList),
|
SocialList(SocialList),
|
||||||
/// Sent by the server to spawn an NPC
|
/// Sent by the server to spawn an NPC
|
||||||
|
@ -283,15 +267,6 @@ pub enum ClientZoneIpcData {
|
||||||
/// Sent by the client when it requests the friends list and other related info
|
/// Sent by the client when it requests the friends list and other related info
|
||||||
#[br(pre_assert(*magic == ClientZoneIpcType::SocialListRequest))]
|
#[br(pre_assert(*magic == ClientZoneIpcType::SocialListRequest))]
|
||||||
SocialListRequest(SocialListRequest),
|
SocialListRequest(SocialListRequest),
|
||||||
/// FIXME: 32 bytes of something from the client, not sure what yet
|
|
||||||
#[br(pre_assert(*magic == ClientZoneIpcType::Unk7))]
|
|
||||||
Unk7 {
|
|
||||||
// TODO: full of possibly interesting information
|
|
||||||
timestamp: u32,
|
|
||||||
#[brw(pad_before = 8)] // empty bytes
|
|
||||||
#[brw(pad_after = 4)] // empty bytes
|
|
||||||
unk1: [u8; 16], // something
|
|
||||||
},
|
|
||||||
#[br(pre_assert(*magic == ClientZoneIpcType::UpdatePositionHandler))]
|
#[br(pre_assert(*magic == ClientZoneIpcType::UpdatePositionHandler))]
|
||||||
UpdatePositionHandler {
|
UpdatePositionHandler {
|
||||||
/// In radians.
|
/// In radians.
|
||||||
|
|
|
@ -159,8 +159,8 @@ pub struct PlayerSetup {
|
||||||
pub cleared_pvp: [u8; 5],
|
pub cleared_pvp: [u8; 5],
|
||||||
|
|
||||||
// meh, this is where i put all of the new data
|
// meh, this is where i put all of the new data
|
||||||
#[br(count = 192)]
|
#[br(count = 216)]
|
||||||
#[bw(pad_size_to = 192)]
|
#[bw(pad_size_to = 216)]
|
||||||
pub unknown948: Vec<u8>,
|
pub unknown948: Vec<u8>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -33,5 +33,5 @@ pub struct PlayerStats {
|
||||||
pub control: u32,
|
pub control: u32,
|
||||||
pub gathering: u32,
|
pub gathering: u32,
|
||||||
pub perception: u32,
|
pub perception: u32,
|
||||||
pub unk1: [u32; 26],
|
pub unk1: [u32; 6],
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,5 +8,5 @@ pub struct UpdateClassInfo {
|
||||||
pub is_specialist: u8,
|
pub is_specialist: u8,
|
||||||
pub synced_level: u16,
|
pub synced_level: u16,
|
||||||
pub class_level: u16,
|
pub class_level: u16,
|
||||||
pub role_actions: [u32; 10],
|
pub role_actions: [u32; 2],
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue