Fix vendor: correct CMSG_BUY_ITEM field order (slot before itemId), handle buy failures, show token costs; remove level-up test button (animation triggers on real level-up)

This commit is contained in:
Kelsi 2026-02-17 17:44:48 -08:00
parent b441452dcb
commit 60ebb4dc3f
3 changed files with 35 additions and 19 deletions

View file

@ -3056,8 +3056,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(itemId);
packet.writeUInt32(slot);
packet.writeUInt32(slot); // vendor slot (1-based position in vendor list)
packet.writeUInt32(itemId); // item entry
packet.writeUInt32(count);
packet.writeUInt8(0); // bag slot (0 = find any available bag slot)
return packet;