aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHelloKitty <andrew.blakely@ymail.com>2018-09-15 11:00:20 -0500
committerShauren <shauren.trinity@gmail.com>2018-09-15 18:00:20 +0200
commit0d1eed5dabdc86e4a7ae2d5dfc8f5c17636f69a1 (patch)
tree28677e919703c23329a24fd5a17e3da49d42956a
parent0726812c341b6cc2515273dd47301ac42025328a (diff)
Core/Spells: Include RealPointsPerLevel when determining if aura is negative (#22427)
-rw-r--r--src/server/game/Spells/SpellInfo.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp
index f09592f8ffa..67503414462 100644
--- a/src/server/game/Spells/SpellInfo.cpp
+++ b/src/server/game/Spells/SpellInfo.cpp
@@ -3392,6 +3392,8 @@ bool _isPositiveEffectImpl(SpellInfo const* spellInfo, uint8 effIndex, std::unor
visited.insert({ spellInfo->Id, effIndex });
+ //We need scaling level info for some auras that compute bp 0 or positive but should be debuffs
+ float bpScalePerLevel = spellInfo->Effects[effIndex].RealPointsPerLevel;
int32 bp = spellInfo->Effects[effIndex].CalcValue();
switch (spellInfo->SpellFamilyName)
{
@@ -3627,7 +3629,7 @@ bool _isPositiveEffectImpl(SpellInfo const* spellInfo, uint8 effIndex, std::unor
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