diff options
Diffstat (limited to 'src/server/scripts')
| -rw-r--r-- | src/server/scripts/Spells/spell_hunter.cpp | 2 | ||||
| -rw-r--r-- | src/server/scripts/Spells/spell_priest.cpp | 23 |
2 files changed, 15 insertions, 10 deletions
diff --git a/src/server/scripts/Spells/spell_hunter.cpp b/src/server/scripts/Spells/spell_hunter.cpp index e18dc838965..31a706f0b1e 100644 --- a/src/server/scripts/Spells/spell_hunter.cpp +++ b/src/server/scripts/Spells/spell_hunter.cpp @@ -225,7 +225,7 @@ class spell_hun_chimera_shot : public SpellScriptLoader // first, calculate damage of basic tick (C&P from AuraEffect::HandlePeriodicDamageAurasTick) basePoint = (aurEff->GetAmount() + aurEff->GetBonusAmount()) * aurEff->GetDonePct(); if (Player* modOwner = caster->GetSpellModOwner()) - modOwner->ApplySpellMod<SPELLMOD_DOT>(aurEff->GetSpellInfo()->Id, basePoint); + modOwner->ApplySpellMod<SPELLMOD_DOT>(aurEff->GetId(), basePoint); basePoint = unitTarget->SpellDamageBonusTaken(caster, aurEff->GetSpellInfo(), basePoint, DOT, aura->GetStackAmount()); // then, multiply to get damage potential diff --git a/src/server/scripts/Spells/spell_priest.cpp b/src/server/scripts/Spells/spell_priest.cpp index 16bf769a9ae..6d59e49e333 100644 --- a/src/server/scripts/Spells/spell_priest.cpp +++ b/src/server/scripts/Spells/spell_priest.cpp @@ -1091,17 +1091,22 @@ class spell_pri_renew : public SpellScriptLoader void HandleApplyEffect(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/) { - if (Unit* caster = GetCaster()) + Unit* caster = GetCaster(); + if (!caster) + return; + + // Empowered Renew + if (AuraEffect const* empoweredRenewAurEff = caster->GetDummyAuraEffect(SPELLFAMILY_PRIEST, PRIEST_ICON_ID_EMPOWERED_RENEW_TALENT, EFFECT_1)) { - // Empowered Renew - if (AuraEffect const* empoweredRenewAurEff = caster->GetDummyAuraEffect(SPELLFAMILY_PRIEST, PRIEST_ICON_ID_EMPOWERED_RENEW_TALENT, EFFECT_1)) - { - uint32 heal = caster->SpellHealingBonusDone(GetTarget(), GetSpellInfo(), GetEffect(EFFECT_0)->GetAmount(), DOT); - heal = GetTarget()->SpellHealingBonusTaken(caster, GetSpellInfo(), heal, DOT); + int32 heal = (aurEff->GetAmount() + aurEff->GetBonusAmount()) * aurEff->GetDonePct(); + if (Player* modOwner = caster->GetSpellModOwner()) + modOwner->ApplySpellMod<SPELLMOD_DOT>(GetId(), heal); + heal = GetTarget()->SpellHealingBonusTaken(caster, GetSpellInfo(), heal, DOT); - int32 basepoints0 = empoweredRenewAurEff->GetAmount() * GetEffect(EFFECT_0)->GetTotalTicks() * int32(heal) / 100; - caster->CastCustomSpell(GetTarget(), SPELL_PRIEST_EMPOWERED_RENEW, &basepoints0, NULL, NULL, true, NULL, aurEff); - } + heal *= GetSpellInfo()->GetMaxTicks(); + + int32 basepoints0 = CalculatePct(heal, empoweredRenewAurEff->GetAmount()); + caster->CastCustomSpell(SPELL_PRIEST_EMPOWERED_RENEW, SPELLVALUE_BASE_POINT0, basepoints0, GetTarget(), true, nullptr, aurEff); } } |
