Name the weapon set that has points available - #2418
Open
lucaskarsten wants to merge 1 commit into
Open
Conversation
The warning for unspent weapon set points was formatted with "Weapon set 2" hardcoded, so a character with fewer points allocated in set 1 was told the spare points belonged to set 2. The count was already correct, as it is the difference between the two sets: a node allocated in both sets is only paid for once, which is why the smaller set is the one with room to grow, and the same reason EstimatePlayerProgress subtracts the minimum of the two from the normal passive count.
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 #2119.
Description of the problem being solved:
EstimatePlayerProgressbuilds the unspent weapon set points warning with the set number written into the format string (Modules/Build.lua:1051):The count is fine, since it is the difference between the two sets, but the set is always reported as 2. A character with fewer points allocated in set 1 is told the spare points belong to set 2.
The set with fewer allocated points is the one with room, because a node allocated in both sets is only paid for once — the same reasoning behind
normalPassives = PointsUsed - m_min(weaponSet1Used, weaponSet2Used)a few lines above.Steps taken to verify a working solution:
spec/System/TestWeaponSetPoints_spec.luacovering set 1 behind, set 2 behind, and both equal (no warning). Againstdevit reports 2 successes / 1 failure; with the fix, 3 successes / 0 failures.