mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Spells: Include RealPointsPerLevel when determining if aura is negative (#22427)
(cherry picked from commit 0d1eed5dab)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user