mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 17:27:36 +01:00
Core/Spell: Fixed irregular handling of SPELLMOD_DOT
- Applied twice for some dots - Missing for Health Leech Periodic - Missing in a few scripts Closes #17463
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -1091,17 +1091,22 @@ class spell_pri_renew : public SpellScriptLoader
|
||||
|
||||
void HandleApplyEffect(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
if (Unit* caster = GetCaster())
|
||||
{
|
||||
// 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);
|
||||
Unit* caster = GetCaster();
|
||||
if (!caster)
|
||||
return;
|
||||
|
||||
int32 basepoints0 = empoweredRenewAurEff->GetAmount() * GetEffect(EFFECT_0)->GetTotalTicks() * int32(heal) / 100;
|
||||
caster->CastCustomSpell(GetTarget(), SPELL_PRIEST_EMPOWERED_RENEW, &basepoints0, NULL, NULL, true, NULL, aurEff);
|
||||
}
|
||||
// Empowered Renew
|
||||
if (AuraEffect const* empoweredRenewAurEff = caster->GetDummyAuraEffect(SPELLFAMILY_PRIEST, PRIEST_ICON_ID_EMPOWERED_RENEW_TALENT, EFFECT_1))
|
||||
{
|
||||
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);
|
||||
|
||||
heal *= GetSpellInfo()->GetMaxTicks();
|
||||
|
||||
int32 basepoints0 = CalculatePct(heal, empoweredRenewAurEff->GetAmount());
|
||||
caster->CastCustomSpell(SPELL_PRIEST_EMPOWERED_RENEW, SPELLVALUE_BASE_POINT0, basepoints0, GetTarget(), true, nullptr, aurEff);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user