mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Scripts/Spells: Implement Unbridled Ferocity (#31067)
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user