Fix (Core/Scripts): Warrior T3 8P Bonus Fix (#10561)
* Fix (Core/Scripts): Warrior T3 8P Bonus Fix * Update spell_warrior.cpp * Update spell_warrior.cpp
This commit is contained in:
parent
7bed30a52d
commit
336967b324
2 changed files with 37 additions and 0 deletions
|
|
@ -0,0 +1,4 @@
|
|||
INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1644160153962444055');
|
||||
DELETE FROM `spell_script_names` WHERE `spell_id`=28845;
|
||||
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
|
||||
(28845, 'spell_warr_t3_prot_8p_bonus');
|
||||
|
|
@ -795,6 +795,38 @@ class spell_warr_glyph_of_sunder_armor : public AuraScript
|
|||
}
|
||||
};
|
||||
|
||||
// Spell 28845 - Cheat Death
|
||||
|
||||
enum CheatDeath
|
||||
{
|
||||
SPELL_CHEAT_DEATH_TRIGGER = 28846
|
||||
};
|
||||
|
||||
class spell_warr_t3_prot_8p_bonus : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_warr_t3_prot_8p_bonus);
|
||||
|
||||
bool CheckProc(ProcEventInfo& eventInfo)
|
||||
{
|
||||
return eventInfo.GetActionTarget() && eventInfo.GetActionTarget()->GetHealthPct() <= 20.0f;
|
||||
}
|
||||
|
||||
void HandleEffectProc(AuraEffect const* /*aurEff*/, ProcEventInfo& eventInfo)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
if (Unit* target = eventInfo.GetActionTarget())
|
||||
{
|
||||
target->CastSpell(target, SPELL_CHEAT_DEATH_TRIGGER, true);
|
||||
}
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
DoCheckProc += AuraCheckProcFn(spell_warr_t3_prot_8p_bonus::CheckProc);
|
||||
OnEffectProc += AuraEffectProcFn(spell_warr_t3_prot_8p_bonus::HandleEffectProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL);
|
||||
}
|
||||
};
|
||||
|
||||
// 20230 - Retaliation
|
||||
class spell_warr_retaliation : public AuraScript
|
||||
{
|
||||
|
|
@ -854,4 +886,5 @@ void AddSC_warrior_spell_scripts()
|
|||
RegisterSpellScript(spell_warr_sweeping_strikes);
|
||||
RegisterSpellScript(spell_warr_vigilance);
|
||||
RegisterSpellScript(spell_warr_vigilance_trigger);
|
||||
RegisterSpellScript(spell_warr_t3_prot_8p_bonus);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue