Core/PacketIO: Reduce size of SMSG_UPDATE_OBJECT by trimming trailing zeros in values updatemask

This commit is contained in:
Shauren authored and Ovahlord committed 2021-04-25 17:22:58 +02:00
1 parent 7a1ce34333
commit f3e0650886
5 files changed
+75 -92

No files matched your search

+1 -3
View File
@@ -14204,7 +14204,6 @@ void Unit::BuildValuesUpdate(uint8 updateType, ByteBuffer* data, Player* target)
return;
ByteBuffer fieldBuffer;
UpdateMask updateMask;
uint32 valCount = m_valuesCount;
@@ -14216,7 +14215,7 @@ void Unit::BuildValuesUpdate(uint8 updateType, ByteBuffer* data, Player* target)
else if (GetTypeId() == TYPEID_PLAYER)
valCount = PLAYER_END_NOT_SELF;
updateMask.SetCount(valCount);
UpdateMaskPacketBuilder updateMask(valCount);
Player* plr = GetCharmerOrOwnerPlayerOrPlayerItself();
if (GetOwnerGUID() == target->GetGUID())
@@ -14365,7 +14364,6 @@ void Unit::BuildValuesUpdate(uint8 updateType, ByteBuffer* data, Player* target)
}
}
*data << uint8(updateMask.GetBlockCount());
updateMask.AppendToPacket(data);
data->append(fieldBuffer);
}