Core/Opcodes: Remove some opcodes that no longer exist on cata and fix a couple of log messages

This commit is contained in:
Spp
2012-08-22 13:38:55 +02:00
parent 1f162fb7c0
commit bb559072ee
6 changed files with 1665 additions and 1680 deletions
+10 -4
View File
@@ -200,17 +200,23 @@ void WorldSession::SendPacket(WorldPacket const* packet, bool forced /*= false*/
if (!m_Socket)
return;
if (packet->GetOpcode() == NULL_OPCODE || packet->GetOpcode() == UNKNOWN_OPCODE)
if (packet->GetOpcode() == NULL_OPCODE)
{
sLog->outError(LOG_FILTER_NETWORKIO, "Prevented sending of %s", packet->GetOpcode() == NULL_OPCODE ? "NULL_OPCODE" : "UNKNOWN_OPCODE");
sLog->outError(LOG_FILTER_OPCODES, "Prevented sending of NULL_OPCODE to %s", GetPlayerName(false).c_str());
return;
}
else if (packet->GetOpcode() == UNKNOWN_OPCODE)
{
sLog->outError(LOG_FILTER_OPCODES, "Prevented sending of UNKNOWN_OPCODE to %s", GetPlayerName(false).c_str());
return;
}
if (!forced)
{
if (!opcodeTable[packet->GetOpcode()])
OpcodeHandler* handler = opcodeTable[packet->GetOpcode()];
if (!handler || handler->status == STATUS_UNHANDLED)
{
sLog->outError(LOG_FILTER_NETWORKIO, "Prevented sending disabled opcode %d (hex 0x%04X)", packet->GetOpcode(), packet->GetOpcode());
sLog->outError(LOG_FILTER_OPCODES, "Prevented sending disabled opcode %s to %s", GetOpcodeNameForLogging(packet->GetOpcode()).c_str(), GetPlayerName(false).c_str());
return;
}
}