feat: parse SMSG_RESPOND_INSPECT_ACHIEVEMENTS and request on inspect

When the player inspects another player on WotLK 3.3.5a, also send
CMSG_QUERY_INSPECT_ACHIEVEMENTS so the server responds with
SMSG_RESPOND_INSPECT_ACHIEVEMENTS.  The new handler parses the
achievement-id/date sentinel-terminated block (same layout as
SMSG_ALL_ACHIEVEMENT_DATA but prefixed with a packed guid) and stores
the earned achievement IDs keyed by GUID in
inspectedPlayerAchievements_.  The new public getter
getInspectedPlayerAchievements(guid) exposes this data for the inspect
UI.  The cache is cleared on world entry to prevent stale data.
QueryInspectAchievementsPacket::build() handles the CMSG wire format
(uint64 guid + uint8 unk=0).
This commit is contained in:
Kelsi 2026-03-12 23:23:02 -07:00
parent 0089b3a160
commit 1d9dc6dcae
4 changed files with 87 additions and 1 deletions

View file

@ -1722,6 +1722,15 @@ network::Packet InspectPacket::build(uint64_t targetGuid) {
return packet;
}
network::Packet QueryInspectAchievementsPacket::build(uint64_t targetGuid) {
// CMSG_QUERY_INSPECT_ACHIEVEMENTS: uint64 targetGuid + uint8 unk (always 0)
network::Packet packet(wireOpcode(Opcode::CMSG_QUERY_INSPECT_ACHIEVEMENTS));
packet.writeUInt64(targetGuid);
packet.writeUInt8(0); // unk / achievementSlot — always 0 for WotLK
LOG_DEBUG("Built CMSG_QUERY_INSPECT_ACHIEVEMENTS: target=0x", std::hex, targetGuid, std::dec);
return packet;
}
// ============================================================
// Server Info Commands
// ============================================================