Code style (game + scripts only):

"( " --> "("
" )" --> ")"

--HG--
branch : trunk
This commit is contained in:
Spp committed 2010-04-07 22:59:46 +02:00
1 parent d19e127080
commit 49d05ba9aa
176 files changed
+4789 -4789

No files matched your search

+6 -6
View File
@@ -126,23 +126,23 @@ bool UpdateData::BuildPacket(WorldPacket *packet)
size_t pSize = buf.wpos(); // use real used data size
if (pSize > 100 ) // compress large packets
if (pSize > 100) // compress large packets
{
uint32 destsize = compressBound(pSize);
packet->resize( destsize + sizeof(uint32) );
packet->resize(destsize + sizeof(uint32));
packet->put<uint32>(0, pSize);
Compress(const_cast<uint8*>(packet->contents()) + sizeof(uint32), &destsize, (void*)buf.contents(), pSize);
if (destsize == 0)
return false;
packet->resize( destsize + sizeof(uint32) );
packet->SetOpcode( SMSG_COMPRESSED_UPDATE_OBJECT );
packet->resize(destsize + sizeof(uint32));
packet->SetOpcode(SMSG_COMPRESSED_UPDATE_OBJECT);
}
else // send small packets without compression
{
packet->append( buf );
packet->SetOpcode( SMSG_UPDATE_OBJECT );
packet->append(buf);
packet->SetOpcode(SMSG_UPDATE_OBJECT);
}
return true;