Core/PacketIO: Add missing ByteBuffer.ResetBitPos calls, fixes buying items from vendors

Port From (https://github.com/TrinityCore/TrinityCore/commit/9e0eac83bf3a05aa64e0222ddad052c84bfbdee2)
This commit is contained in:
hondacrx
2020-12-15 13:21:25 -05:00
parent f6203e98ee
commit a7a06f59f5
@@ -795,6 +795,7 @@ namespace Game.Networking.Packets
public void Read(WorldPacket data)
{
var itemModListCount = data.ReadBits<uint>(6);
data.ResetBitPos();
for (var i = 0; i < itemModListCount; ++i)
{
@@ -1019,6 +1020,7 @@ namespace Game.Networking.Packets
{
Items = new List<InvItem>();
int size = data.ReadBits<int>(2);
data.ResetBitPos();
for (int i = 0; i < size; ++i)
{
var item = new InvItem