Scripts/Spells: Fix shaman talent Nature's Guardian proc (#27482)

This commit is contained in:
aquadeus
2021-12-28 21:18:50 +01:00
committed by GitHub
parent 04b06ab35f
commit 108eeea327
2 changed files with 20 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_sha_natures_guardian';
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
(30884, 'spell_sha_natures_guardian');

View File

@@ -1002,6 +1002,22 @@ class spell_sha_liquid_magma_totem : public SpellScript
}
};
// 30884 - Nature's Guardian
class spell_sha_natures_guardian : public AuraScript
{
PrepareAuraScript(spell_sha_natures_guardian);
bool CheckProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
{
return eventInfo.GetActionTarget()->HealthBelowPct(aurEff->GetAmount());
}
void Register() override
{
DoCheckEffectProc += AuraCheckEffectProcFn(spell_sha_natures_guardian::CheckProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL);
}
};
// 210621 - Path of Flames Spread
class spell_sha_path_of_flames_spread : public SpellScript
{
@@ -1392,6 +1408,7 @@ void AddSC_shaman_spell_scripts()
RegisterSpellScript(spell_sha_lightning_bolt);
RegisterSpellScript(spell_sha_lightning_bolt_overload);
RegisterSpellScript(spell_sha_liquid_magma_totem);
RegisterAuraScript(spell_sha_natures_guardian);
RegisterSpellScript(spell_sha_path_of_flames_spread);
RegisterAuraScript(spell_sha_tidal_waves);
RegisterAuraScript(spell_sha_t3_6p_bonus);