Scripts/Spells Implement druid talent Matted Fur (#31508)

This commit is contained in:
Cristian Vintila
2026-02-04 00:54:58 +02:00
committed by GitHub
parent 3608bfb6dc
commit 23f54367fa
2 changed files with 29 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
DELETE FROM `spell_script_names` WHERE `ScriptName` IN ('spell_dru_matted_fur_absorb');
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
(385787, 'spell_dru_matted_fur_absorb');
DELETE FROM `spell_proc` WHERE `SpellId` IN (385786);
INSERT INTO `spell_proc` (`SpellId`,`SchoolMask`,`SpellFamilyName`,`SpellFamilyMask0`,`SpellFamilyMask1`,`SpellFamilyMask2`,`SpellFamilyMask3`,`ProcFlags`,`ProcFlags2`,`SpellTypeMask`,`SpellPhaseMask`,`HitMask`,`AttributesMask`,`DisableEffectsMask`,`ProcsPerMinute`,`Chance`,`Cooldown`,`Charges`) VALUES
(385786,0x00,7,0x00000000,0x00040000,0x00000080,0x00000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0,0,0,0); -- Matted Fur

View File

@@ -115,6 +115,7 @@ enum DruidSpells
SPELL_DRUID_MANGLE = 33917,
SPELL_DRUID_MANGLE_TALENT = 231064,
SPELL_DRUID_MASS_ENTANGLEMENT = 102359,
SPELL_DRUID_MATTED_FUR = 385786,
SPELL_DRUID_MOONFIRE_DAMAGE = 164812,
SPELL_DRUID_NATURES_GRACE_TALENT = 450347,
SPELL_DRUID_NEW_MOON = 274281,
@@ -1424,6 +1425,26 @@ class spell_dru_mangle : public SpellScript
}
};
// 385787 - Matted Fur (Absorb)
class spell_dru_matted_fur_absorb : public AuraScript
{
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellEffect({ { SPELL_DRUID_MATTED_FUR, EFFECT_0 } });
}
static void CalculateAmount(AuraScript const&, AuraEffect const* /*aurEff*/, Unit const* victim, int32& baseAbsorb, int32& /*flatMod*/, float& /*pctMod*/)
{
if (AuraEffect const* passiveEffect = victim->GetAuraEffect(SPELL_DRUID_MATTED_FUR, EFFECT_0))
baseAbsorb = static_cast<int32>(victim->GetTotalAttackPowerValue(BASE_ATTACK) * 0.0125f * passiveEffect->GetAmount());
}
void Register() override
{
DoEffectCalcDamageAndHealing += AuraEffectCalcAbsorbFn(spell_dru_matted_fur_absorb::CalculateAmount, EFFECT_0);
}
};
// 8921 - Moonfire
class spell_dru_moonfire : public SpellScript
{
@@ -2667,6 +2688,7 @@ void AddSC_druid_spell_scripts()
RegisterSpellScript(spell_dru_lunar_inspiration);
RegisterSpellScript(spell_dru_luxuriant_soil);
RegisterSpellScript(spell_dru_mangle);
RegisterSpellScript(spell_dru_matted_fur_absorb);
RegisterSpellScript(spell_dru_moonfire);
RegisterSpellScript(spell_dru_natures_grace);
RegisterSpellScript(spell_dru_natures_grace_eclipse);