diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/server/scripts/Spells/spell_warrior.cpp | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/src/server/scripts/Spells/spell_warrior.cpp b/src/server/scripts/Spells/spell_warrior.cpp index 8453fe9342d..df446261818 100644 --- a/src/server/scripts/Spells/spell_warrior.cpp +++ b/src/server/scripts/Spells/spell_warrior.cpp @@ -69,6 +69,7 @@ enum WarriorSpells SPELL_WARRIOR_MORTAL_WOUNDS = 115804, SPELL_WARRIOR_POWERFUL_ENRAGE = 440277, SPELL_WARRIOR_RALLYING_CRY = 97463, + SPELL_WARRIOR_RECKLESSNESS = 1719, SPELL_WARRIOR_RUMBLING_EARTH = 275339, SPELL_WARRIOR_SHIELD_BLOCK_AURA = 132404, SPELL_WARRIOR_SHIELD_CHARGE_EFFECT = 385953, @@ -1179,6 +1180,39 @@ class spell_warr_t3_prot_8p_bonus : public AuraScript } }; +// 389603 - Unbridled Ferocity +class spell_warr_unbridled_ferocity : public AuraScript +{ + bool Validate(SpellInfo const* spellInfo) override + { + return ValidateSpellInfo({ SPELL_WARRIOR_RECKLESSNESS }) + && ValidateSpellEffect({ { spellInfo->Id, EFFECT_1 } }) + && spellInfo->GetEffect(EFFECT_0).IsAura(SPELL_AURA_DUMMY) + && spellInfo->GetEffect(EFFECT_1).IsAura(SPELL_AURA_DUMMY); + } + + void HandleProc(ProcEventInfo& /*eventInfo*/) const + { + int32 durationMs = GetEffect(EFFECT_1)->GetAmount(); + + GetTarget()->CastSpell(nullptr, SPELL_WARRIOR_RECKLESSNESS, CastSpellExtraArgsInit{ + .TriggerFlags = TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR | TRIGGERED_IGNORE_SPELL_AND_CATEGORY_CD, + .SpellValueOverrides = { { SPELLVALUE_DURATION, durationMs } } + }); + } + + bool CheckProc(ProcEventInfo& /*eventInfo*/) const + { + return roll_chance_i(GetEffect(EFFECT_0)->GetAmount()); + } + + void Register() override + { + DoCheckProc += AuraCheckProcFn(spell_warr_unbridled_ferocity::CheckProc); + OnProc += AuraProcFn(spell_warr_unbridled_ferocity::HandleProc); + } +}; + // 383885 - Vicious Contempt (attached to 23881 - Bloodthirst) // 383885 - Vicious Contempt (attached to 335096 - Bloodbath) class spell_warr_vicious_contempt : public SpellScript @@ -1295,6 +1329,7 @@ void AddSC_warrior_spell_scripts() RegisterSpellScript(spell_warr_titanic_rage); RegisterSpellScript(spell_warr_trauma); RegisterSpellScript(spell_warr_t3_prot_8p_bonus); + RegisterSpellScript(spell_warr_unbridled_ferocity); RegisterSpellScript(spell_warr_vicious_contempt); RegisterSpellScript(spell_warr_victorious_state); RegisterSpellScript(spell_warr_victory_rush); |