Core/Auras: reset periodic aura timers by default. Except when aura comes from triggered spell

This commit is contained in:
ariel-
2016-10-05 03:10:05 -03:00
committed by roc13x
parent 8f4fd78cbf
commit a7a024d1d6
10 changed files with 62 additions and 55 deletions

View File

@@ -748,12 +748,14 @@ class spell_pri_pain_and_suffering_proc : public SpellScriptLoader
Unit* caster = GetCaster();
// Refresh Shadow Word: Pain on target
if (Unit* target = GetHitUnit())
{
if (AuraEffect* aur = target->GetAuraEffect(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_PRIEST, 0x8000, 0, 0, caster->GetGUID()))
{
aur->SetBonusAmount(caster->SpellDamageBonusDone(target, aur->GetSpellInfo(), 0, DOT));
aur->CalculatePeriodic(caster, false, false);
aur->GetBase()->RefreshDuration();
}
}
}
void Register() override

View File

@@ -544,6 +544,7 @@ class spell_warl_everlasting_affliction : public SpellScriptLoader
{
Unit* caster = GetCaster();
if (Unit* target = GetHitUnit())
{
// Refresh corruption on target
if (AuraEffect* aurEff = target->GetAuraEffect(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_WARLOCK, 0x2, 0, 0, caster->GetGUID()))
{
@@ -551,6 +552,7 @@ class spell_warl_everlasting_affliction : public SpellScriptLoader
aurEff->CalculatePeriodic(caster, false, false);
aurEff->GetBase()->RefreshDuration(true);
}
}
}
void Register() override