mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
Fix.
This commit is contained in:
parent
907cc45b44
commit
78fbb2c405
1 changed files with 5 additions and 4 deletions
|
|
@ -127,11 +127,12 @@ bool UpdateData::BuildPacket(WorldPacket *packet)
|
|||
|
||||
if (pSize > 100 ) // compress large packets
|
||||
{
|
||||
packet->SetOpcode( SMSG_COMPRESSED_UPDATE_OBJECT );
|
||||
*packet << uint32(pSize); // original size
|
||||
packet->resize(pSize + sizeof(uint32));
|
||||
packet->SetOpcode(SMSG_COMPRESSED_UPDATE_OBJECT);
|
||||
packet->put<uint32>(0, pSize); // original size
|
||||
uint32 destsize = pSize;
|
||||
Compress((uint8*)buf.contents(), &destsize, (uint8*)buf.contents(), pSize);
|
||||
packet->append(buf.contents(), destsize);
|
||||
Compress((uint8*)packet->contents() + sizeof(uint32), &destsize, (uint8*)buf.contents(), pSize);
|
||||
packet->resize(destsize + sizeof(uint32));
|
||||
}
|
||||
else // send small packets without compression
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue