mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Spells: Fix Roar of Sacrifice damage part (#17519)
(cherry picked from commit6988407b43) Rename 2016_99_99_99_world.sql to 2016_07_16_03_world.sql (cherry picked from commit4bcb5a058b)
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
--
|
||||
DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_hun_roar_of_sacrifice';
|
||||
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
|
||||
(53480, 'spell_hun_roar_of_sacrifice');
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user