diff options
| author | Vincent-Michael <Vincent_Michael@gmx.de> | 2013-07-29 06:25:30 +0200 | 
|---|---|---|
| committer | Vincent-Michael <Vincent_Michael@gmx.de> | 2013-07-29 06:25:30 +0200 | 
| commit | a08b52aa197a31b9821f3f9ef425da6365065907 (patch) | |
| tree | db6252ca36f1d85abcbdf13ff2d95b3e1ed9ee44 | |
| parent | eef0d67bb7f06ec063455fcfb4ae336b6aa8391d (diff) | |
Core/Spells: Fix hunter talent "Improved Serpent Sting"
Closes #10001
| -rw-r--r-- | sql/updates/world/2013_07_29_00_world_spell_script_names_434.sql | 3 | ||||
| -rw-r--r-- | src/server/scripts/Spells/spell_hunter.cpp | 37 | 
2 files changed, 40 insertions, 0 deletions
diff --git a/sql/updates/world/2013_07_29_00_world_spell_script_names_434.sql b/sql/updates/world/2013_07_29_00_world_spell_script_names_434.sql new file mode 100644 index 00000000000..ae2b65ae30c --- /dev/null +++ b/sql/updates/world/2013_07_29_00_world_spell_script_names_434.sql @@ -0,0 +1,3 @@ +DELETE FROM `spell_script_names` WHERE `spell_id`=-19464; +INSERT INTO `spell_script_names`(`spell_id`, `ScriptName`) VALUES +(-19464,'spell_hun_improved_serpent_sting'); diff --git a/src/server/scripts/Spells/spell_hunter.cpp b/src/server/scripts/Spells/spell_hunter.cpp index 3f6b3b5e47e..e2686eab3ac 100644 --- a/src/server/scripts/Spells/spell_hunter.cpp +++ b/src/server/scripts/Spells/spell_hunter.cpp @@ -201,6 +201,42 @@ class spell_hun_improved_mend_pet : public SpellScriptLoader          }  }; +// -19464 Improved Serpent Sting +class spell_hun_improved_serpent_sting : public SpellScriptLoader +{ +    public: +        spell_hun_improved_serpent_sting() : SpellScriptLoader("spell_hun_improved_serpent_sting") { } + +        class spell_hun_improved_serpent_sting_AuraScript : public AuraScript +        { +            PrepareAuraScript(spell_hun_improved_serpent_sting_AuraScript); + +            void HandleEffectCalcSpellMod(AuraEffect const* aurEff, SpellModifier*& spellMod) +            { +                if (!spellMod) +                { +                    spellMod = new SpellModifier(GetAura()); +                    spellMod->op = SpellModOp(aurEff->GetMiscValue()); +                    spellMod->type = SPELLMOD_PCT; +                    spellMod->spellId = GetId(); +                    spellMod->mask = GetSpellInfo()->Effects[aurEff->GetEffIndex()].SpellClassMask; +                } + +                spellMod->value = aurEff->GetAmount(); +            } + +            void Register() OVERRIDE +            { +                DoEffectCalcSpellMod += AuraEffectCalcSpellModFn(spell_hun_improved_serpent_sting_AuraScript::HandleEffectCalcSpellMod, EFFECT_0, SPELL_AURA_DUMMY); +            } +        }; + +        AuraScript* GetAuraScript() const OVERRIDE +        { +            return new spell_hun_improved_serpent_sting_AuraScript(); +        } +}; +  // 53412 - Invigoration  class spell_hun_invigoration : public SpellScriptLoader  { @@ -944,6 +980,7 @@ void AddSC_hunter_spell_scripts()      new spell_hun_disengage();      new spell_hun_fire();      new spell_hun_improved_mend_pet(); +    new spell_hun_improved_serpent_sting();      new spell_hun_invigoration();      new spell_hun_last_stand_pet();      new spell_hun_masters_call();  | 
