mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-18 00:18:43 +01:00
Core/Spells: corrected Light of Dawn calculations
This commit is contained in:
@@ -5442,6 +5442,12 @@ void SpellMgr::LoadSpellInfoCorrections()
|
||||
spellInfo->AttributesEx3 |= SPELL_ATTR3_NO_DONE_BONUS;
|
||||
});
|
||||
|
||||
// Light of Dawn
|
||||
ApplySpellFix({ 85222 }, [](SpellInfo* spellInfo)
|
||||
{
|
||||
spellInfo->DmgClass = SPELL_DAMAGE_CLASS_MAGIC;
|
||||
});
|
||||
|
||||
for (uint32 i = 0; i < GetSpellInfoStoreSize(); ++i)
|
||||
{
|
||||
SpellInfo* spellInfo = mSpellInfoMap[i];
|
||||
|
||||
@@ -1914,21 +1914,21 @@ class spell_pal_light_of_dawn: public SpellScript
|
||||
if (!caster)
|
||||
return;
|
||||
|
||||
int32 heal = GetSpellInfo()->Effects[EFFECT_1].CalcValue(caster, nullptr, GetHitUnit());
|
||||
if (Player* modOwner = caster->GetSpellModOwner())
|
||||
modOwner->ApplySpellMod(GetSpellInfo()->Id, SPELLMOD_DAMAGE, heal);
|
||||
|
||||
heal += caster->SpellHealingBonusDone(GetHitUnit(), GetSpellInfo(), heal, HEAL, EFFECT_1);
|
||||
int32 heal = GetHitHeal();
|
||||
heal += heal * caster->GetPower(POWER_HOLY_POWER);
|
||||
|
||||
// For some reason there is a 2nd effect that is being calculated correctly so we will use its data
|
||||
PreventHitEffect(EFFECT_1);
|
||||
SetHitHeal(heal);
|
||||
}
|
||||
|
||||
void BlockHeal(SpellEffIndex effIndex)
|
||||
{
|
||||
PreventHitDefaultEffect(effIndex);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectHitTarget += SpellEffectFn(spell_pal_light_of_dawn::HandleHeal, EFFECT_0, SPELL_EFFECT_HEAL);
|
||||
OnEffectLaunchTarget += SpellEffectFn(spell_pal_light_of_dawn::BlockHeal, EFFECT_1, SPELL_EFFECT_HEAL);
|
||||
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_pal_light_of_dawn::FilterTargets, EFFECT_0, TARGET_UNIT_CONE_ALLY);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user