diff options
author | HelloKitty <andrew.blakely@ymail.com> | 2018-09-15 11:00:20 -0500 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2021-10-31 01:39:10 +0200 |
commit | c10ea614918ccbb6e0601117fd024a6e8c91a0b2 (patch) | |
tree | 4dd1cc6ddc45cb14c08d20eef344c51d27a145c3 | |
parent | c5f5d53e98a19f45a647115a722a94f124880939 (diff) |
Core/Spells: Include RealPointsPerLevel when determining if aura is negative (#22427)
(cherry picked from commit 0d1eed5dabdc86e4a7ae2d5dfc8f5c17636f69a1)
-rw-r--r-- | src/server/game/Spells/SpellInfo.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp index 455ab86e36e..4d30c0e7958 100644 --- a/src/server/game/Spells/SpellInfo.cpp +++ b/src/server/game/Spells/SpellInfo.cpp @@ -4342,6 +4342,8 @@ bool _isPositiveEffectImpl(SpellInfo const* spellInfo, SpellEffectInfo const& ef visited.insert({ spellInfo, effect.EffectIndex }); + //We need scaling level info for some auras that compute bp 0 or positive but should be debuffs + float bpScalePerLevel = effect.RealPointsPerLevel; int32 bp = effect.CalcValue(); switch (spellInfo->SpellFamilyName) { @@ -4549,7 +4551,7 @@ bool _isPositiveEffectImpl(SpellInfo const* spellInfo, SpellEffectInfo const& ef case SPELL_AURA_MOD_INCREASE_HEALTH_PERCENT: case SPELL_AURA_MOD_TOTAL_STAT_PERCENTAGE: case SPELL_AURA_MOD_INCREASE_SWIM_SPEED: - if (bp < 0) + if (bp < 0 || bpScalePerLevel < 0) //TODO: What if both are 0? Should it be a buff or debuff? return false; break; case SPELL_AURA_MOD_ATTACKSPEED: // some buffs have negative bp, check both target and bp |