mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-17 17:43:52 +00:00
fix: auction house refresh failed after browse-all (empty name search)
The auto-refresh after successful bid/buyout was gated on lastAuctionSearch_.name.length() > 0, so a browse-all search (empty name) would never refresh. Replaced with a hasAuctionSearch_ flag that's set on any search regardless of the name filter.
This commit is contained in:
parent
a2340dd702
commit
2e1f0f15ea
2 changed files with 5 additions and 2 deletions
|
|
@ -374,6 +374,7 @@ private:
|
||||||
uint32_t offset = 0;
|
uint32_t offset = 0;
|
||||||
};
|
};
|
||||||
AuctionSearchParams lastAuctionSearch_;
|
AuctionSearchParams lastAuctionSearch_;
|
||||||
|
bool hasAuctionSearch_ = false; // true after any search (including empty-name browse-all)
|
||||||
enum class AuctionResultTarget { BROWSE, OWNER, BIDDER };
|
enum class AuctionResultTarget { BROWSE, OWNER, BIDDER };
|
||||||
AuctionResultTarget pendingAuctionTarget_ = AuctionResultTarget::BROWSE;
|
AuctionResultTarget pendingAuctionTarget_ = AuctionResultTarget::BROWSE;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1834,6 +1834,7 @@ void InventoryHandler::auctionSearch(const std::string& name, uint8_t levelMin,
|
||||||
uint32_t invTypeMask, uint8_t usableOnly, uint32_t offset) {
|
uint32_t invTypeMask, uint8_t usableOnly, uint32_t offset) {
|
||||||
if (owner_.state != WorldState::IN_WORLD || !owner_.socket || auctioneerGuid_ == 0) return;
|
if (owner_.state != WorldState::IN_WORLD || !owner_.socket || auctioneerGuid_ == 0) return;
|
||||||
lastAuctionSearch_ = {name, levelMin, levelMax, quality, itemClass, itemSubClass, invTypeMask, usableOnly, offset};
|
lastAuctionSearch_ = {name, levelMin, levelMax, quality, itemClass, itemSubClass, invTypeMask, usableOnly, offset};
|
||||||
|
hasAuctionSearch_ = true;
|
||||||
pendingAuctionTarget_ = AuctionResultTarget::BROWSE;
|
pendingAuctionTarget_ = AuctionResultTarget::BROWSE;
|
||||||
auto packet = AuctionListItemsPacket::build(auctioneerGuid_, offset, name,
|
auto packet = AuctionListItemsPacket::build(auctioneerGuid_, offset, name,
|
||||||
levelMin, levelMax, invTypeMask,
|
levelMin, levelMax, invTypeMask,
|
||||||
|
|
@ -1946,8 +1947,9 @@ void InventoryHandler::handleAuctionCommandResult(network::Packet& packet) {
|
||||||
owner_.addonEventCallback_("PLAYER_MONEY", {});
|
owner_.addonEventCallback_("PLAYER_MONEY", {});
|
||||||
owner_.addonEventCallback_("BAG_UPDATE", {});
|
owner_.addonEventCallback_("BAG_UPDATE", {});
|
||||||
}
|
}
|
||||||
// Re-query after successful buy/bid
|
// Re-query after successful buy/bid so the list reflects the change.
|
||||||
if (action == 2 && lastAuctionSearch_.name.length() > 0) {
|
// Previously gated on name.length()>0 which skipped browse-all (empty name).
|
||||||
|
if (action == 2 && hasAuctionSearch_) {
|
||||||
auctionSearch(lastAuctionSearch_.name, lastAuctionSearch_.levelMin, lastAuctionSearch_.levelMax,
|
auctionSearch(lastAuctionSearch_.name, lastAuctionSearch_.levelMin, lastAuctionSearch_.levelMax,
|
||||||
lastAuctionSearch_.quality, lastAuctionSearch_.itemClass, lastAuctionSearch_.itemSubClass,
|
lastAuctionSearch_.quality, lastAuctionSearch_.itemClass, lastAuctionSearch_.itemSubClass,
|
||||||
lastAuctionSearch_.invTypeMask, lastAuctionSearch_.usableOnly, lastAuctionSearch_.offset);
|
lastAuctionSearch_.invTypeMask, lastAuctionSearch_.usableOnly, lastAuctionSearch_.offset);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue