Skip to content

Skip hidden slots when sorting item database by stats - #10371

Merged
LocalIdentity merged 1 commit into
PathOfBuildingCommunity:devfrom
AdamZ-8113:fix/item-db-hidden-slot-calcs
Oct 29, 2026
Merged

LocalIdentity merged 1 commit into
PathOfBuildingCommunity:devfrom
AdamZ-8113:fix/item-db-hidden-slot-calcs

Conversation

@AdamZ-8113

@AdamZ-8113 AdamZ-8113 commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Description of the problem being solved:

Sorting correctness + performance in the item database, mostly for Rings.

Item database stat sorting could compare items against hidden equipment slots. For hidden slots ignored by the calculation engine, the comparison returned the build’s unchanged stats instead of a meaningful item replacement result.

ListBuilder keeps the highest comparison value using m_max, so these unchanged results could distort item sorting. For example, rings that reduced DPS could tie at the build’s current DPS and sort alphabetically instead of by their actual results.

This adds slot.shown() to the existing slot eligibility checks, matching item hover comparisons. Sorting now calculates comparisons only for visible, active slots in the selected item set. This effectively stops Ring 3 from being included in the sorting, unless the Nameless Bloodline node "The Unseen Hand" is allocated.

Steps taken to verify a working solution:

  • Profiling test to confirm reduce sort latency (30.6% faster for Rings)
  • Manual check to confirm Ring 3 still shows in calcs when it's enabled, and that sorting is fixed

Link to a build that showcases this PR:

  • Any build works https://pob.codes/b/59K4qqNsBb_

Before screenshot:

  • Note sorting differences after The Will of Tul
image

After screenshot:

image

@LocalIdentity LocalIdentity added the bug: behaviour Behavioral differences label Oct 29, 2026
@LocalIdentity
LocalIdentity merged commit 866a11f into PathOfBuildingCommunity:dev Oct 29, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug: behaviour Behavioral differences

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants