aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2016-02-13 23:56:11 +0100
committerShauren <shauren.trinity@gmail.com>2016-04-08 18:01:35 +0200
commitda0dec4294509651f8ea0448704f75656f0f6384 (patch)
tree8afc1692b7ce6b87a6c01ebbf919dcde2182385f /src
parentc0202e2365b9f46ff682b4b15b9a2200c10e2f01 (diff)
Merge pull request #16585 from Treeston/3.3.5-flightform
Core/Spells: Disallow druid flight form while shapeshifted (cherry picked from commit 101c3f93035c8e7a571477c30c1c9edc8730c0c5)
Diffstat (limited to 'src')
-rw-r--r--src/server/scripts/Spells/spell_druid.cpp32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/server/scripts/Spells/spell_druid.cpp b/src/server/scripts/Spells/spell_druid.cpp
index f1d9b5e5c7c..4488561589f 100644
--- a/src/server/scripts/Spells/spell_druid.cpp
+++ b/src/server/scripts/Spells/spell_druid.cpp
@@ -1018,6 +1018,37 @@ class spell_dru_swift_flight_passive : public SpellScriptLoader
}
};
+// -33943 - Flight Form
+class spell_dru_flight_form : public SpellScriptLoader
+{
+ public:
+ spell_dru_flight_form() : SpellScriptLoader("spell_dru_flight_form") { }
+
+ class spell_dru_flight_form_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_dru_flight_form_SpellScript);
+
+ SpellCastResult CheckCast()
+ {
+ Unit* caster = GetCaster();
+ if (caster->IsInDisallowedMountForm())
+ return SPELL_FAILED_NOT_SHAPESHIFT;
+
+ return SPELL_CAST_OK;
+ }
+
+ void Register() override
+ {
+ OnCheckCast += SpellCheckCastFn(spell_dru_flight_form_SpellScript::CheckCast);
+ }
+ };
+
+ SpellScript* GetSpellScript() const override
+ {
+ return new spell_dru_flight_form_SpellScript();
+ }
+};
+
// 61391 - Typhoon
class spell_dru_typhoon : public SpellScriptLoader
{
@@ -1195,6 +1226,7 @@ void AddSC_druid_spell_scripts()
new spell_dru_stampede();
new spell_dru_survival_instincts();
new spell_dru_swift_flight_passive();
+ new spell_dru_flight_form();
new spell_dru_typhoon();
new spell_dru_t10_restoration_4p_bonus();
new spell_dru_wild_growth();