From 9d670fe6f5757430d575081db9a6e5273400330d Mon Sep 17 00:00:00 2001 From: megamage Date: Thu, 11 Jun 2009 00:45:59 -0500 Subject: *Switch to support client version 3.1.3 *I strongly recommend you not to use this until you get the 313 db. Now all destructible buildings cause client crash. Source: Mangos Thanks to TOM_RUS for most work to make this switch possible ;) --HG-- branch : trunk --- src/game/UpdateData.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/game/UpdateData.cpp') 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 -- cgit v1.2.3