diff options
| author | Unholychick <lucas__jensen@hotmail.com> | 2015-01-12 19:28:21 +0100 |
|---|---|---|
| committer | Unholychick <lucas__jensen@hotmail.com> | 2015-01-16 23:23:51 +0100 |
| commit | 03a5d6d0c985cae8c1683e4ad8e8bbd6185fd896 (patch) | |
| tree | 53359c61d2450addcdb09cc1f5d20d16a56b6bfe /src/server/scripts | |
| parent | 97d415d1b2a429557f667f9c30e8577ab89e6434 (diff) | |
Core/Spells: Use BonusAmount for periodic damage
Closes #13887
Diffstat (limited to 'src/server/scripts')
| -rw-r--r-- | src/server/scripts/Spells/spell_dk.cpp | 4 | ||||
| -rw-r--r-- | src/server/scripts/Spells/spell_hunter.cpp | 7 | ||||
| -rw-r--r-- | src/server/scripts/Spells/spell_priest.cpp | 4 | ||||
| -rw-r--r-- | src/server/scripts/Spells/spell_warlock.cpp | 4 | ||||
| -rw-r--r-- | src/server/scripts/Spells/spell_warrior.cpp | 2 |
5 files changed, 7 insertions, 14 deletions
diff --git a/src/server/scripts/Spells/spell_dk.cpp b/src/server/scripts/Spells/spell_dk.cpp index 67ce1485a83..cd0052c24bc 100644 --- a/src/server/scripts/Spells/spell_dk.cpp +++ b/src/server/scripts/Spells/spell_dk.cpp @@ -1067,7 +1067,7 @@ class spell_dk_pestilence : public SpellScriptLoader { aurEffNew->SetCritChance(critChance); // Blood Plague can crit if caster has T9. aurEffNew->SetDonePct(donePct); - aurEffNew->SetDamage(caster->SpellDamageBonusDone(hitUnit, aurEffNew->GetSpellInfo(), std::max(aurEffNew->GetAmount(), 0), DOT) * donePct); + aurEffNew->SetBonusAmount(caster->SpellDamageBonusDone(hitUnit, aurEffNew->GetSpellInfo(), 0, DOT)); } } } @@ -1086,7 +1086,7 @@ class spell_dk_pestilence : public SpellScriptLoader if (AuraEffect* aurEffNew = aurNew->GetEffect(EFFECT_0)) { aurEffNew->SetDonePct(donePct); - aurEffNew->SetDamage(caster->SpellDamageBonusDone(hitUnit, aurEffNew->GetSpellInfo(), std::max(aurEffNew->GetAmount(), 0), DOT) * donePct); + aurEffNew->SetBonusAmount(caster->SpellDamageBonusDone(hitUnit, aurEffNew->GetSpellInfo(), 0, DOT)); } } } diff --git a/src/server/scripts/Spells/spell_hunter.cpp b/src/server/scripts/Spells/spell_hunter.cpp index 8a6e191f8a9..3ee337f81d4 100644 --- a/src/server/scripts/Spells/spell_hunter.cpp +++ b/src/server/scripts/Spells/spell_hunter.cpp @@ -209,14 +209,11 @@ class spell_hun_chimera_shot : public SpellScriptLoader { int32 TickCount = aurEff->GetTotalTicks(); spellId = SPELL_HUNTER_CHIMERA_SHOT_SERPENT; - basePoint = aurEff->GetDamage(); + basePoint = (aurEff->GetAmount() + aurEff->GetBonusAmount()) * aurEff->GetDonePct(); ApplyPct(basePoint, TickCount * 40); basePoint = unitTarget->SpellDamageBonusTaken(caster, aura->GetSpellInfo(), basePoint, DOT, aura->GetStackAmount()); - // Recalculate bonus damage on roll. - uint32 damage = std::max(aurEff->GetAmount(), 0); - sScriptMgr->ModifyPeriodicDamageAurasTick(unitTarget, caster, damage); - aurEff->SetDamage(caster->SpellDamageBonusDone(unitTarget, aurEff->GetSpellInfo(), damage, DOT) * aurEff->GetDonePct()); + aurEff->SetBonusAmount(caster->SpellDamageBonusDone(unitTarget, aurEff->GetSpellInfo(), 0, DOT)); } // Viper Sting - Instantly restores mana to you equal to 60% of the total amount drained by your Viper Sting. else if (familyFlag[1] & 0x00000080) diff --git a/src/server/scripts/Spells/spell_priest.cpp b/src/server/scripts/Spells/spell_priest.cpp index 0ead78a2ecd..0914089f1c4 100644 --- a/src/server/scripts/Spells/spell_priest.cpp +++ b/src/server/scripts/Spells/spell_priest.cpp @@ -544,9 +544,7 @@ class spell_pri_pain_and_suffering_proc : public SpellScriptLoader if (Unit* target = GetHitUnit()) if (AuraEffect* aur = target->GetAuraEffect(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_PRIEST, 0x8000, 0, 0, caster->GetGUID())) { - uint32 damage = std::max(aur->GetAmount(), 0); - sScriptMgr->ModifyPeriodicDamageAurasTick(target, caster, damage); - aur->SetDamage(caster->SpellDamageBonusDone(target, aur->GetSpellInfo(), damage, DOT) * aur->GetDonePct()); + aur->SetBonusAmount(caster->SpellDamageBonusDone(target, aur->GetSpellInfo(), 0, DOT)); aur->CalculatePeriodic(caster, false, false); aur->GetBase()->RefreshDuration(); } diff --git a/src/server/scripts/Spells/spell_warlock.cpp b/src/server/scripts/Spells/spell_warlock.cpp index 6105a0d8be2..a2bbfdc246a 100644 --- a/src/server/scripts/Spells/spell_warlock.cpp +++ b/src/server/scripts/Spells/spell_warlock.cpp @@ -411,9 +411,7 @@ class spell_warl_everlasting_affliction : public SpellScriptLoader // Refresh corruption on target if (AuraEffect* aur = target->GetAuraEffect(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_WARLOCK, 0x2, 0, 0, caster->GetGUID())) { - uint32 damage = std::max(aur->GetAmount(), 0); - sScriptMgr->ModifyPeriodicDamageAurasTick(target, caster, damage); - aur->SetDamage(caster->SpellDamageBonusDone(target, aur->GetSpellInfo(), damage, DOT) * aur->GetDonePct()); + aur->SetBonusAmount(caster->SpellDamageBonusDone(target, aur->GetSpellInfo(), 0, DOT)); aur->CalculatePeriodic(caster, false, false); aur->GetBase()->RefreshDuration(true); } diff --git a/src/server/scripts/Spells/spell_warrior.cpp b/src/server/scripts/Spells/spell_warrior.cpp index ea519abebd1..fa2b323e220 100644 --- a/src/server/scripts/Spells/spell_warrior.cpp +++ b/src/server/scripts/Spells/spell_warrior.cpp @@ -275,7 +275,7 @@ class spell_warr_deep_wounds : public SpellScriptLoader // Add remaining ticks to damage done if (AuraEffect const* aurEff = target->GetAuraEffect(SPELL_WARRIOR_DEEP_WOUNDS_PERIODIC, EFFECT_0, caster->GetGUID())) - damage += aurEff->GetDamage() * int32(ticks - aurEff->GetTickNumber()); + damage += (aurEff->GetAmount() + aurEff->GetBonusAmount()) * aurEff->GetDonePct() * int32(ticks - aurEff->GetTickNumber()); damage /= int32(ticks); |
