Repository navigation
Conversation
Removing an item-granted skill group shifted the groups after it, so the main skill index pointed at the next skill. That happened when the item was really swapped, and with the preview change also in item comparisons.
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 #10427.
Description of the problem being solved:
Item comparisons (the hover tooltip and Sort by in the item lists) didn't count skills granted by the item you're looking at. Socket groups for granted skills were only created or removed in the main calculation, so a candidate like United in Dream was compared without its Envy, and the DPS went up after you equipped it. It also works the other way: an equipped item's granted skill stayed in the comparison when the candidate replaced that item, which is #8093. The tests cover that case too, so I think this fixes #8093 as well, but I haven't checked it against the build from that issue.
For item previews CalcSetup now works out the granted skill groups on copies of the socket groups, so the preview gets the right skills and the real skill list, the selected main skill and the gems are left alone. Triggered granted skills have their cost cleared on a copy of the skill data during a preview, not on the shared data.
A disabled granted skill group stays disabled in the preview.
While doing this I found that removing a granted skill group shifted the groups after it, so the main skill index pointed at the next skill. That already happened on dev when you really swapped the item (with United in Dream first in the list and Ethereal Knives selected, swapping to a plain Cutlass made Fireball the main skill), and with this change it would also show up in the comparisons. The main group is now looked up again after granted groups are removed, in both cases.
Steps taken to verify a working solution: