Core/PacketIO: Fixed client crash with heirlooms

Closes #17964
This commit is contained in:
Shauren
2016-11-03 16:56:58 +01:00
parent 1cd38a5650
commit b34904f4b5
3 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -815,7 +815,7 @@ void Object::BuildDynamicValuesUpdate(uint8 updateType, ByteBuffer* data, Player
data->resize(data->size() + arrayBlockCount * sizeof(UpdateMask::BlockType));
for (std::size_t v = 0; v < values.size(); ++v)
{
if (updateType == UPDATETYPE_VALUES ? _dynamicChangesArrayMask[index][v] : values[v])
if (updateType != UPDATETYPE_VALUES || _dynamicChangesArrayMask[index][v])
{
UpdateMask::SetUpdateBit(data->contents() + arrayMaskPos, v);
*data << uint32(values[v]);
@@ -1411,7 +1411,7 @@ void Object::SetDynamicValue(uint16 index, uint16 offset, uint32 value)
if (_dynamicChangesArrayMask[index].size() <= offset)
_dynamicChangesArrayMask[index].resize((offset / 32 + 1) * 32);
if (values[offset] != value)
if (values[offset] != value || changeType == UpdateMask::VALUE_AND_SIZE_CHANGED)
{
values[offset] = value;
_dynamicChangesMask[index] = changeType;