Skip to content

Fix sort function for enchants (and other paths) on offhand not working, and bug with 'remove enchant' - #10475

Merged
Wires77 merged 1 commit into
PathOfBuildingCommunity:devfrom
AdamZ-8113:fix/item-modifier-slot-context
Nov 17, 2026
Merged

Wires77 merged 1 commit into
PathOfBuildingCommunity:devfrom
AdamZ-8113:fix/item-modifier-slot-context

Conversation

@AdamZ-8113

@AdamZ-8113 AdamZ-8113 commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Description of the problem being solved:

Sorting modifiers for an offhand weapon doesn't work in many cases because we evaluate it in the main hand slot instead. In a Dual Strike of Ambidexterity build, this gives every enchantment a zero Hit DPS score, effectively breaking sorting.

The affected paths found and fixed are:

  • Enchantment sorting.
  • Crafting prefix and suffix sorting.
  • Corruption and Scourge modifier sorting.
  • Sorting predefined choices in Add Modifier.
  • Modifier hover previews for crafting affixes, corruption modifiers, added modifiers, and Crucible modifiers.

The fix uses the slot where the item is actually equipped, taking the selected item set and weapon set into account. Unequipped items retain the primary slot fallback.

Enchantment and modifier previews now use the same equipment slot as sorting, so the displayed stat changes match the ranking.

Separately: Currently the enchantment modal's Remove button only removes one modifier line, so Harvest enchants require two Remove actions. This fixes that

Steps taken to verify a working solution:

  • Manually tested sorting/adding/removing enchants. Checked for cases where item is equipped, unequipped, MH vs OH, using same item for OH as MH, etc.
  • Passed all 734 existing tests after the sorting fix, then all 222 existing item tests after the removal fix.

Link to a build that showcases this PR:

https://pob.codes/b/yVV5dQ0qD60

@Wires77 Wires77 added bug: calculation Numerical differences bug Something isn't working and removed bug: calculation Numerical differences labels Nov 17, 2026
@Wires77
Wires77 merged commit 8765916 into PathOfBuildingCommunity:dev Nov 17, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants