1
Fork 0
mirror of https://github.com/redstrate/Kawari.git synced 2025-05-06 04:37:46 +00:00

Change server_id field in IpcSegment to option

This commit is contained in:
Joshua Goins 2025-05-02 00:17:15 -04:00
parent 54fd1b90b1
commit fb69689f2a
11 changed files with 39 additions and 39 deletions

View file

@ -127,7 +127,7 @@ async fn main() {
unk1: 0, unk1: 0,
unk2: 0, unk2: 0,
op_code: CustomIpcType::GetActorId, op_code: CustomIpcType::GetActorId,
server_id: 0, option: 0,
timestamp: 0, timestamp: 0,
data: CustomIpcData::GetActorId { data: CustomIpcData::GetActorId {
content_id: *content_id, content_id: *content_id,

View file

@ -211,7 +211,7 @@ async fn upload_character_backup(
unk1: 0, unk1: 0,
unk2: 0, unk2: 0,
op_code: CustomIpcType::ImportCharacter, op_code: CustomIpcType::ImportCharacter,
server_id: 0, option: 0,
timestamp: 0, timestamp: 0,
data: CustomIpcData::ImportCharacter { data: CustomIpcData::ImportCharacter {
service_account_id, service_account_id,

View file

@ -923,7 +923,7 @@ async fn client_loop(
unk1: 0, unk1: 0,
unk2: 0, unk2: 0,
op_code: CustomIpcType::CharacterCreated, op_code: CustomIpcType::CharacterCreated,
server_id: 0, option: 0,
timestamp: 0, timestamp: 0,
data: CustomIpcData::CharacterCreated { data: CustomIpcData::CharacterCreated {
actor_id, actor_id,
@ -952,7 +952,7 @@ async fn client_loop(
unk1: 0, unk1: 0,
unk2: 0, unk2: 0,
op_code: CustomIpcType::ActorIdFound, op_code: CustomIpcType::ActorIdFound,
server_id: 0, option: 0,
timestamp: 0, timestamp: 0,
data: CustomIpcData::ActorIdFound { actor_id }, data: CustomIpcData::ActorIdFound { actor_id },
}, },
@ -976,7 +976,7 @@ async fn client_loop(
unk1: 0, unk1: 0,
unk2: 0, unk2: 0,
op_code: CustomIpcType::NameIsAvailableResponse, op_code: CustomIpcType::NameIsAvailableResponse,
server_id: 0, option: 0,
timestamp: 0, timestamp: 0,
data: CustomIpcData::NameIsAvailableResponse { data: CustomIpcData::NameIsAvailableResponse {
free: is_name_free, free: is_name_free,
@ -1024,7 +1024,7 @@ async fn client_loop(
unk1: 0, unk1: 0,
unk2: 0, unk2: 0,
op_code: CustomIpcType::RequestCharacterListRepsonse, op_code: CustomIpcType::RequestCharacterListRepsonse,
server_id: 0, option: 0,
timestamp: 0, timestamp: 0,
data: CustomIpcData::RequestCharacterListRepsonse { data: CustomIpcData::RequestCharacterListRepsonse {
characters characters
@ -1055,7 +1055,7 @@ async fn client_loop(
unk1: 0, unk1: 0,
unk2: 0, unk2: 0,
op_code: CustomIpcType::CharacterDeleted, op_code: CustomIpcType::CharacterDeleted,
server_id: 0, option: 0,
timestamp: 0, timestamp: 0,
data: CustomIpcData::CharacterDeleted { data: CustomIpcData::CharacterDeleted {
deleted: 1, deleted: 1,

View file

@ -96,7 +96,7 @@ impl LobbyConnection {
unk1: 0, unk1: 0,
unk2: 0, unk2: 0,
op_code: ServerLobbyIpcType::LoginReply, op_code: ServerLobbyIpcType::LoginReply,
server_id: 0, option: 0,
timestamp: timestamp_secs(), timestamp: timestamp_secs(),
data: service_account_list, data: service_account_list,
}; };
@ -140,7 +140,7 @@ impl LobbyConnection {
unk1: 0, unk1: 0,
unk2: 0, unk2: 0,
op_code: ServerLobbyIpcType::DistWorldInfo, op_code: ServerLobbyIpcType::DistWorldInfo,
server_id: 0, option: 0,
timestamp: timestamp_secs(), timestamp: timestamp_secs(),
data: lobby_server_list, data: lobby_server_list,
}; };
@ -162,7 +162,7 @@ impl LobbyConnection {
unk1: 0, unk1: 0,
unk2: 0, unk2: 0,
op_code: ServerLobbyIpcType::DistRetainerInfo, op_code: ServerLobbyIpcType::DistRetainerInfo,
server_id: 0, option: 0,
timestamp: timestamp_secs(), timestamp: timestamp_secs(),
data: lobby_retainer_list, data: lobby_retainer_list,
}; };
@ -191,7 +191,7 @@ impl LobbyConnection {
unk1: 0, unk1: 0,
unk2: 0, unk2: 0,
op_code: CustomIpcType::RequestCharacterList, op_code: CustomIpcType::RequestCharacterList,
server_id: 0, option: 0,
timestamp: 0, timestamp: 0,
data: CustomIpcData::RequestCharacterList { data: CustomIpcData::RequestCharacterList {
service_account_id: self.selected_service_account.unwrap(), service_account_id: self.selected_service_account.unwrap(),
@ -265,7 +265,7 @@ impl LobbyConnection {
unk1: 0, unk1: 0,
unk2: 0, unk2: 0,
op_code: ServerLobbyIpcType::ServiceLoginReply, op_code: ServerLobbyIpcType::ServiceLoginReply,
server_id: 0, option: 0,
timestamp: timestamp_secs(), timestamp: timestamp_secs(),
data: ServerLobbyIpcData::ServiceLoginReply(lobby_character_list), data: ServerLobbyIpcData::ServiceLoginReply(lobby_character_list),
}; };
@ -298,7 +298,7 @@ impl LobbyConnection {
unk1: 0, unk1: 0,
unk2: 0, unk2: 0,
op_code: ServerLobbyIpcType::GameLoginReply, op_code: ServerLobbyIpcType::GameLoginReply,
server_id: 0, option: 0,
timestamp: timestamp_secs(), timestamp: timestamp_secs(),
data: enter_world, data: enter_world,
}; };
@ -326,7 +326,7 @@ impl LobbyConnection {
unk1: 0, unk1: 0,
unk2: 0, unk2: 0,
op_code: ServerLobbyIpcType::NackReply, op_code: ServerLobbyIpcType::NackReply,
server_id: 0, option: 0,
timestamp: timestamp_secs(), timestamp: timestamp_secs(),
data: lobby_error, data: lobby_error,
}; };
@ -353,7 +353,7 @@ impl LobbyConnection {
unk1: 0, unk1: 0,
unk2: 0, unk2: 0,
op_code: CustomIpcType::CheckNameIsAvailable, op_code: CustomIpcType::CheckNameIsAvailable,
server_id: 0, option: 0,
timestamp: 0, timestamp: 0,
data: CustomIpcData::CheckNameIsAvailable { data: CustomIpcData::CheckNameIsAvailable {
name: character_action.name.clone(), name: character_action.name.clone(),
@ -376,7 +376,7 @@ impl LobbyConnection {
unk1: 0, unk1: 0,
unk2: 0, unk2: 0,
op_code: ServerLobbyIpcType::CharaMakeReply, op_code: ServerLobbyIpcType::CharaMakeReply,
server_id: 0, option: 0,
timestamp: 0, timestamp: 0,
data: ServerLobbyIpcData::CharaMakeReply { data: ServerLobbyIpcData::CharaMakeReply {
sequence: character_action.sequence + 1, sequence: character_action.sequence + 1,
@ -404,7 +404,7 @@ impl LobbyConnection {
unk1: 0, unk1: 0,
unk2: 0, unk2: 0,
op_code: ServerLobbyIpcType::NackReply, op_code: ServerLobbyIpcType::NackReply,
server_id: 0, option: 0,
timestamp: 0, timestamp: 0,
data: ServerLobbyIpcData::NackReply { data: ServerLobbyIpcData::NackReply {
sequence: character_action.sequence, sequence: character_action.sequence,
@ -438,7 +438,7 @@ impl LobbyConnection {
unk1: 0, unk1: 0,
unk2: 0, unk2: 0,
op_code: CustomIpcType::RequestCreateCharacter, op_code: CustomIpcType::RequestCreateCharacter,
server_id: 0, option: 0,
timestamp: 0, timestamp: 0,
data: CustomIpcData::RequestCreateCharacter { data: CustomIpcData::RequestCreateCharacter {
service_account_id: self.selected_service_account.unwrap(), service_account_id: self.selected_service_account.unwrap(),
@ -470,7 +470,7 @@ impl LobbyConnection {
unk1: 0, unk1: 0,
unk2: 0, unk2: 0,
op_code: ServerLobbyIpcType::CharaMakeReply, op_code: ServerLobbyIpcType::CharaMakeReply,
server_id: 0, option: 0,
timestamp: 0, timestamp: 0,
data: ServerLobbyIpcData::CharaMakeReply { data: ServerLobbyIpcData::CharaMakeReply {
sequence: character_action.sequence + 1, sequence: character_action.sequence + 1,
@ -505,7 +505,7 @@ impl LobbyConnection {
unk1: 0, unk1: 0,
unk2: 0, unk2: 0,
op_code: CustomIpcType::DeleteCharacter, op_code: CustomIpcType::DeleteCharacter,
server_id: 0, option: 0,
timestamp: 0, timestamp: 0,
data: CustomIpcData::DeleteCharacter { data: CustomIpcData::DeleteCharacter {
content_id: character_action.content_id, content_id: character_action.content_id,
@ -523,7 +523,7 @@ impl LobbyConnection {
unk1: 0, unk1: 0,
unk2: 0, unk2: 0,
op_code: ServerLobbyIpcType::CharaMakeReply, op_code: ServerLobbyIpcType::CharaMakeReply,
server_id: 0, option: 0,
timestamp: 0, timestamp: 0,
data: ServerLobbyIpcData::CharaMakeReply { data: ServerLobbyIpcData::CharaMakeReply {
sequence: character_action.sequence + 1, sequence: character_action.sequence + 1,

View file

@ -36,7 +36,7 @@ impl Default for ClientLobbyIpcSegment {
unk1: 0x14, unk1: 0x14,
unk2: 0, unk2: 0,
op_code: ClientLobbyIpcType::LoginEx, op_code: ClientLobbyIpcType::LoginEx,
server_id: 0, option: 0,
timestamp: 0, timestamp: 0,
data: ClientLobbyIpcData::LoginEx { data: ClientLobbyIpcData::LoginEx {
sequence: 0, sequence: 0,
@ -63,7 +63,7 @@ impl Default for ServerLobbyIpcSegment {
unk1: 0x14, unk1: 0x14,
unk2: 0, unk2: 0,
op_code: ServerLobbyIpcType::NackReply, op_code: ServerLobbyIpcType::NackReply,
server_id: 0, option: 0,
timestamp: 0, timestamp: 0,
data: ServerLobbyIpcData::NackReply { data: ServerLobbyIpcData::NackReply {
sequence: 0, sequence: 0,
@ -250,7 +250,7 @@ mod tests {
unk1: 0, unk1: 0,
unk2: 0, unk2: 0,
op_code: opcode.clone(), op_code: opcode.clone(),
server_id: 0, option: 0,
timestamp: 0, timestamp: 0,
data: ipc.clone(), data: ipc.clone(),
}; };

View file

@ -48,7 +48,7 @@ where
pub op_code: OpCode, pub op_code: OpCode,
#[brw(pad_before = 2)] // empty #[brw(pad_before = 2)] // empty
/// Unknown purpose, but safe to keep 0. /// Unknown purpose, but safe to keep 0.
pub server_id: u16, pub option: u16,
/// The timestamp of this packet in seconds since UNIX epoch. /// The timestamp of this packet in seconds since UNIX epoch.
pub timestamp: u32, pub timestamp: u32,
/// The data associated with the opcode. /// The data associated with the opcode.

View file

@ -21,7 +21,7 @@ impl Default for ServerChatIpcSegment {
unk1: 0x14, unk1: 0x14,
unk2: 0, unk2: 0,
op_code: ServerChatIpcType::LoginReply, op_code: ServerChatIpcType::LoginReply,
server_id: 0, option: 0,
timestamp: 0, timestamp: 0,
data: ServerChatIpcData::LoginReply { data: ServerChatIpcData::LoginReply {
timestamp: 0, timestamp: 0,

View file

@ -78,7 +78,7 @@ impl ChatHandler {
unk1: 20, unk1: 20,
unk2: 0, unk2: 0,
op_code: ServerZoneIpcType::PlayerSpawn, op_code: ServerZoneIpcType::PlayerSpawn,
server_id: 0, option: 0,
timestamp: timestamp_secs(), timestamp: timestamp_secs(),
data: ServerZoneIpcData::PlayerSpawn(PlayerSpawn { data: ServerZoneIpcData::PlayerSpawn(PlayerSpawn {
account_id: 1000000, account_id: 1000000,
@ -134,7 +134,7 @@ impl ChatHandler {
unk1: 20, unk1: 20,
unk2: 0, unk2: 0,
op_code: ServerZoneIpcType::ActorControl, op_code: ServerZoneIpcType::ActorControl,
server_id: 0, option: 0,
timestamp: timestamp_secs(), timestamp: timestamp_secs(),
data: ServerZoneIpcData::ActorControl(ActorControl { data: ServerZoneIpcData::ActorControl(ActorControl {
category: ActorControlCategory::ZoneIn { category: ActorControlCategory::ZoneIn {
@ -159,7 +159,7 @@ impl ChatHandler {
unk1: 20, unk1: 20,
unk2: 0, unk2: 0,
op_code: ServerZoneIpcType::NpcSpawn, op_code: ServerZoneIpcType::NpcSpawn,
server_id: 0, option: 0,
timestamp: timestamp_secs(), timestamp: timestamp_secs(),
data: ServerZoneIpcData::NpcSpawn(NpcSpawn { data: ServerZoneIpcData::NpcSpawn(NpcSpawn {
common: CommonSpawn { common: CommonSpawn {
@ -214,7 +214,7 @@ impl ChatHandler {
unk1: 20, unk1: 20,
unk2: 0, unk2: 0,
op_code: ServerZoneIpcType::NpcSpawn, op_code: ServerZoneIpcType::NpcSpawn,
server_id: 0, option: 0,
timestamp: timestamp_secs(), timestamp: timestamp_secs(),
data: ServerZoneIpcData::NpcSpawn(NpcSpawn { data: ServerZoneIpcData::NpcSpawn(NpcSpawn {
aggression_mode: 1, aggression_mode: 1,
@ -263,7 +263,7 @@ impl ChatHandler {
unk1: 20, unk1: 20,
unk2: 0, unk2: 0,
op_code: ServerZoneIpcType::EventStart, op_code: ServerZoneIpcType::EventStart,
server_id: 0, option: 0,
timestamp: timestamp_secs(), timestamp: timestamp_secs(),
data: ServerZoneIpcData::EventStart(EventStart { data: ServerZoneIpcData::EventStart(EventStart {
target_id: ObjectTypeId { target_id: ObjectTypeId {
@ -293,7 +293,7 @@ impl ChatHandler {
unk1: 20, unk1: 20,
unk2: 0, unk2: 0,
op_code: ServerZoneIpcType::ActorControl, op_code: ServerZoneIpcType::ActorControl,
server_id: 0, option: 0,
timestamp: timestamp_secs(), timestamp: timestamp_secs(),
data: ServerZoneIpcData::ActorControl(ActorControl { data: ServerZoneIpcData::ActorControl(ActorControl {
category: ActorControlCategory::SetStatusIcon { category: ActorControlCategory::SetStatusIcon {
@ -338,7 +338,7 @@ impl ChatHandler {
unk1: 20, unk1: 20,
unk2: 0, unk2: 0,
op_code: ServerZoneIpcType::NpcSpawn, op_code: ServerZoneIpcType::NpcSpawn,
server_id: 0, option: 0,
timestamp: timestamp_secs(), timestamp: timestamp_secs(),
data: ServerZoneIpcData::NpcSpawn(NpcSpawn { data: ServerZoneIpcData::NpcSpawn(NpcSpawn {
common, common,

View file

@ -276,7 +276,7 @@ impl ZoneConnection {
unk1: 20, unk1: 20,
unk2: 0, unk2: 0,
op_code: ServerZoneIpcType::NpcSpawn, op_code: ServerZoneIpcType::NpcSpawn,
server_id: 0, option: 0,
timestamp: timestamp_secs(), timestamp: timestamp_secs(),
data: ServerZoneIpcData::NpcSpawn(NpcSpawn { data: ServerZoneIpcData::NpcSpawn(NpcSpawn {
common, common,
@ -303,7 +303,7 @@ impl ZoneConnection {
unk1: 20, unk1: 20,
unk2: 0, unk2: 0,
op_code: ServerZoneIpcType::Delete, op_code: ServerZoneIpcType::Delete,
server_id: 0, option: 0,
timestamp: timestamp_secs(), timestamp: timestamp_secs(),
data: ServerZoneIpcData::Delete { data: ServerZoneIpcData::Delete {
spawn_index: actor.spawn_index as u8, spawn_index: actor.spawn_index as u8,

View file

@ -100,7 +100,7 @@ impl Default for ClientZoneIpcSegment {
unk1: 0x14, unk1: 0x14,
unk2: 0, unk2: 0,
op_code: ClientZoneIpcType::InitRequest, op_code: ClientZoneIpcType::InitRequest,
server_id: 0, option: 0,
timestamp: 0, timestamp: 0,
data: ClientZoneIpcData::InitRequest { unk: [0; 120] }, data: ClientZoneIpcData::InitRequest { unk: [0; 120] },
} }
@ -123,7 +123,7 @@ impl Default for ServerZoneIpcSegment {
unk1: 0x14, unk1: 0x14,
unk2: 0, unk2: 0,
op_code: ServerZoneIpcType::InitZone, op_code: ServerZoneIpcType::InitZone,
server_id: 0, option: 0,
timestamp: 0, timestamp: 0,
data: ServerZoneIpcData::InitZone(InitZone::default()), data: ServerZoneIpcData::InitZone(InitZone::default()),
} }
@ -481,7 +481,7 @@ mod tests {
unk1: 0, unk1: 0,
unk2: 0, unk2: 0,
op_code: opcode.clone(), // doesn't matter for this test op_code: opcode.clone(), // doesn't matter for this test
server_id: 0, option: 0,
timestamp: 0, timestamp: 0,
data: data.clone(), data: data.clone(),
}; };

View file

@ -59,7 +59,7 @@ impl LuaPlayer {
unk1: 20, unk1: 20,
unk2: 0, unk2: 0,
op_code: ServerZoneIpcType::EventScene, op_code: ServerZoneIpcType::EventScene,
server_id: 0, option: 0,
timestamp: timestamp_secs(), timestamp: timestamp_secs(),
data: ServerZoneIpcData::EventScene(EventPlay { data: ServerZoneIpcData::EventScene(EventPlay {
actor_id: ObjectTypeId { actor_id: ObjectTypeId {