feat(Core/Opcode): simple opcode filter to log non-existing opcode (#2281)
This commit is contained in:
@@ -269,7 +269,11 @@ bool WorldSession::Update(uint32 diff, PacketFilter& updater)
|
|||||||
|
|
||||||
while (m_Socket && !m_Socket->IsClosed() && !_recvQueue.empty() && _recvQueue.peek(true) != firstDelayedPacket && _recvQueue.next(packet, updater))
|
while (m_Socket && !m_Socket->IsClosed() && !_recvQueue.empty() && _recvQueue.peek(true) != firstDelayedPacket && _recvQueue.next(packet, updater))
|
||||||
{
|
{
|
||||||
if (packet->GetOpcode() < NUM_MSG_TYPES)
|
if (packet->GetOpcode() >= NUM_MSG_TYPES)
|
||||||
|
{
|
||||||
|
sLog->outError("WorldSession Packet filter: received non-existent opcode %s (0x%.4X)",LookupOpcodeName(packet->GetOpcode()), packet->GetOpcode());
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
OpcodeHandler &opHandle = opcodeTable[packet->GetOpcode()];
|
OpcodeHandler &opHandle = opcodeTable[packet->GetOpcode()];
|
||||||
try
|
try
|
||||||
|
|||||||
Reference in New Issue
Block a user