Core/Spells: fixed Shield Specialization rage amount on reflecting spells
This commit is contained in:
1 parent
7f218a8650
commit
485ede9b53
2 files changed
+30
No files matched your search
@@ -0,0 +1,5 @@
|
||||
UPDATE `spell_proc` SET `HitMask`= 64 | 2048, `ProcFlags`= 0x000002A8 | 0x00020000 WHERE `SpellId`= -12298;
|
||||
|
||||
DELETE FROM `spell_script_names` WHERE `ScriptName`= 'spell_warr_shield_specialization';
|
||||
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
|
||||
(-12298, 'spell_warr_shield_specialization');
|
||||
@@ -1149,6 +1149,30 @@ class spell_warr_thunder_clap : public SpellScriptLoader
|
||||
}
|
||||
};
|
||||
|
||||
class spell_warr_shield_specialization : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_warr_shield_specialization);
|
||||
|
||||
void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
|
||||
{
|
||||
if (eventInfo.GetHitMask() & PROC_HIT_REFLECT)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
Unit* target = GetTarget();
|
||||
if (SpellInfo const* spell = sSpellMgr->GetSpellInfo((GetSpellInfo()->Effects[aurEff->GetEffIndex()].TriggerSpell)))
|
||||
{
|
||||
int32 bp = spell->Effects[EFFECT_0].CalcValue() * 4;
|
||||
target->CastCustomSpell(spell->Id, SPELLVALUE_BASE_POINT0, bp, nullptr, true, nullptr, aurEff);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectProc += AuraEffectProcFn(spell_warr_shield_specialization::HandleProc, EFFECT_1, SPELL_AURA_PROC_TRIGGER_SPELL);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_warrior_spell_scripts()
|
||||
{
|
||||
new spell_warr_bloodthirst();
|
||||
@@ -1168,6 +1192,7 @@ void AddSC_warrior_spell_scripts()
|
||||
new spell_warr_second_wind_proc();
|
||||
new spell_warr_second_wind_trigger();
|
||||
new spell_warr_shattering_throw();
|
||||
RegisterAuraScript(spell_warr_shield_specialization);
|
||||
new spell_warr_slam();
|
||||
new spell_warr_strikes_of_opportunity();
|
||||
new spell_warr_sudden_death();
|
||||
|
||||
Reference in new issue
Block a user