mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Scripts/Spells: Fixed Improved Death Strike value calculation for blood specialization
This commit is contained in:
@@ -923,6 +923,35 @@ class spell_dk_icy_talons_buff : public SpellScript
|
||||
}
|
||||
};
|
||||
|
||||
// 374277 - Improved Death Strike
|
||||
class spell_dk_improved_death_strike : public AuraScript
|
||||
{
|
||||
bool Validate(SpellInfo const* spellInfo) override
|
||||
{
|
||||
return ValidateSpellInfo({ SPELL_DK_BLOOD })
|
||||
&& ValidateSpellEffect({ { spellInfo->Id, EFFECT_4 } });
|
||||
}
|
||||
|
||||
void CalcHealIncrease(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/) const
|
||||
{
|
||||
if (GetUnitOwner()->HasAura(SPELL_DK_BLOOD))
|
||||
amount = GetEffectInfo(EFFECT_3).CalcValue(GetCaster());
|
||||
}
|
||||
|
||||
void CalcPowerCostReduction(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/) const
|
||||
{
|
||||
if (GetUnitOwner()->HasAura(SPELL_DK_BLOOD))
|
||||
amount = GetEffectInfo(EFFECT_4).CalcValue(GetCaster());
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_dk_improved_death_strike::CalcHealIncrease, EFFECT_0, SPELL_AURA_ADD_PCT_MODIFIER);
|
||||
DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_dk_improved_death_strike::CalcHealIncrease, EFFECT_1, SPELL_AURA_ADD_PCT_MODIFIER);
|
||||
DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_dk_improved_death_strike::CalcPowerCostReduction, EFFECT_2, SPELL_AURA_ADD_FLAT_MODIFIER);
|
||||
}
|
||||
};
|
||||
|
||||
// 206940 - Mark of Blood
|
||||
class spell_dk_mark_of_blood : public AuraScript
|
||||
{
|
||||
@@ -1411,6 +1440,7 @@ void AddSC_deathknight_spell_scripts()
|
||||
RegisterSpellScript(spell_dk_ice_prison);
|
||||
RegisterSpellScript(spell_dk_icy_talons);
|
||||
RegisterSpellScript(spell_dk_icy_talons_buff);
|
||||
RegisterSpellScript(spell_dk_improved_death_strike);
|
||||
RegisterSpellScript(spell_dk_mark_of_blood);
|
||||
RegisterSpellScript(spell_dk_necrosis);
|
||||
RegisterSpellScript(spell_dk_obliteration);
|
||||
|
||||
Reference in New Issue
Block a user