Skip to content

fix(seller): let a price override stand in for a missing vendor price - #44

Merged
icemansparks merged 3 commits into
merkerhoodfrom
fix/override-priced-items
Sep 20, 2026
Merged

icemansparks merged 3 commits into
merkerhoodfrom
fix/override-priced-items

Conversation

@icemansparks

Copy link
Copy Markdown
Collaborator

Changes Proposed:

  • InitializeBins() accepts an item whose avgPrice override is set even when item_template carries neither a BuyPrice nor a SellPrice. Every other filter still applies, so this only reaches items that are otherwise listable.
  • The shared override maps load before the three faction configs initialize, because the bins filter now reads them.
  • The vendor gold price query moves into that same shared loader. It used to run inside InitializeFromSql(), once per faction config, returning the same 2054 rows each time.
  • Price override row for Pristine Black Diamond (18335), from today's ChromieCraft scan: avg 202999, minimum buyout 200000, 7 listings, last seen 2026-09-20 10:24 UTC.

Issues Addressed:

SOURCE:

Item 18335 on the live realm: class = 12, BuyPrice = 0, SellPrice = 0, no override row, not in mod_auctionhousebot_disabled_items, and no row in mod_auctionhousebot_auction_history at all, so the bot has never sold or bought one. The price comes from wowauctions.net's ChromieCraft merged auction house, the same source tools/price-backfill/backfill.py uses. The backfill's candidate query excludes class IN (12,13), which is why the item was never priced. That wider gap is left alone here.

The filter only accepts a row with an avgPrice, since that is what the seller uses as its buyout baseline; a row carrying only a minPrice would have listed at a buyout of 0.

Tests Performed:

  • AuctionHouseBotConfig.cpp.o and AuctionHouseBotWorldScript.cpp.o build clean on TEST against the current tree.
  • Traced every caller of Initialize() / InitializeFromSql(): only OnStartup() and OnBeforeConfigLoad(reload), both of which now load the shared maps first. Nothing clears the override maps or VendorGoldPrices after the loader runs; Reset() is constructor-only.

How to Test the Changes:

  1. Apply the price override SQL, start the realm and confirm AHBConfig: Loaded N price overrides appears once, followed by one Loaded N vendor gold prices line rather than three.
  2. Watch the auction house for Pristine Black Diamond listings from the bot, or check SELECT * FROM mod_auctionhousebot_auction_history WHERE item_id = 18335.
  3. Change an npc_vendor price, run .reload config, and confirm the new ceiling applies without a restart.

Quest class drops such as Pristine Black Diamond (18335) carry no BuyPrice
and no SellPrice, so InitializeBins dropped them before any other filter ran
and the seller never listed them. An override is a price in its own right,
so items that have one now skip the template price checks.

InitializeBins reads the price overrides for that, so the shared maps have
to be loaded before the three configs initialize, not after. The vendor gold
prices move into that same shared loader while the file is open: the query
ran once per faction config and produced the same rows every time.

Closes #40
Closes #43
…lter

A row carrying only a minPrice would have passed the filter and then listed
at a buyout of 0, since avgPrice is what the seller uses as its baseline.

Prices Pristine Black Diamond (18335) from today's ChromieCraft scan:
avg 202999, minimum buyout 200000, 7 listings.
@icemansparks
icemansparks merged commit b00f4dc into merkerhood Sep 20, 2026
1 check passed
@icemansparks
icemansparks deleted the fix/override-priced-items branch September 20, 2026 19:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant