mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-15 00:43:52 +00:00
fix(auction): resolve item GUID with fallback and gate packet format
auctionSellItem now resolves the item GUID internally via backpackSlotGuids_ with resolveOnlineItemGuid fallback, matching the pattern used by vendor sell and item use. Previously the UI passed the GUID directly from getBackpackItemGuid() with no fallback, so items with unset slot GUIDs silently failed to list. Also gates CMSG_AUCTION_SELL_ITEM format by expansion: Classic/TBC omits the itemCount and stackCount fields that WotLK requires.
This commit is contained in:
parent
ac5c61203d
commit
345b41b810
7 changed files with 40 additions and 22 deletions
|
|
@ -5726,13 +5726,20 @@ network::Packet AuctionListItemsPacket::build(
|
|||
network::Packet AuctionSellItemPacket::build(
|
||||
uint64_t auctioneerGuid, uint64_t itemGuid,
|
||||
uint32_t stackCount, uint32_t bid,
|
||||
uint32_t buyout, uint32_t duration)
|
||||
uint32_t buyout, uint32_t duration,
|
||||
bool preWotlk)
|
||||
{
|
||||
network::Packet p(wireOpcode(Opcode::CMSG_AUCTION_SELL_ITEM));
|
||||
p.writeUInt64(auctioneerGuid);
|
||||
p.writeUInt32(1); // item count (WotLK supports multiple, we send 1)
|
||||
p.writeUInt64(itemGuid);
|
||||
p.writeUInt32(stackCount);
|
||||
if (!preWotlk) {
|
||||
// WotLK: itemCount(4) + per-item [guid(8) + stackCount(4)]
|
||||
p.writeUInt32(1);
|
||||
p.writeUInt64(itemGuid);
|
||||
p.writeUInt32(stackCount);
|
||||
} else {
|
||||
// Classic/TBC: just itemGuid, no count fields
|
||||
p.writeUInt64(itemGuid);
|
||||
}
|
||||
p.writeUInt32(bid);
|
||||
p.writeUInt32(buyout);
|
||||
p.writeUInt32(duration);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue