aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts
diff options
context:
space:
mode:
authorMatan Shukry <matanshukry@gmail.com>2021-02-17 23:25:10 +0200
committerGitHub <noreply@github.com>2021-02-17 22:25:10 +0100
commit395460608692509d457488595f98c2f84fe2033b (patch)
tree4c1881ff2979967e95d12d0f30683e4025f1cbd8 /src/server/scripts
parent456b5be8e45f5718287a44c1a6b8ba2429051f01 (diff)
Scripts/Spells: Implemented Guardian Druid's Gore spell (#26104)
Diffstat (limited to 'src/server/scripts')
-rw-r--r--src/server/scripts/Spells/spell_druid.cpp34
1 files changed, 33 insertions, 1 deletions
diff --git a/src/server/scripts/Spells/spell_druid.cpp b/src/server/scripts/Spells/spell_druid.cpp
index 49f120cc00c..86ccca984f8 100644
--- a/src/server/scripts/Spells/spell_druid.cpp
+++ b/src/server/scripts/Spells/spell_druid.cpp
@@ -69,7 +69,9 @@ enum DruidSpells
SPELL_DRUID_RESTORATION_T10_2P_BONUS = 70658,
SPELL_DRUID_SUNFIRE_DAMAGE = 164815,
SPELL_DRUID_SURVIVAL_INSTINCTS = 50322,
- SPELL_DRUID_CAT_FORM = 768
+ SPELL_DRUID_CAT_FORM = 768,
+ SPELL_DRUID_GORE_PROC = 93622,
+ SPELL_DRUID_MANGLE = 33917,
};
// 1850 - Dash
@@ -218,6 +220,35 @@ public:
}
};
+// 210706 - Gore
+class spell_dru_gore : public AuraScript
+{
+ PrepareAuraScript(spell_dru_gore);
+
+ bool Validate(SpellInfo const* /*spellInfo*/) override
+ {
+ return ValidateSpellInfo({ SPELL_DRUID_GORE_PROC, SPELL_DRUID_MANGLE });
+ }
+
+ bool CheckEffectProc(AuraEffect const* aurEff, ProcEventInfo& /*eventInfo*/)
+ {
+ return roll_chance_i(aurEff->GetAmount());
+ }
+
+ void HandleProc(AuraEffect* /*aurEff*/, ProcEventInfo& /*procInfo*/)
+ {
+ Unit* owner = GetTarget();
+ owner->CastSpell(owner, SPELL_DRUID_GORE_PROC);
+ owner->GetSpellHistory()->ResetCooldown(SPELL_DRUID_MANGLE, true);
+ }
+
+ void Register() override
+ {
+ DoCheckEffectProc += AuraCheckEffectProcFn(spell_dru_gore::CheckEffectProc, EFFECT_0, SPELL_AURA_DUMMY);
+ OnEffectProc += AuraEffectProcFn(spell_dru_gore::HandleProc, EFFECT_0, SPELL_AURA_DUMMY);
+ }
+};
+
// 34246 - Idol of the Emerald Queen
// 60779 - Idol of Lush Moss
class spell_dru_idol_lifebloom : public SpellScriptLoader
@@ -1515,6 +1546,7 @@ void AddSC_druid_spell_scripts()
new spell_dru_dash();
new spell_dru_flight_form();
new spell_dru_forms_trinket();
+ RegisterAuraScript(spell_dru_gore);
new spell_dru_idol_lifebloom();
new spell_dru_innervate();
new spell_dru_lifebloom();