fix(Scripts/Spells): Implement Blade Barrier Script (#24154)

Co-authored-by: Ariel Silva <ariel-@users.noreply.github.com>
This commit is contained in:
Gultask
2026-01-11 23:26:41 -03:00
committed by GitHub
parent 6bdc48c7d4
commit db2dafec95
2 changed files with 25 additions and 0 deletions

View File

@@ -0,0 +1,4 @@
-- bb
DELETE FROM `spell_script_names` WHERE `spell_id` = -49182;
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
(-49182, 'spell_dk_blade_barrier');

View File

@@ -2314,6 +2314,26 @@ class spell_dk_army_of_the_dead_passive : public AuraScript
}
};
// -49182 Blade Barrier
class spell_dk_blade_barrier : public AuraScript
{
PrepareAuraScript(spell_dk_blade_barrier);
bool CheckProc(ProcEventInfo& /*eventInfo*/)
{
if (Player* player = GetCaster()->ToPlayer())
if (player->getClass() == CLASS_DEATH_KNIGHT && player->IsBaseRuneSlotsOnCooldown(RUNE_BLOOD))
return true;
return false;
}
void Register() override
{
DoCheckProc += AuraCheckProcFn(spell_dk_blade_barrier::CheckProc);
}
};
void AddSC_deathknight_spell_scripts()
{
RegisterSpellScript(spell_dk_wandering_plague);
@@ -2362,4 +2382,5 @@ void AddSC_deathknight_spell_scripts()
RegisterSpellScript(spell_dk_will_of_the_necropolis);
RegisterSpellScript(spell_dk_ghoul_thrash);
RegisterSpellScript(spell_dk_army_of_the_dead_passive);
RegisterSpellScript(spell_dk_blade_barrier);
}