diff options
author | Machiavelli <none@none> | 2009-06-11 17:56:20 +0200 |
---|---|---|
committer | Machiavelli <none@none> | 2009-06-11 17:56:20 +0200 |
commit | 1c97b2bf796fb367b77e653556220e69cf7b5878 (patch) | |
tree | ffaa612c7502785edc750a664ebc2253c41e4f5c /src/game/UpdateData.cpp | |
parent | 6eaf6e962a31aa308406289d538aef30a56b95cb (diff) | |
parent | 6c069aa5b8405d51202781104daf5c6e8642b891 (diff) |
Merge
--HG--
branch : trunk
Diffstat (limited to 'src/game/UpdateData.cpp')
-rw-r--r-- | src/game/UpdateData.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/game/UpdateData.cpp b/src/game/UpdateData.cpp index d041c6100fc..a3192b74b0e 100644 --- a/src/game/UpdateData.cpp +++ b/src/game/UpdateData.cpp @@ -105,7 +105,9 @@ void UpdateData::Compress(void* dst, uint32 *dst_size, void* src, int src_size) bool UpdateData::BuildPacket(WorldPacket *packet) { - ByteBuffer buf(4+(m_outOfRangeGUIDs.empty() ? 0 : 1+4+9*m_outOfRangeGUIDs.size())+m_data.wpos()); + ASSERT(packet->empty()); // shouldn't happen + + ByteBuffer buf(4 + (m_outOfRangeGUIDs.empty() ? 0 : 1 + 4 + 9 * m_outOfRangeGUIDs.size()) + m_data.wpos()); buf << (uint32) (!m_outOfRangeGUIDs.empty() ? m_blockCount + 1 : m_blockCount); @@ -122,8 +124,6 @@ bool UpdateData::BuildPacket(WorldPacket *packet) buf.append(m_data); - packet->clear(); - size_t pSize = buf.wpos(); // use real used data size if (pSize > 100 ) // compress large packets |