Repository navigation
Conversation
mcagnion
force-pushed
the
bugfix/10199-preserve-main-skill-reimport
branch
2 times, most recently
from
August 12, 2026 22:02
9068e35 to
5d5ad59
Compare
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.
mcagnion
force-pushed
the
bugfix/10199-preserve-main-skill-reimport
branch
from
August 22, 2026 07:03
5d5ad59 to
e6cf234
Compare
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.
Description of the problem being solved:
After a character reimport with "Delete skills" ticked, the build's main skill can switch to an unrelated skill. This happens when the reimport changes the main socket group, for example a support gem added or removed: the group no longer matches its saved key, so
mainSocketGroupkeeps its old index. If the group order also changed, that index now points at another group. Calculations then use the wrong skill; one visible effect is DPS-based item sorting that looks alphabetical (item sorting itself is unchanged here).When the exact match fails, the previous main group is now found by its source skill, preferring its previous equipment slot, and its selected active effect is restored, including effects granted by supports. Groups that still match exactly are restored as before. If the source skill is gone, the existing main-group guess is used. If several changed groups in the same slot hold the same source skill, the first one is selected.
Steps taken to verify a working solution:
Found while investigating #10199; the case reported there is not fixed by this PR.