mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-21 01:37:37 +01:00
Core/PacketIO: Check if server opcodes are enabled before sending them to client
This commit is contained in:
@@ -171,6 +171,12 @@ void WorldSession::SendPacket(WorldPacket const* packet)
|
||||
return;
|
||||
}
|
||||
|
||||
if (!opcodeTable[packet->GetOpcode()])
|
||||
{
|
||||
sLog->outError("Prevented sending disabled opcode %d (hex %#04X)", packet->GetOpcode(), packet->GetOpcode());
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef TRINITY_DEBUG
|
||||
// Code for network use statistic
|
||||
static uint64 sendPacketCount = 0;
|
||||
|
||||
Reference in New Issue
Block a user