mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-19 22:49:39 -04:00
Core/Network: Enable trace loggers for packet send and receive (just account + opcodeName, opcodeId)
This commit is contained in:
@@ -163,6 +163,9 @@ int WorldSocket::SendPacket(WorldPacket const& pct)
|
||||
if (sPacketLog->CanLogPacket())
|
||||
sPacketLog->LogPacket(pct, SERVER_TO_CLIENT);
|
||||
|
||||
if (m_Session)
|
||||
sLog->outTrace(LOG_FILTER_OPCODES, "S->C %s %s", m_Session->GetPlayerInfo().c_str(), GetOpcodeNameForLogging(pct.GetOpcode()).c_str());
|
||||
|
||||
// Create a copy of the original packet; this is to avoid issues if a hook modifies it.
|
||||
sScriptMgr->OnPacketSend(this, WorldPacket(pct));
|
||||
|
||||
@@ -674,6 +677,9 @@ int WorldSocket::ProcessIncoming(WorldPacket* new_pct)
|
||||
if (sPacketLog->CanLogPacket())
|
||||
sPacketLog->LogPacket(*new_pct, CLIENT_TO_SERVER);
|
||||
|
||||
if (m_Session)
|
||||
sLog->outTrace(LOG_FILTER_OPCODES, "C->S %s %s", m_Session->GetPlayerInfo().c_str(), GetOpcodeNameForLogging(new_pct.GetOpcode()).c_str());
|
||||
|
||||
try
|
||||
{
|
||||
switch (opcode)
|
||||
|
||||
Reference in New Issue
Block a user