Skip to content

Conversation

dudantas
Copy link
Member

Adds validation to ensure item tier does not exceed the configured maximum in market offer creation, cancellation, and acceptance. Also updates item tier assignment to use setTier instead of setAttribute. This improves consistency and prevents invalid item upgrades in market transactions.

Adds validation to ensure item tier does not exceed the configured maximum in market offer creation, cancellation, and acceptance. Also updates item tier assignment to use setTier instead of setAttribute. This improves consistency and prevents invalid item upgrades in market transactions.
@Copilot Copilot AI review requested due to automatic review settings October 18, 2025 13:40
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR enforces maximum item tier validation in market operations to prevent invalid item upgrades. The changes ensure that item tiers don't exceed the configured maximum when creating, canceling, or accepting market offers.

  • Adds tier validation against FORGE_MAX_ITEM_TIER configuration in market operations
  • Replaces setAttribute calls with setTier method for consistency
  • Prevents tier assignment on non-upgradeable items

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
src/io/iomarket.cpp Updates expired offer processing to use setTier instead of setAttribute
src/game/game.cpp Adds tier validation in market offer creation, cancellation, and acceptance operations

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
B Maintainability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@dudantas dudantas merged commit fbb80b1 into main Oct 19, 2025
36 of 37 checks passed
@dudantas dudantas deleted the dudantas/enforce-max-item-tier branch October 19, 2025 03:34
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.

2 participants