Skip to content

fix: Add Market offer limits to prevent disconnect - #808

Merged
jprzimba merged 1 commit into
mainfrom
fix-market-bug
Jul 1, 2026
Merged

fix: Add Market offer limits to prevent disconnect#808
jprzimba merged 1 commit into
mainfrom
fix-market-bug

Conversation

@jprzimba

@jprzimba jprzimba commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator

Enforce per-player and per-item per-side market offer limits and cap returned results.

  • Adds constants (MAX_MARKET_OFFERS_RETURNED=1500, MAX_MARKET_OFFERS_PER_SIDE=700, MAX_MARKET_OWN_OFFERS_PER_SIDE=1000) to IOMarket.hpp.
  • Game::playerCreateMarketOffer now checks player and item per-side counts and blocks new offers with user message and log when limits are reached.
  • IOMarket query functions now ORDER BY id DESC and apply LIMITs to reduce result set size. New DB helpers IOMarket::getPlayerOfferCountPerSide and IOMarket::getItemOfferCountPerSide added; DB failures return 0. Purpose: reduce DB load and mitigate market spam.

Market Bug

Market Bug

@jprzimba jprzimba changed the title fix: Add Market offer limits to prevent client crash fix: Add Market offer limits to prevent disconnect Jun 29, 2026
@jprzimba
jprzimba merged commit 34cbec0 into main Jul 1, 2026
22 checks passed
@jprzimba
jprzimba deleted the fix-market-bug branch July 1, 2026 11:27
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