Preserve main skill selection across character reimports - #10203
Open
mcagnion wants to merge 1 commit into
Open
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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,
mainSocketGroupcan 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:
ImportItemsAndSkillsrestoration path directly.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.