fix: preserve sign when scaling absorb aura amount #58
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.
scale a -1 absorb with <1.0f and the result will be 0.
a negative value (-1) is handled as an infinite absorb, so scaling should preserve the sign
to illustrate the bug: https://cpp.sh/?source=%2F%2F+Example+program%0D%0A%23include+%3Ciostream%3E%0D%0A%23include+%3Cstring%3E%0D%0A%0D%0Aint+main()%0D%0A%7B%0D%0A++++int32_t+absorb+%3D+-1%3B%0D%0A++++float+scale+%3D+0.7%3B%0D%0A++++%0D%0A++++int32_t+scaled_abs+%3D+absorb+*+scale%3B%0D%0A++++std%3A%3Acout+%3C%3C+scaled_abs+%3C%3C+std%3A%3Aendl%3B%0D%0A++++%0D%0A++++scaled_abs+%3D+static_cast%3Cint32_t%3E(std%3A%3Afloor(absorb+*+scale))%3B%0D%0A++++%0D%0A++++std%3A%3Acout+%3C%3C+scaled_abs+%3C%3C+std%3A%3Aendl%3B%0D%0A%0D%0A++++return+0%3B%0D%0A%7D
How to test:
Enter a Mythic Raid:
revive + reset debuff