aboutsummaryrefslogtreecommitdiff
path: root/src/game/UpdateData.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2009-06-11 00:45:59 -0500
committermegamage <none@none>2009-06-11 00:45:59 -0500
commit9d670fe6f5757430d575081db9a6e5273400330d (patch)
tree9148b75f310fda0bf082be70731abfca03e84f20 /src/game/UpdateData.cpp
parent9c70e3d89bbace30bfabcf8c42323472ad1e4c4d (diff)
*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
Diffstat (limited to 'src/game/UpdateData.cpp')
-rw-r--r--src/game/UpdateData.cpp6
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