diff options
author | ariel- <ariel-@users.noreply.github.com> | 2016-07-16 07:52:32 +0200 |
---|---|---|
committer | joschiwald <joschiwald.trinity@gmail.com> | 2017-02-05 20:35:19 +0100 |
commit | 5f666a2ce6096d5194e504ebd4e72a4e482b7d70 (patch) | |
tree | a365c0f79f8ef204592958835ed2d4d807730c2b /src | |
parent | 9fcaf607060187ecd2f6089424fa2a0a8d9dde84 (diff) |
Core/Spells: Fix Roar of Sacrifice damage part (#17519)
(cherry picked from commit 6988407b43ec92af4ffed60cdb8b4bc884487039)
Rename 2016_99_99_99_world.sql to 2016_07_16_03_world.sql
(cherry picked from commit 4bcb5a058bf735bfc2b32f3900b9a9bb494ae15d)
Diffstat (limited to 'src')
-rw-r--r-- | src/server/scripts/Spells/spell_hunter.cpp | 47 |
1 files changed, 46 insertions, 1 deletions
diff --git a/src/server/scripts/Spells/spell_hunter.cpp b/src/server/scripts/Spells/spell_hunter.cpp index c9ad60275d4..9e8bc2ce197 100644 --- a/src/server/scripts/Spells/spell_hunter.cpp +++ b/src/server/scripts/Spells/spell_hunter.cpp @@ -55,7 +55,8 @@ enum HunterSpells SPELL_HUNTER_SNIPER_TRAINING_BUFF_R1 = 64418, SPELL_HUNTER_STEADY_SHOT_FOCUS = 77443, SPELL_HUNTER_T9_4P_GREATNESS = 68130, - SPELL_HUNTER_THRILL_OF_THE_HUNT = 34720 + SPELL_HUNTER_THRILL_OF_THE_HUNT = 34720, + SPELL_ROAR_OF_SACRIFICE_TRIGGERED = 67481 }; enum MiscSpells @@ -709,6 +710,49 @@ class spell_hun_ready_set_aim : public SpellScriptLoader } }; +// 53480 - Roar of Sacrifice +class spell_hun_roar_of_sacrifice : public SpellScriptLoader +{ + public: + spell_hun_roar_of_sacrifice() : SpellScriptLoader("spell_hun_roar_of_sacrifice") { } + + class spell_hun_roar_of_sacrifice_AuraScript : public AuraScript + { + PrepareAuraScript(spell_hun_roar_of_sacrifice_AuraScript); + + bool Validate(SpellInfo const* /*spellInfo*/) override + { + if (!sSpellMgr->GetSpellInfo(SPELL_ROAR_OF_SACRIFICE_TRIGGERED)) + return false; + return true; + } + + bool CheckProc(ProcEventInfo& eventInfo) + { + return GetCaster() && (eventInfo.GetDamageInfo()->GetSchoolMask() & GetEffect(EFFECT_1)->GetMiscValue()) != 0; + } + + void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo) + { + PreventDefaultAction(); + + uint32 damage = CalculatePct(eventInfo.GetDamageInfo()->GetDamage(), aurEff->GetAmount()); + eventInfo.GetActor()->CastCustomSpell(SPELL_ROAR_OF_SACRIFICE_TRIGGERED, SPELLVALUE_BASE_POINT0, damage, GetCaster(), TRIGGERED_FULL_MASK, nullptr, aurEff); + } + + void Register() override + { + DoCheckProc += AuraCheckProcFn(spell_hun_roar_of_sacrifice_AuraScript::CheckProc); + OnEffectProc += AuraEffectProcFn(spell_hun_roar_of_sacrifice_AuraScript::HandleProc, EFFECT_1, SPELL_AURA_DUMMY); + } + }; + + AuraScript* GetAuraScript() const override + { + return new spell_hun_roar_of_sacrifice_AuraScript(); + } +}; + // 37506 - Scatter Shot class spell_hun_scatter_shot : public SpellScriptLoader { @@ -1073,6 +1117,7 @@ void AddSC_hunter_spell_scripts() new spell_hun_rapid_recuperation(); new spell_hun_readiness(); new spell_hun_ready_set_aim(); + new spell_hun_roar_of_sacrifice(); new spell_hun_scatter_shot(); new spell_hun_sniper_training(); new spell_hun_steady_shot(); |