fix(DB/SpellProcEvent): Warrior Sword Specialization and Sudden Death (#22042)

This commit is contained in:
Jelle Meeus
2025-09-11 05:14:40 -07:00
committed by GitHub
parent acab88ebc5
commit e1abb7f346
2 changed files with 34 additions and 1 deletions

View File

@@ -0,0 +1,11 @@
--
-- Sword Specialization: Hamstring 0x0002, Rend 0x0020, Sunder Armor 0x4000
UPDATE `spell_proc_event` SET `SpellFamilyMask0`=`SpellFamilyMask0` | (0x0002 | 0x0020 | 0x4000) WHERE `entry`=-12281;
-- Sudden Death: copy FamilyMask from Sword Specialization
DELETE FROM `spell_proc_event` WHERE `entry`=-29723;
INSERT INTO `spell_proc_event` (`entry`, `SchoolMask`, `SpellFamilyName`, `SpellFamilyMask0`, `SpellFamilyMask1`, `SpellFamilyMask2`, `procPhase`) VALUES
(-29723, 0, 4, 2858435686, 4194565, 0, 2|4);
DELETE FROM `spell_script_names` WHERE `spell_id` = -29723 AND `ScriptName` = 'spell_war_sudden_death_aura';
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES(-29723, 'spell_war_sudden_death_aura');

View File

@@ -60,7 +60,8 @@ enum WarriorSpells
SPELL_WARRIOR_VIGILANCE_PROC = 50725,
SPELL_WARRIOR_VIGILANCE_REDIRECT_THREAT = 59665,
SPELL_WARRIOR_WHIRLWIND_MAIN = 50622,
SPELL_WARRIOR_WHIRLWIND_OFF = 44949
SPELL_WARRIOR_WHIRLWIND_OFF = 44949,
SPELL_WARRIOR_EXECUTE_R1 = 5308,
};
enum WarriorSpellIcons
@@ -959,6 +960,26 @@ class spell_warr_heroic_strike : public SpellScript
}
};
class spell_war_sudden_death_aura : public AuraScript
{ PrepareAuraScript(spell_war_sudden_death_aura);
bool AfterCheckProc(ProcEventInfo& eventInfo, bool isTriggeredAtSpellProcEvent)
{
// Check PROC_SPELL_PHASE_FINISH only for Execute
if (eventInfo.GetSpellPhaseMask() != PROC_SPELL_PHASE_FINISH)
return isTriggeredAtSpellProcEvent;
if (Spell const* procSpell = eventInfo.GetProcSpell())
if (procSpell->GetSpellInfo()->GetFirstRankSpell()->Id == SPELL_WARRIOR_EXECUTE_R1)
return isTriggeredAtSpellProcEvent;
return false;
}
void Register() override
{
DoAfterCheckProc += AuraAfterCheckProcFn(spell_war_sudden_death_aura::AfterCheckProc);
}
};
void AddSC_warrior_spell_scripts()
{
RegisterSpellScript(spell_warr_mocking_blow);
@@ -986,4 +1007,5 @@ void AddSC_warrior_spell_scripts()
RegisterSpellScript(spell_warr_vigilance_trigger);
RegisterSpellScript(spell_warr_t3_prot_8p_bonus);
RegisterSpellScript(spell_warr_heroic_strike);
RegisterSpellScript(spell_war_sudden_death_aura);
}