aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts
diff options
context:
space:
mode:
authorariel- <ariel-@users.noreply.github.com>2016-07-16 02:52:32 -0300
committerGitHub <noreply@github.com>2016-07-16 02:52:32 -0300
commit6988407b43ec92af4ffed60cdb8b4bc884487039 (patch)
treea93ba461b49cc9fb9c254c1f1ff027a3703abb86 /src/server/scripts
parentc78a35225096113de2fff7c3c9805a0c9b936e53 (diff)
Core/Spells: Fix Roar of Sacrifice damage part (#17519)
Diffstat (limited to 'src/server/scripts')
-rw-r--r--src/server/scripts/Spells/spell_hunter.cpp47
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 0e952818a2f..a75294ad6e0 100644
--- a/src/server/scripts/Spells/spell_hunter.cpp
+++ b/src/server/scripts/Spells/spell_hunter.cpp
@@ -58,7 +58,8 @@ enum HunterSpells
SPELL_HUNTER_T9_4P_GREATNESS = 68130,
SPELL_HUNTER_VICIOUS_VIPER = 61609,
SPELL_HUNTER_VIPER_ATTACK_SPEED = 60144,
- SPELL_DRAENEI_GIFT_OF_THE_NAARU = 59543
+ SPELL_DRAENEI_GIFT_OF_THE_NAARU = 59543,
+ SPELL_ROAR_OF_SACRIFICE_TRIGGERED = 67481
};
// 13161 - Aspect of the Beast
@@ -847,6 +848,49 @@ class spell_hun_readiness : 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
{
@@ -1132,6 +1176,7 @@ void AddSC_hunter_spell_scripts()
new spell_hun_piercing_shots();
new spell_hun_rapid_recuperation();
new spell_hun_readiness();
+ new spell_hun_roar_of_sacrifice();
new spell_hun_scatter_shot();
new spell_hun_sniper_training();
new spell_hun_tame_beast();