aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/game/Object.cpp13
-rw-r--r--src/game/UpdateData.cpp5
2 files changed, 10 insertions, 8 deletions
diff --git a/src/game/Object.cpp b/src/game/Object.cpp
index f94ee52efdb..9d5f7eb8f57 100644
--- a/src/game/Object.cpp
+++ b/src/game/Object.cpp
@@ -126,12 +126,13 @@ void Object::_Create( uint32 guidlow, uint32 entry, HighGuid guidhigh )
m_PackGUID.appendPackGUID(GetGUID());
}
+// This function is never used
void Object::BuildMovementUpdateBlock(UpdateData * data, uint32 flags ) const
{
- ByteBuffer buf(50);
+ ByteBuffer buf(500);
buf << uint8( UPDATETYPE_MOVEMENT );
- buf.append(GetPackGUID());
+ buf << (uint8)0xFF << GetGUID();
_BuildMovementUpdate(&buf, flags);
@@ -188,9 +189,9 @@ void Object::BuildCreateUpdateBlockForPlayer(UpdateData *data, Player *target) c
//sLog.outDebug("BuildCreateUpdate: update-type: %u, object-type: %u got flags: %X, flags2: %X", updatetype, m_objectTypeId, flags, flags2);
- ByteBuffer buf(50);
+ ByteBuffer buf(500);
buf << (uint8)updatetype;
- buf.append(GetPackGUID());
+ buf << (uint8)0xFF << GetGUID();
buf << (uint8)m_objectTypeId;
_BuildMovementUpdate(&buf, flags);
@@ -224,10 +225,10 @@ void Object::SendUpdateToPlayer(Player* player)
void Object::BuildValuesUpdateBlockForPlayer(UpdateData *data, Player *target) const
{
- ByteBuffer buf(50);
+ ByteBuffer buf(500);
buf << (uint8) UPDATETYPE_VALUES;
- buf.append(GetPackGUID());
+ buf << (uint8)0xFF << GetGUID();
UpdateMask updateMask;
updateMask.SetCount( m_valuesCount );
diff --git a/src/game/UpdateData.cpp b/src/game/UpdateData.cpp
index 34547040cda..3988a724ea5 100644
--- a/src/game/UpdateData.cpp
+++ b/src/game/UpdateData.cpp
@@ -105,7 +105,7 @@ void UpdateData::Compress(void* dst, uint32 *dst_size, void* src, int src_size)
bool UpdateData::BuildPacket(WorldPacket *packet)
{
- ByteBuffer buf(m_data.size());
+ ByteBuffer buf(m_data.size() + 10 + m_outOfRangeGUIDs.size()*8);
buf << (uint32) (!m_outOfRangeGUIDs.empty() ? m_blockCount + 1 : m_blockCount);
@@ -116,7 +116,8 @@ bool UpdateData::BuildPacket(WorldPacket *packet)
for(std::set<uint64>::const_iterator i = m_outOfRangeGUIDs.begin(); i != m_outOfRangeGUIDs.end(); ++i)
{
- buf.appendPackGUID(*i);
+ //buf.appendPackGUID(*i);
+ buf << (uint8)0xFF << (uint64)*i;
}
}