diff options
| author | ariel- <ariel-@users.noreply.github.com> | 2018-02-26 22:37:06 -0300 |
|---|---|---|
| committer | Ariel Silva <ariel-@users.noreply.github.com> | 2018-03-09 14:41:28 -0300 |
| commit | 93eda20d5cf6eeb34e1aee1b81469ba6e8fa7f0c (patch) | |
| tree | c6c8e98124c667756f013b8e1ab16f6a9c0159a1 /src/server/scripts | |
| parent | 45c5e1b9d63796d168339a44f63418f220cf2403 (diff) | |
Core/Spells: Fix periodic rolling adding bonuses twice
Calculation is now done in CalculateAmount
Diffstat (limited to 'src/server/scripts')
| -rw-r--r-- | src/server/scripts/Spells/spell_dk.cpp | 3 | ||||
| -rw-r--r-- | src/server/scripts/Spells/spell_druid.cpp | 2 | ||||
| -rw-r--r-- | src/server/scripts/Spells/spell_hunter.cpp | 5 | ||||
| -rw-r--r-- | src/server/scripts/Spells/spell_mage.cpp | 1 | ||||
| -rw-r--r-- | src/server/scripts/Spells/spell_paladin.cpp | 6 | ||||
| -rw-r--r-- | src/server/scripts/Spells/spell_priest.cpp | 3 | ||||
| -rw-r--r-- | src/server/scripts/Spells/spell_shaman.cpp | 6 | ||||
| -rw-r--r-- | src/server/scripts/Spells/spell_warrior.cpp | 3 |
8 files changed, 1 insertions, 28 deletions
diff --git a/src/server/scripts/Spells/spell_dk.cpp b/src/server/scripts/Spells/spell_dk.cpp index deddf88b3dc..9d79f6d2398 100644 --- a/src/server/scripts/Spells/spell_dk.cpp +++ b/src/server/scripts/Spells/spell_dk.cpp @@ -2463,9 +2463,6 @@ class spell_dk_unholy_blight : public SpellScriptLoader ASSERT(spellInfo->GetMaxTicks() > 0); amount /= spellInfo->GetMaxTicks(); - // Add remaining ticks to healing done - amount += target->GetRemainingPeriodicAmount(caster->GetGUID(), SPELL_DK_UNHOLY_BLIGHT_DAMAGE, SPELL_AURA_PERIODIC_DAMAGE); - CastSpellExtraArgs args(aurEff); args.AddSpellBP0(amount); caster->CastSpell(target, SPELL_DK_UNHOLY_BLIGHT_DAMAGE, args); diff --git a/src/server/scripts/Spells/spell_druid.cpp b/src/server/scripts/Spells/spell_druid.cpp index 1a0ffe8318a..61db9b82bc5 100644 --- a/src/server/scripts/Spells/spell_druid.cpp +++ b/src/server/scripts/Spells/spell_druid.cpp @@ -2111,8 +2111,6 @@ class spell_dru_t10_balance_4p_bonus : public SpellScriptLoader ASSERT(spellInfo->GetMaxTicks() > 0); amount /= spellInfo->GetMaxTicks(); - // Add remaining ticks to damage done - amount += target->GetRemainingPeriodicAmount(caster->GetGUID(), SPELL_DRUID_LANGUISH, SPELL_AURA_PERIODIC_DAMAGE); CastSpellExtraArgs args(aurEff); args.AddSpellBP0(amount); diff --git a/src/server/scripts/Spells/spell_hunter.cpp b/src/server/scripts/Spells/spell_hunter.cpp index b27267571d8..69b48fde85d 100644 --- a/src/server/scripts/Spells/spell_hunter.cpp +++ b/src/server/scripts/Spells/spell_hunter.cpp @@ -1091,12 +1091,9 @@ public: if (DamageInfo* dmgInfo = eventInfo.GetDamageInfo()) { SpellInfo const* piercingShots = sSpellMgr->AssertSpellInfo(SPELL_HUNTER_PIERCING_SHOTS); - int32 duration = piercingShots->GetMaxDuration(); - uint32 amplitude = piercingShots->Effects[EFFECT_0].Amplitude; uint32 dmg = dmgInfo->GetDamage(); - uint32 bp = CalculatePct(int32(dmg), aurEff->GetAmount()) / (duration / int32(amplitude)); - bp += target->GetRemainingPeriodicAmount(caster->GetGUID(), SPELL_HUNTER_PIERCING_SHOTS, SPELL_AURA_PERIODIC_DAMAGE); + int32 bp = CalculatePct(int32(dmg), aurEff->GetAmount()) / static_cast<int32>(piercingShots->GetMaxTicks()); CastSpellExtraArgs args(aurEff); args.AddSpellBP0(bp); diff --git a/src/server/scripts/Spells/spell_mage.cpp b/src/server/scripts/Spells/spell_mage.cpp index 0c122bfc685..a8b719afb93 100644 --- a/src/server/scripts/Spells/spell_mage.cpp +++ b/src/server/scripts/Spells/spell_mage.cpp @@ -995,7 +995,6 @@ class spell_mage_ignite : public SpellScriptLoader ASSERT(igniteDot->GetMaxTicks() > 0); int32 amount = int32(CalculatePct(eventInfo.GetDamageInfo()->GetDamage(), pct) / igniteDot->GetMaxTicks()); - amount += eventInfo.GetProcTarget()->GetRemainingPeriodicAmount(eventInfo.GetActor()->GetGUID(), SPELL_MAGE_IGNITE, SPELL_AURA_PERIODIC_DAMAGE); CastSpellExtraArgs args(aurEff); args.AddSpellBP0(amount); diff --git a/src/server/scripts/Spells/spell_paladin.cpp b/src/server/scripts/Spells/spell_paladin.cpp index 928be5a79a6..1eb5ca247a6 100644 --- a/src/server/scripts/Spells/spell_paladin.cpp +++ b/src/server/scripts/Spells/spell_paladin.cpp @@ -1838,8 +1838,6 @@ class spell_pal_righteous_vengeance : public SpellScriptLoader ASSERT(spellInfo->GetMaxTicks() > 0); amount /= spellInfo->GetMaxTicks(); - // Add remaining ticks to damage done - amount += target->GetRemainingPeriodicAmount(caster->GetGUID(), SPELL_PALADIN_RIGHTEOUS_VENGEANCE_DAMAGE, SPELL_AURA_PERIODIC_DAMAGE); CastSpellExtraArgs args(aurEff); args.AddSpellBP0(amount); @@ -2221,8 +2219,6 @@ class spell_pal_sheath_of_light : public SpellScriptLoader ASSERT(spellInfo->GetMaxTicks() > 0); amount /= spellInfo->GetMaxTicks(); - // Add remaining ticks to healing done - amount += target->GetRemainingPeriodicAmount(caster->GetGUID(), SPELL_PALADIN_SHEATH_OF_LIGHT_HEAL, SPELL_AURA_PERIODIC_HEAL); CastSpellExtraArgs args(aurEff); args.AddSpellBP0(amount); @@ -2339,8 +2335,6 @@ class spell_pal_t8_2p_bonus : public SpellScriptLoader ASSERT(spellInfo->GetMaxTicks() > 0); amount /= spellInfo->GetMaxTicks(); - // Add remaining ticks to healing done - amount += target->GetRemainingPeriodicAmount(caster->GetGUID(), SPELL_PALADIN_HOLY_MENDING, SPELL_AURA_PERIODIC_HEAL); CastSpellExtraArgs args(aurEff); args.AddSpellBP0(amount); diff --git a/src/server/scripts/Spells/spell_priest.cpp b/src/server/scripts/Spells/spell_priest.cpp index aa8b5a5f91d..fc9991a55ae 100644 --- a/src/server/scripts/Spells/spell_priest.cpp +++ b/src/server/scripts/Spells/spell_priest.cpp @@ -177,7 +177,6 @@ public: ASSERT(triggerInfo->GetMaxTicks() > 0); bp /= triggerInfo->GetMaxTicks(); - bp += target->GetRemainingPeriodicAmount(target->GetGUID(), triggerSpell, SPELL_AURA_PERIODIC_HEAL); CastSpellExtraArgs args(aurEff); args.AddSpellBP0(bp); @@ -1403,10 +1402,8 @@ class spell_pri_t10_heal_2p_bonus : public SpellScriptLoader ASSERT(spellInfo->GetMaxTicks() > 0); amount /= spellInfo->GetMaxTicks(); - // Add remaining ticks to healing done Unit* caster = eventInfo.GetActor(); Unit* target = eventInfo.GetProcTarget(); - amount += target->GetRemainingPeriodicAmount(caster->GetGUID(), SPELL_PRIEST_BLESSED_HEALING, SPELL_AURA_PERIODIC_HEAL); CastSpellExtraArgs args(aurEff); args.AddSpellBP0(amount); diff --git a/src/server/scripts/Spells/spell_shaman.cpp b/src/server/scripts/Spells/spell_shaman.cpp index a01be4e24f6..e4519b03404 100644 --- a/src/server/scripts/Spells/spell_shaman.cpp +++ b/src/server/scripts/Spells/spell_shaman.cpp @@ -2079,10 +2079,8 @@ class spell_sha_t8_elemental_4p_bonus : public SpellScriptLoader ASSERT(spellInfo->GetMaxTicks() > 0); amount /= spellInfo->GetMaxTicks(); - // Add remaining ticks to damage done Unit* caster = eventInfo.GetActor(); Unit* target = eventInfo.GetProcTarget(); - amount += target->GetRemainingPeriodicAmount(caster->GetGUID(), SPELL_SHAMAN_ELECTRIFIED, SPELL_AURA_PERIODIC_DAMAGE); CastSpellExtraArgs args(aurEff); args.AddSpellBP0(amount); @@ -2130,10 +2128,8 @@ class spell_sha_t9_elemental_4p_bonus : public SpellScriptLoader ASSERT(spellInfo->GetMaxTicks() > 0); amount /= spellInfo->GetMaxTicks(); - // Add remaining ticks to damage done Unit* caster = eventInfo.GetActor(); Unit* target = eventInfo.GetProcTarget(); - amount += target->GetRemainingPeriodicAmount(caster->GetGUID(), SPELL_SHAMAN_LAVA_BURST_BONUS_DAMAGE, SPELL_AURA_PERIODIC_DAMAGE); CastSpellExtraArgs args(aurEff); args.AddSpellBP0(amount); @@ -2226,10 +2222,8 @@ class spell_sha_t10_restoration_4p_bonus : public SpellScriptLoader ASSERT(spellInfo->GetMaxTicks() > 0); amount /= spellInfo->GetMaxTicks(); - // Add remaining ticks to healing done Unit* caster = eventInfo.GetActor(); Unit* target = eventInfo.GetProcTarget(); - amount += target->GetRemainingPeriodicAmount(caster->GetGUID(), SPELL_SHAMAN_CHAINED_HEAL, SPELL_AURA_PERIODIC_HEAL); CastSpellExtraArgs args(aurEff); args.AddSpellBP0(amount); diff --git a/src/server/scripts/Spells/spell_warrior.cpp b/src/server/scripts/Spells/spell_warrior.cpp index bb787d828ac..339b5cb2f42 100644 --- a/src/server/scripts/Spells/spell_warrior.cpp +++ b/src/server/scripts/Spells/spell_warrior.cpp @@ -296,9 +296,6 @@ class spell_warr_deep_wounds : public SpellScriptLoader ASSERT(spellInfo->GetMaxTicks() > 0); damage /= spellInfo->GetMaxTicks(); - // Add remaining ticks to damage done - damage += target->GetRemainingPeriodicAmount(caster->GetGUID(), SPELL_WARRIOR_DEEP_WOUNDS_PERIODIC, SPELL_AURA_PERIODIC_DAMAGE); - CastSpellExtraArgs args(TRIGGERED_FULL_MASK); args.AddSpellBP0(damage); caster->CastSpell(target, SPELL_WARRIOR_DEEP_WOUNDS_PERIODIC, args); |
