From d58025e415d23f295a7e9ebccb24d71d5e6446ec Mon Sep 17 00:00:00 2001 From: Joshua Goins Date: Sat, 12 Jul 2025 08:33:04 -0400 Subject: [PATCH] Use COMPLETED_QUEST_BITMASK_SIZE in QuestCompleteList --- src/ipc/zone/mod.rs | 12 ++++++++---- src/world/connection.rs | 3 ++- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/ipc/zone/mod.rs b/src/ipc/zone/mod.rs index d2fd0b5..44a3faf 100644 --- a/src/ipc/zone/mod.rs +++ b/src/ipc/zone/mod.rs @@ -88,6 +88,7 @@ pub use config::Config; mod event_yield_handler; pub use event_yield_handler::EventYieldHandler; +use crate::COMPLETED_QUEST_BITMASK_SIZE; use crate::common::ObjectTypeId; use crate::common::Position; use crate::common::read_string; @@ -369,10 +370,13 @@ pub enum ServerZoneIpcData { }, #[br(pre_assert(*magic == ServerZoneIpcType::QuestCompleteList))] QuestCompleteList { - // TODO: what is this? a bitmask probably? - #[br(count = 760)] - #[bw(pad_size_to = 760)] - unk1: Vec, + #[br(count = COMPLETED_QUEST_BITMASK_SIZE)] + #[bw(pad_size_to = COMPLETED_QUEST_BITMASK_SIZE)] + completed_quests: Vec, + // TODO: what is in ehre? + #[br(count = 69)] + #[bw(pad_size_to = 69)] + unk2: Vec, }, /// Unsure the true purpose of this, but it's needed for the Unending Journey to function. #[br(pre_assert(*magic == ServerZoneIpcType::UnkResponse2))] diff --git a/src/world/connection.rs b/src/world/connection.rs index e329e78..83c49a1 100644 --- a/src/world/connection.rs +++ b/src/world/connection.rs @@ -1245,7 +1245,8 @@ impl ZoneConnection { op_code: ServerZoneIpcType::QuestCompleteList, timestamp: timestamp_secs(), data: ServerZoneIpcData::QuestCompleteList { - unk1: self.player_data.completed_quests.clone(), + completed_quests: self.player_data.completed_quests.clone(), + unk2: vec![0xFF; 69], }, ..Default::default() };