Core/Packets: restore packet compression that got lost during the packet class porting

This commit is contained in:
Ovahlord committed 2019-08-29 17:15:18 +02:00
1 parent 706a9fea1a
commit 5657e61b24
6 files changed
+138 -6

No files matched your search

+9 -3
View File
@@ -222,10 +222,16 @@ void WorldSession::SendPacket(WorldPacket const* packet, bool forced /*= false*/
if (!m_Socket)
return;
ASSERT(packet->GetOpcode() != NULL_OPCODE);
if (!m_Socket)
if (packet->GetOpcode() == NULL_OPCODE)
{
TC_LOG_ERROR("network.opcode", "Prevented sending of NULL_OPCODE to %s", GetPlayerInfo().c_str());
return;
}
else if (packet->GetOpcode() == UNKNOWN_OPCODE)
{
TC_LOG_ERROR("network.opcode", "Prevented sending of UNKNOWN_OPCODE to %s", GetPlayerInfo().c_str());
return;
}
if (!forced)
{