Repository navigation
fix(seller): let a price override stand in for a missing vendor price - #44
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes Proposed:
InitializeBins()accepts an item whoseavgPriceoverride is set even whenitem_templatecarries neither a BuyPrice nor a SellPrice. Every other filter still applies, so this only reaches items that are otherwise listable.InitializeFromSql(), once per faction config, returning the same 2054 rows each time.Issues Addressed:
SOURCE:
Item 18335 on the live realm:
class = 12,BuyPrice = 0,SellPrice = 0, no override row, not inmod_auctionhousebot_disabled_items, and no row inmod_auctionhousebot_auction_historyat all, so the bot has never sold or bought one. The price comes from wowauctions.net's ChromieCraft merged auction house, the same sourcetools/price-backfill/backfill.pyuses. The backfill's candidate query excludesclass 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 aminPricewould have listed at a buyout of 0.Tests Performed:
AuctionHouseBotConfig.cpp.oandAuctionHouseBotWorldScript.cpp.obuild clean on TEST against the current tree.Initialize()/InitializeFromSql(): onlyOnStartup()andOnBeforeConfigLoad(reload), both of which now load the shared maps first. Nothing clears the override maps orVendorGoldPricesafter the loader runs;Reset()is constructor-only.How to Test the Changes:
AHBConfig: Loaded N price overridesappears once, followed by oneLoaded N vendor gold pricesline rather than three.SELECT * FROM mod_auctionhousebot_auction_history WHERE item_id = 18335.npc_vendorprice, run.reload config, and confirm the new ceiling applies without a restart.