[core] BLU Triple Attack overwrites Double Attack #7101
Merged
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.
I affirm:
What does this pull request do?
Setting 4 BLU spells with
Double Attack
currently grants bothDouble Attack
andTriple Attack
.Only
Triple Attack
is supposed to be set in this condition. Double Attack can still be obtained independently from a WAR subjob.This PR adds a special condition when the check is performed.
As far as I can tell this is the only case where a trait overwrite a different one, hence the direct change to
blueutils::CalculateTraits
There might be something smarter to be done as this could break if the following query ever returned the traits in a different order.
server/src/map/trait.cpp
Lines 89 to 92 in f1a5d79
Steps to test these changes
Change to BLU 99 with a non WAR subjob
Equip the following spells

Verify only Triple Attack is present
Unequip one of the spells
Verify only Double Attack is present
Repeat first test with a /WAR subjob and verify both Triple Attack and Double Attack are present