mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-03-16 05:55:07 +00:00
fix(Core/Spells): Beacon of Light no longer copies target healing modifiers (#24796)
Co-authored-by: blinkysc <blinkysc@users.noreply.github.com>
This commit is contained in:
@@ -649,6 +649,7 @@ Spell::Spell(Unit* caster, SpellInfo const* info, TriggerCastFlags triggerFlags,
|
||||
m_diminishGroup = DIMINISHING_NONE;
|
||||
m_damage = 0;
|
||||
m_healing = 0;
|
||||
m_damageBeforeTakenMods = 0;
|
||||
m_procAttacker = 0;
|
||||
m_procVictim = 0;
|
||||
m_procEx = 0;
|
||||
@@ -2337,6 +2338,7 @@ void Spell::AddUnitTarget(Unit* target, uint32 effectMask, bool checkIfValid /*=
|
||||
targetInfo.processed = false; // Effects not apply on target
|
||||
targetInfo.alive = target->IsAlive();
|
||||
targetInfo.damage = 0;
|
||||
targetInfo.damageBeforeTakenMods = 0;
|
||||
targetInfo.crit = false;
|
||||
targetInfo.scaleAura = false;
|
||||
if (m_auraScaleMask && targetInfo.effectMask == m_auraScaleMask && m_caster != target)
|
||||
@@ -2712,6 +2714,17 @@ void Spell::DoAllEffectOnTarget(TargetInfo* target)
|
||||
|
||||
HealInfo healInfo(caster, unitTarget, addhealth, m_spellInfo, m_spellInfo->GetSchoolMask());
|
||||
|
||||
// Heal amount before SpellHealingBonusTaken, used by Beacon of Light
|
||||
if (target->damageBeforeTakenMods != 0)
|
||||
{
|
||||
uint32 healBeforeTakenMods = uint32(-target->damageBeforeTakenMods);
|
||||
if (crit)
|
||||
healBeforeTakenMods = Unit::SpellCriticalHealingBonus(caster, m_spellInfo, healBeforeTakenMods, nullptr);
|
||||
healInfo.SetHealBeforeTakenMods(healBeforeTakenMods);
|
||||
}
|
||||
else
|
||||
healInfo.SetHealBeforeTakenMods(addhealth);
|
||||
|
||||
// Set hitMask based on crit
|
||||
if (crit)
|
||||
healInfo.AddHitMask(PROC_HIT_CRITICAL);
|
||||
@@ -8297,6 +8310,7 @@ void Spell::DoAllEffectOnLaunchTarget(TargetInfo& targetInfo, float* multiplier)
|
||||
{
|
||||
m_damage = 0;
|
||||
m_healing = 0;
|
||||
m_damageBeforeTakenMods = 0;
|
||||
|
||||
HandleEffects(unit, nullptr, nullptr, i, SPELL_EFFECT_HANDLE_LAUNCH_TARGET);
|
||||
|
||||
@@ -8322,6 +8336,7 @@ void Spell::DoAllEffectOnLaunchTarget(TargetInfo& targetInfo, float* multiplier)
|
||||
m_damageMultipliers[i] *= multiplier[i];
|
||||
}
|
||||
targetInfo.damage += m_damage;
|
||||
targetInfo.damageBeforeTakenMods += m_damageBeforeTakenMods;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user