mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-23 07:40:14 +00:00
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:
parent
3be1d2ecb9
commit
a100baff39
3 changed files with 26 additions and 6 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue