diff options
author | Aqua Deus <95978183+aquadeus@users.noreply.github.com> | 2025-04-18 15:03:05 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-04-18 15:03:05 +0200 |
commit | 688fd5b1b87743c4ee7ab93eb255919c9bde9c1d (patch) | |
tree | 0ff4db01ee8f8aed2f772b5d79475c63aaa91115 /src | |
parent | 5b260df4b6dc77cadd20f884e9ef8445bf777dd8 (diff) |
Scripts/Spells: Implement druid talent Mangle (#30763)
Diffstat (limited to 'src')
-rw-r--r-- | src/server/scripts/Spells/spell_druid.cpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/server/scripts/Spells/spell_druid.cpp b/src/server/scripts/Spells/spell_druid.cpp index 25d1039f162..0fbee0dc9fb 100644 --- a/src/server/scripts/Spells/spell_druid.cpp +++ b/src/server/scripts/Spells/spell_druid.cpp @@ -106,6 +106,7 @@ enum DruidSpells SPELL_DRUID_LIFEBLOOM_FINAL_HEAL = 33778, SPELL_DRUID_LUNAR_INSPIRATION_OVERRIDE = 155627, SPELL_DRUID_MANGLE = 33917, + SPELL_DRUID_MANGLE_TALENT = 231064, SPELL_DRUID_MASS_ENTANGLEMENT = 102359, SPELL_DRUID_MOONFIRE_DAMAGE = 164812, SPELL_DRUID_NATURES_GRACE_TALENT = 450347, @@ -1324,6 +1325,32 @@ class spell_dru_luxuriant_soil : public AuraScript } }; +// 33917 - Mangle +class spell_dru_mangle : public SpellScript +{ + bool Validate(SpellInfo const* spellInfo) override + { + return ValidateSpellInfo({ SPELL_DRUID_MANGLE_TALENT }) + && ValidateSpellEffect({ { spellInfo->Id, EFFECT_2 } }); + } + + bool Load() override + { + return GetCaster()->HasAura(SPELL_DRUID_MANGLE_TALENT); + } + + void CalculateDamage(SpellEffectInfo const& /*spellEffectInfo*/, Unit* victim, int32& /*damage*/, int32& /*flatMod*/, float& pctMod) const + { + if (victim->HasAuraState(AURA_STATE_BLEED)) + AddPct(pctMod, GetEffectInfo(EFFECT_2).CalcValue(GetCaster())); + } + + void Register() override + { + CalcDamage += SpellCalcDamageFn(spell_dru_mangle::CalculateDamage); + } +}; + // 8921 - Moonfire class spell_dru_moonfire : public SpellScript { @@ -2356,6 +2383,7 @@ void AddSC_druid_spell_scripts() RegisterSpellScript(spell_dru_lifebloom); RegisterSpellScript(spell_dru_lunar_inspiration); RegisterSpellScript(spell_dru_luxuriant_soil); + RegisterSpellScript(spell_dru_mangle); RegisterSpellScript(spell_dru_moonfire); RegisterSpellScript(spell_dru_natures_grace); RegisterSpellScript(spell_dru_natures_grace_eclipse); |