diff options
| author | sarjuuk <junkdump@gmx.net> | 2011-10-06 18:20:57 +0200 |
|---|---|---|
| committer | sarjuuk <junkdump@gmx.net> | 2011-10-06 18:21:24 +0200 |
| commit | 8306c8299e0bed22143da821b4e6d8b1e35e4a72 (patch) | |
| tree | c7335df9ab435fedbb3b20ce2ca496906d7d0d83 /src | |
| parent | fc9926a97e8f39194ab59c3ab7079e7afb3c8b61 (diff) | |
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(); } |
