1
Fork 0
mirror of https://github.com/redstrate/Kawari.git synced 2025-07-13 17:07:45 +00:00

Use COMPLETED_QUEST_BITMASK_SIZE in QuestCompleteList

This commit is contained in:
Joshua Goins 2025-07-12 08:33:04 -04:00
parent 48b84bfed9
commit d58025e415
2 changed files with 10 additions and 5 deletions

View file

@ -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<u8>,
#[br(count = COMPLETED_QUEST_BITMASK_SIZE)]
#[bw(pad_size_to = COMPLETED_QUEST_BITMASK_SIZE)]
completed_quests: Vec<u8>,
// TODO: what is in ehre?
#[br(count = 69)]
#[bw(pad_size_to = 69)]
unk2: Vec<u8>,
},
/// Unsure the true purpose of this, but it's needed for the Unending Journey to function.
#[br(pre_assert(*magic == ServerZoneIpcType::UnkResponse2))]

View file

@ -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()
};