Core/PacketIO: Check if server opcodes are enabled before sending them to client

This commit is contained in:
Shauren
2012-07-11 23:29:33 +02:00
parent a2b1cf66ca
commit adc22685f2

View File

@@ -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;