Skip to content

Commit

Permalink
Core/PacketIO: Add missing ByteBuffer::ResetBitPos calls, fixes buyin…
Browse files Browse the repository at this point in the history
…g items from vendors

Closes #25729
  • Loading branch information
Shauren committed Dec 15, 2020
1 parent 93f2aff commit 9e0eac8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/server/game/Server/Packets/ItemPacketsCommon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ ByteBuffer& operator<<(ByteBuffer& data, ItemModList const& itemModList)
ByteBuffer& operator>>(ByteBuffer& data, ItemModList& itemModList)
{
itemModList.Values.resize(data.ReadBits(6));
data.ResetBitPos();

for (ItemMod& itemMod : itemModList.Values)
data >> itemMod;
Expand Down Expand Up @@ -248,6 +249,7 @@ ByteBuffer& operator>>(ByteBuffer& data, ItemGemData& itemGemData)
ByteBuffer& operator>>(ByteBuffer& data, InvUpdate& invUpdate)
{
invUpdate.Items.resize(data.ReadBits(2));
data.ResetBitPos();
for (InvUpdate::InvItem& item : invUpdate.Items)
{
data >> item.ContainerSlot;
Expand Down

0 comments on commit 9e0eac8

Please sign in to comment.