mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-23 15:50:20 +00:00
Add hex dump logging for SMSG_QUESTGIVER_QUEST_COMPLETE packet debugging
This commit is contained in:
parent
c61a662524
commit
ecef6c8d77
1 changed files with 14 additions and 1 deletions
|
|
@ -838,9 +838,22 @@ void GameHandler::handlePacket(network::Packet& packet) {
|
|||
break;
|
||||
case Opcode::SMSG_QUESTGIVER_QUEST_COMPLETE: {
|
||||
// Mark quest as complete in local log
|
||||
size_t packetSize = packet.getSize();
|
||||
size_t readPos = packet.getReadPos();
|
||||
LOG_INFO("SMSG_QUESTGIVER_QUEST_COMPLETE: size=", packetSize, " readPos=", readPos);
|
||||
|
||||
// Dump packet hex for debugging
|
||||
std::string hexDump;
|
||||
for (size_t i = readPos; i < std::min(readPos + 32, packetSize); ++i) {
|
||||
char buf[4];
|
||||
snprintf(buf, sizeof(buf), "%02x ", static_cast<uint8_t>(packet.getData()[i]));
|
||||
hexDump += buf;
|
||||
}
|
||||
LOG_INFO(" Packet hex: ", hexDump);
|
||||
|
||||
if (packet.getSize() - packet.getReadPos() >= 4) {
|
||||
uint32_t questId = packet.readUInt32();
|
||||
LOG_INFO("Quest completed: questId=", questId);
|
||||
LOG_INFO(" Read questId: ", questId);
|
||||
for (auto it = questLog_.begin(); it != questLog_.end(); ++it) {
|
||||
if (it->questId == questId) {
|
||||
questLog_.erase(it);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue