mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-17 09:33:51 +00:00
Fix CMSG_BUY_ITEM field order: item before slot
TrinityCore's HandleBuyItemOpcode reads vendorGuid → item → slot → count → bagIndex. The previous fix had accidentally reversed item and slot, so the server received the vendor slot number as the item ID (a small number like 1-5) and the actual item ID as the slot, causing every purchase to be silently rejected.
This commit is contained in:
parent
4043e47fd5
commit
e73bedd78b
1 changed files with 1 additions and 1 deletions
|
|
@ -3061,8 +3061,8 @@ network::Packet ListInventoryPacket::build(uint64_t npcGuid) {
|
|||
network::Packet BuyItemPacket::build(uint64_t vendorGuid, uint32_t itemId, uint32_t slot, uint32_t count) {
|
||||
network::Packet packet(wireOpcode(Opcode::CMSG_BUY_ITEM));
|
||||
packet.writeUInt64(vendorGuid);
|
||||
packet.writeUInt32(slot); // vendor slot (1-based position in vendor list)
|
||||
packet.writeUInt32(itemId); // item entry
|
||||
packet.writeUInt32(slot); // vendor slot (1-based position in vendor list)
|
||||
packet.writeUInt32(count);
|
||||
packet.writeUInt8(0); // bag slot (0 = find any available bag slot)
|
||||
return packet;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue