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

+3
View File
@@ -104,6 +104,9 @@ bool WorldSocket::Update()
MessageBuffer buffer(_sendBufferSize);
while (_bufferQueue.Dequeue(queued))
{
if (_worldSession && queued->size() > 0x400 && !queued->IsCompressed())
queued->Compress(_worldSession->GetCompressionStream());
ServerPktHeader header(queued->size() + 2, queued->GetOpcode());
if (queued->NeedsEncryption())
_authCrypt.EncryptSend(header.header, header.getHeaderLength());