mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-21 17:54:48 +01:00
Core/Spells: Fix periodic rolling adding bonuses twice
Calculation is now done in CalculateAmount
(cherry picked from commit 93eda20d5c)
This commit is contained in:
@@ -1563,8 +1563,6 @@ public:
|
||||
|
||||
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.AddSpellMod(SPELLVALUE_BASE_POINT0, amount);
|
||||
|
||||
@@ -657,7 +657,6 @@ class spell_mage_ignite : public AuraScript
|
||||
|
||||
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.AddSpellMod(SPELLVALUE_BASE_POINT0, amount);
|
||||
|
||||
@@ -1035,8 +1035,6 @@ class spell_pal_t8_2p_bonus : public SpellScriptLoader
|
||||
|
||||
ASSERT(spellInfo->GetMaxTicks() > 0);
|
||||
amount /= spellInfo->GetMaxTicks();
|
||||
// Add remaining ticks to damage done
|
||||
amount += target->GetRemainingPeriodicAmount(caster->GetGUID(), SPELL_PALADIN_HOLY_MENDING, SPELL_AURA_PERIODIC_HEAL);
|
||||
|
||||
CastSpellExtraArgs args(aurEff);
|
||||
args.AddSpellBP0(amount);
|
||||
|
||||
@@ -1078,10 +1078,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);
|
||||
|
||||
@@ -1238,10 +1238,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);
|
||||
@@ -1289,10 +1287,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);
|
||||
@@ -1385,10 +1381,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);
|
||||
|
||||
@@ -733,10 +733,8 @@ public:
|
||||
void HandleProc(AuraEffect* aurEff, ProcEventInfo& eventInfo)
|
||||
{
|
||||
Unit* target = eventInfo.GetActionTarget();
|
||||
//Get the Remaining Damage from the aura (if exist)
|
||||
int32 remainingDamage = target->GetRemainingPeriodicAmount(target->GetGUID(), SPELL_WARRIOR_TRAUMA_EFFECT, SPELL_AURA_PERIODIC_DAMAGE);
|
||||
//Get 25% of damage from the spell casted (Slam & Whirlwind) plus Remaining Damage from Aura
|
||||
int32 damage = int32(CalculatePct(eventInfo.GetDamageInfo()->GetDamage(), aurEff->GetAmount()) / sSpellMgr->AssertSpellInfo(SPELL_WARRIOR_TRAUMA_EFFECT, GetCastDifficulty())->GetMaxTicks()) + remainingDamage;
|
||||
int32 damage = int32(CalculatePct(eventInfo.GetDamageInfo()->GetDamage(), aurEff->GetAmount()) / sSpellMgr->AssertSpellInfo(SPELL_WARRIOR_TRAUMA_EFFECT, GetCastDifficulty())->GetMaxTicks());
|
||||
CastSpellExtraArgs args(TRIGGERED_FULL_MASK);
|
||||
args.AddSpellMod(SPELLVALUE_BASE_POINT0, damage);
|
||||
GetCaster()->CastSpell(target, SPELL_WARRIOR_TRAUMA_EFFECT, args);
|
||||
|
||||
Reference in New Issue
Block a user