aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/updates/world/master/2021_12_28_01_world_shaman_natures_guardian.sql3
-rw-r--r--src/server/scripts/Spells/spell_shaman.cpp17
2 files changed, 20 insertions, 0 deletions
diff --git a/sql/updates/world/master/2021_12_28_01_world_shaman_natures_guardian.sql b/sql/updates/world/master/2021_12_28_01_world_shaman_natures_guardian.sql
new file mode 100644
index 00000000000..6e40c3bd439
--- /dev/null
+++ b/sql/updates/world/master/2021_12_28_01_world_shaman_natures_guardian.sql
@@ -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');
diff --git a/src/server/scripts/Spells/spell_shaman.cpp b/src/server/scripts/Spells/spell_shaman.cpp
index 77d2b665bb4..830c275bfd4 100644
--- a/src/server/scripts/Spells/spell_shaman.cpp
+++ b/src/server/scripts/Spells/spell_shaman.cpp
@@ -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);