diff options
| author | Machiavelli <machiaveltman@gmail.com> | 2011-10-07 00:15:49 -0700 |
|---|---|---|
| committer | Machiavelli <machiaveltman@gmail.com> | 2011-10-07 00:15:49 -0700 |
| commit | 464eed2bba6a9507af14f9d612c391bec7d81214 (patch) | |
| tree | c41cc6d706bcc3726504173926cffe21e1573d4d /src | |
| parent | 2baac877dfbe0f0c36696d0975f4674ff9231a99 (diff) | |
| parent | 8306c8299e0bed22143da821b4e6d8b1e35e4a72 (diff) | |
Merge pull request #3375 from Sarjuuk/tcMaster
Core/Spells: Swift Flight Form speed is set to 310% if a coresponding mount is owned.
Diffstat (limited to 'src')
| -rw-r--r-- | src/server/scripts/Spells/spell_druid.cpp | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/server/scripts/Spells/spell_druid.cpp b/src/server/scripts/Spells/spell_druid.cpp index 30eb1538010..17849027dd4 100644 --- a/src/server/scripts/Spells/spell_druid.cpp +++ b/src/server/scripts/Spells/spell_druid.cpp @@ -295,6 +295,38 @@ class spell_dru_starfall_aoe : public SpellScriptLoader } }; +// 40121 - Swift Flight Form (Passive) +class spell_dru_swift_flight_passive : public SpellScriptLoader +{ + public: + spell_dru_swift_flight_passive() : SpellScriptLoader("spell_dru_swift_flight_passive") { } + + class spell_dru_swift_flight_passive_AuraScript : public AuraScript + { + PrepareAuraScript(spell_dru_swift_flight_passive_AuraScript); + + void CalculateAmount(AuraEffect const* /*aurEff*/, int32 & amount, bool & /*canBeRecalculated*/) + { + Unit* caster = GetCaster(); + if (!caster || !caster->ToPlayer()) + return; + + if (caster->ToPlayer()->Has310Flyer(false)) + amount = 310; + } + + void Register() + { + DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_dru_swift_flight_passive_AuraScript::CalculateAmount, EFFECT_1, SPELL_AURA_MOD_INCREASE_VEHICLE_FLIGHT_SPEED); + } + }; + + AuraScript* GetAuraScript() const + { + return new spell_dru_swift_flight_passive_AuraScript(); + } +}; + void AddSC_druid_spell_scripts() { new spell_dru_glyph_of_starfire(); @@ -303,4 +335,5 @@ void AddSC_druid_spell_scripts() new spell_dru_savage_defense(); new spell_dru_t10_restoration_4p_bonus(); new spell_dru_starfall_aoe(); + new spell_dru_swift_flight_passive(); } |
