Lifelike AH: per-item listing count override (Part B)#18
Merged
Conversation
New mod_auctionhousebot_countOverride table (item, targetCount), loaded and shared across configs exactly like the price overrides. In getElement, a per-item override caps how many of that item the bot lists, replacing the global DuplicatesCount for that item (max-cap semantics). Data generated from the ChromieCraft item-count dataset with targetCount = min(cc_item_count, 50); 10601 items. Items with no override keep current behaviour; a missing/empty table degrades gracefully (GetCountOverrideForItem returns 0).
…ument behaviour Per sonnet review: an empty count-override table is a normal optional state (LOG_INFO, not ERROR); targetCount column is int UNSIGNED to match the uint32 read; README documents that an override caps an item even when DuplicatesCount is 0 (unlimited).
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.
Implements Part B of the lifelike-AH plan: the bot lists per-item quantities that mirror ChromieCraft's real auction house instead of a uniform global
DuplicatesCount.Change
mod_auctionhousebot_countOverride (item, targetCount), loaded viaAHBConfig::LoadCountOverrides()and shared across alliance/horde/neutral configs — mirrors thepriceOverrideplumbing exactly.getElementtakes the config and, when a per-item override exists, uses it as the max listing count for that item (max-cap semantics) instead of the globalDuplicatesCount.targetCount = min(cc_item_count, 50)from the 10,601-item ChromieCraft count dataset (469 clamped at 50, 5,984 stay at 1).Safety
GetCountOverrideForItemreturns 0 and the bot falls back toDuplicatesCount— graceful degradation.-Werrortraps).Validation
CI
-Werrorbuild is the compile gate. Behaviour must be verified on the TEST realm (apply the SQL, restart worldserver, confirm commodities list in bulk while rare items stay scarce) before LIVE.