mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 22:58:34 +00:00
At point in which Client -> Server packet logging is working, will do more prechecking to declare that anything actually is subscribed to this category before outputting
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
#include "platform.h"
|
||||
#include <iomanip>
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <stdio.h>
|
||||
|
||||
#ifndef STATIC_OPCODE
|
||||
@@ -510,3 +511,12 @@ void DumpPacket(const EQApplicationPacket* app, bool iShowInfo) {
|
||||
// DumpPacketAscii(app->pBuffer, app->size);
|
||||
}
|
||||
|
||||
std::string DumpPacketToString(const EQApplicationPacket* app, bool iShowInfo){
|
||||
std::ostringstream out;
|
||||
if (iShowInfo) {
|
||||
out << "Dumping Applayer: 0x" << std::hex << std::setfill('0') << std::setw(4) << app->GetOpcode() << std::dec;
|
||||
out << " size:" << app->size << std::endl;
|
||||
}
|
||||
out << DumpPacketHexToString(app->pBuffer, app->size);
|
||||
return out.str();
|
||||
}
|
||||
Reference in New Issue
Block a user