Skip to content

Preserve main skill selection across character reimports - #10203

Open
mcagnion wants to merge 1 commit into
PathOfBuildingCommunity:devfrom
mcagnion:bugfix/10199-preserve-main-skill-reimport
Open

Preserve main skill selection across character reimports#10203
mcagnion wants to merge 1 commit into
PathOfBuildingCommunity:devfrom
mcagnion:bugfix/10199-preserve-main-skill-reimport

Conversation

@mcagnion

@mcagnion mcagnion commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Fixes #10199.

Description of the problem being solved:

When a character reimport changes the composition of the previous main socket group, that group no longer matches the exact restoration key. If the rebuilt groups have different indexes, mainSocketGroup can retain its previous index and select an unrelated skill. This can make DPS-based item sorting appear alphabetical because candidates are evaluated against the wrong main skill; this PR does not change item sorting itself.

The exact restoration path remains unchanged for groups that still match. Otherwise, the previous main group is located by its source skill, preferring its previous equipment slot. Its selected granted active effect is then restored after the new skill list is built, including effects granted by supports. If the source skill no longer exists, the existing main-group guess is used.

If multiple changed groups in the same equipment slot contain the same source skill, this fallback cannot unambiguously identify the previous group and selects the first match. Exact group matches remain preferred.

Steps taken to verify a working solution:

  • Added regression coverage for changed supports, reordered groups, the same source skill in another slot, and removal of the previous main skill.
  • Added regression coverage for preserving a support-granted active skill using Prismatic Burst Support.
  • Ran the complete automated test suite successfully.
  • Manual UI reproduction was not performed because the issue only provides a saved build, not the account and character context needed to replay the same reimport. The deterministic system tests exercise the affected ImportItemsAndSkills restoration path directly.
  • Screenshots are not applicable because there is no visual change.

Link to a build that showcases this PR:

The build code is available in #10199, but a saved build alone cannot demonstrate this reimport-only change.

Before screenshot:

Not applicable; there is no visual change.

After screenshot:

Not applicable; there is no visual change.

Keep exact state matching for unchanged groups. When a group's gems change, relocate it by source skill and preferred slot, then restore the selected active effect after its skill list is rebuilt. Use the existing group guess only when the source skill disappears.

Addresses issue 10199.
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.

Item Import and Item Sorting broken after I imported a character with unique equipment in all slots.

1 participant