Core/Spell: check aura positivity per effect on spell hit

Port From (https://github.com/TrinityCore/TrinityCore/commit/f31e380499b9ecceca9e86b1ee55eb29c7f87c88)
This commit is contained in:
hondacrx
2020-05-12 20:28:15 -04:00
parent f5ead031f4
commit a528aed6fe
2 changed files with 18 additions and 12 deletions
+3 -4
View File
@@ -2681,11 +2681,11 @@ namespace Game.Entities
++diminish.HitCount;
}
public float ApplyDiminishingToDuration(SpellInfo auraSpellInfo, ref int duration, Unit caster, DiminishingLevels previousLevel)
public bool ApplyDiminishingToDuration(SpellInfo auraSpellInfo, ref int duration, Unit caster, DiminishingLevels previousLevel)
{
DiminishingGroup group = auraSpellInfo.GetDiminishingReturnsGroupForSpell();
if (duration == -1 || group == DiminishingGroup.None)
return 1.0f;
return true;
int limitDuration = auraSpellInfo.GetDiminishingReturnsLimitDuration();
@@ -2704,7 +2704,6 @@ namespace Game.Entities
}
float mod = 1.0f;
switch (group)
{
case DiminishingGroup.Taunt:
@@ -2776,7 +2775,7 @@ namespace Game.Entities
}
duration = (int)(duration * mod);
return mod;
return duration != 0;
}
public void ApplyDiminishingAura(DiminishingGroup group, bool apply)