Core/Spells: Include RealPointsPerLevel when determining if aura is negative.
Port From (https://github.com/TrinityCore/TrinityCore/commit/c10ea614918ccbb6e0601117fd024a6e8c91a0b2)
This commit is contained in:
@@ -3282,6 +3282,8 @@ namespace Game.Spells
|
|||||||
|
|
||||||
visited.Add(Tuple.Create(spellInfo, effect.EffectIndex));
|
visited.Add(Tuple.Create(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;
|
||||||
int bp = effect.CalcValue();
|
int bp = effect.CalcValue();
|
||||||
switch (spellInfo.SpellFamilyName)
|
switch (spellInfo.SpellFamilyName)
|
||||||
{
|
{
|
||||||
@@ -3490,7 +3492,7 @@ namespace Game.Spells
|
|||||||
case AuraType.ModIncreaseHealthPercent:
|
case AuraType.ModIncreaseHealthPercent:
|
||||||
case AuraType.ModTotalStatPercentage:
|
case AuraType.ModTotalStatPercentage:
|
||||||
case AuraType.ModIncreaseSwimSpeed:
|
case AuraType.ModIncreaseSwimSpeed:
|
||||||
if (bp < 0)
|
if (bp < 0 || bpScalePerLevel < 0) //TODO: What if both are 0? Should it be a buff or debuff?
|
||||||
return false;
|
return false;
|
||||||
break;
|
break;
|
||||||
case AuraType.ModAttackspeed: // some buffs have negative bp, check both target and bp
|
case AuraType.ModAttackspeed: // some buffs have negative bp, check both target and bp
|
||||||
|
|||||||
Reference in New Issue
Block a user