Some changes

This commit is contained in:
Akkadius 2015-02-01 04:05:32 -06:00
parent 5fcd3eb38e
commit b3ea1a9da7
2 changed files with 4 additions and 11 deletions

View File

@ -79,6 +79,7 @@ namespace Logs{
Mercenaries,
QuestDebug,
Server_Client_Packet,
Client_Server_Packet_Unhandled,
MaxCategoryID /* Don't Remove this*/
};
@ -124,6 +125,7 @@ namespace Logs{
"Mercenaries",
"Quest Debug",
"Packet :: Server -> Client",
"Packet :: Client -> Server Unhandled",
};
}

View File

@ -462,17 +462,8 @@ int Client::HandlePacket(const EQApplicationPacket *app)
args.push_back(const_cast<EQApplicationPacket*>(app));
parse->EventPlayer(EVENT_UNHANDLED_OPCODE, this, "", 0, &args);
char buffer[64];
Log.Out(Logs::Detail, Logs::Client_Server_Packet, "Unhandled incoming opcode: %s - 0x%04x", OpcodeManager::EmuToName(app->GetOpcode()), app->GetOpcode());
if (Log.log_settings[Logs::Client_Server_Packet].log_to_console > 0){
app->build_header_dump(buffer);
if (app->size < 1000)
DumpPacket(app, app->size);
else{
std::cout << "Dump limited to 1000 characters:\n";
DumpPacket(app, 1000);
}
}
if (Log.log_settings[Logs::Client_Server_Packet_Unhandled].is_category_enabled == 1)
Log.Out(Logs::General, Logs::Client_Server_Packet_Unhandled, "Incoming OpCode :: [%s - 0x%04x] [Size: %u] \n%s", OpcodeManager::EmuToName(app->GetOpcode()), app->GetOpcode(), app->Size(), DumpPacketToString(app).c_str());
break;
}