aboutsummaryrefslogtreecommitdiff
path: root/src
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
parentc78a35225096113de2fff7c3c9805a0c9b936e53 (diff)
Core/Spells: Fix Roar of Sacrifice damage part (#17519)
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Spells/SpellMgr.cpp7
-rw-r--r--src/server/scripts/Spells/spell_hunter.cpp47
2 files changed, 53 insertions, 1 deletions
diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp
index 6eb75773770..ed0d95f0a58 100644
--- a/src/server/game/Spells/SpellMgr.cpp
+++ b/src/server/game/Spells/SpellMgr.cpp
@@ -3073,6 +3073,13 @@ void SpellMgr::LoadSpellInfoCorrections()
case 53385: // Divine Storm (Damage)
spellInfo->MaxAffectedTargets = 4;
break;
+ case 53480: // Roar of Sacrifice
+ // missing spell effect 2 data, taken from 4.3.4
+ spellInfo->Effects[EFFECT_1].Effect = SPELL_EFFECT_APPLY_AURA;
+ spellInfo->Effects[EFFECT_1].ApplyAuraName = SPELL_AURA_DUMMY;
+ spellInfo->Effects[EFFECT_1].MiscValue = 127;
+ spellInfo->Effects[EFFECT_1].TargetA = SpellImplicitTargetInfo(TARGET_UNIT_TARGET_ALLY);
+ break;
case 42005: // Bloodboil
case 38296: // Spitfire Totem
case 37676: // Insidious Whisper
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();