Scripts/Spells: Implement druid talent Guardian of Elune (#31541)

This commit is contained in:
Cristian Vintila
2026-02-05 14:43:11 +02:00
committed by GitHub
parent 70e99c6442
commit 6dc3aaa156
2 changed files with 40 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
DELETE FROM `spell_script_names` WHERE `ScriptName` IN ('spell_dru_guardian_of_elune_healing');
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
(22842, 'spell_dru_guardian_of_elune_healing');
DELETE FROM `spell_proc` WHERE `SpellId` IN (155578);
INSERT INTO `spell_proc` (`SpellId`,`SchoolMask`,`SpellFamilyName`,`SpellFamilyMask0`,`SpellFamilyMask1`,`SpellFamilyMask2`,`SpellFamilyMask3`,`ProcFlags`,`ProcFlags2`,`SpellTypeMask`,`SpellPhaseMask`,`HitMask`,`AttributesMask`,`DisableEffectsMask`,`ProcsPerMinute`,`Chance`,`Cooldown`,`Charges`) VALUES
(155578,0x00,7,0x00000000,0x00000040,0x00000000,0x00000000,0x0,0x0,0x0,0x2,0x403,0x0,0x0,0,0,0,0); -- Guardian of Elune
DELETE FROM `spell_proc` WHERE `SpellId` IN (213680);
INSERT INTO `spell_proc` (`SpellId`,`SchoolMask`,`SpellFamilyName`,`SpellFamilyMask0`,`SpellFamilyMask1`,`SpellFamilyMask2`,`SpellFamilyMask3`,`ProcFlags`,`ProcFlags2`,`SpellTypeMask`,`SpellPhaseMask`,`HitMask`,`AttributesMask`,`DisableEffectsMask`,`ProcsPerMinute`,`Chance`,`Cooldown`,`Charges`) VALUES
(213680,0x00,7,0x00000000,0x40000000,0x00004000,0x00000000,0x0,0x0,0x0,0x2,0x0,0x0,0x0,0,0,0,0); -- Guardian of Elune

View File

@@ -98,6 +98,7 @@ enum DruidSpells
SPELL_DRUID_GLYPH_OF_STARS_VISUAL = 114302,
SPELL_DRUID_GORE_PROC = 93622,
SPELL_DRUID_GROWL = 6795,
SPELL_DRUID_GUARDIAN_OF_ELUNE_AURA = 213680,
SPELL_DRUID_HALF_MOON = 274282,
SPELL_DRUID_HALF_MOON_OVERRIDE = 274297,
SPELL_DRUID_IDOL_OF_FERAL_SHADOWS = 34241,
@@ -1138,6 +1139,33 @@ class spell_dru_gore : public AuraScript
}
};
// 213680 - Guardian of Elune
// Triggered by 22842 - Frenzied Regeneration
class spell_dru_guardian_of_elune_healing : public AuraScript
{
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellEffect({ { SPELL_DRUID_GUARDIAN_OF_ELUNE_AURA, EFFECT_1 } });
}
void CalculateAmount(AuraEffect const* /*aurEff*/, int32& amount, bool& canBeRecalculated)
{
canBeRecalculated = false;
Unit* caster = GetCaster();
if (!caster)
return;
if (AuraEffect* guardianOfElune = caster->GetAuraEffect(SPELL_DRUID_GUARDIAN_OF_ELUNE_AURA, EFFECT_1))
AddPct(amount, guardianOfElune->GetAmount());
}
void Register() override
{
DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_dru_guardian_of_elune_healing::CalculateAmount, EFFECT_0, SPELL_AURA_OBS_MOD_HEALTH);
}
};
// 99 - Incapacitating Roar
class spell_dru_incapacitating_roar : public spell_dru_base_transformer
{
@@ -2924,6 +2952,7 @@ void AddSC_druid_spell_scripts()
RegisterSpellScript(spell_dru_germination);
RegisterSpellScript(spell_dru_glyph_of_stars);
RegisterSpellScript(spell_dru_gore);
RegisterSpellScript(spell_dru_guardian_of_elune_healing);
RegisterSpellScript(spell_dru_incapacitating_roar);
RegisterSpellScript(spell_dru_incarnation);
RegisterSpellScript(spell_dru_incarnation_tree_of_life);