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:
Akkadius
2015-01-31 02:23:58 -06:00
parent 0bdbc5f5c9
commit a6b95aeceb
9 changed files with 81 additions and 14 deletions
+10
View File
@@ -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();
}