Fix vendor buy packet count and stale list parsing

- send CMSG_BUY_ITEM as vendorGuid + itemId + count (drop extra slot/bag fields)
- reset vendor list state before parsing SMSG_LIST_INVENTORY to prevent stale items carrying over
- add packet length guards for list-inventory header and per-item rows
- keep optional extended-cost parsing for cross-core compatibility
This commit is contained in:
Kelsi 2026-02-18 03:40:59 -08:00
parent 3be1d2ecb9
commit a100baff39
3 changed files with 26 additions and 6 deletions

View file

@ -8236,7 +8236,8 @@ void GameHandler::closeVendor() {
void GameHandler::buyItem(uint64_t vendorGuid, uint32_t itemId, uint32_t slot, uint32_t count) {
if (state != WorldState::IN_WORLD || !socket) return;
auto packet = BuyItemPacket::build(vendorGuid, itemId, slot, count);
(void)slot;
auto packet = BuyItemPacket::build(vendorGuid, itemId, count);
socket->send(packet);
}