From 4983d30d639c4fdb9c48131a7ff17ccabb7071d6 Mon Sep 17 00:00:00 2001 From: blinkysc <37940565+blinkysc@users.noreply.github.com> Date: Sun, 12 Apr 2026 13:06:49 -0500 Subject: [PATCH] fix(Core/Spells): Fix Bone Shield double charge consumption (#25439) Co-authored-by: blinkysc --- .../rev_1776010695888104892.sql | 2 ++ src/server/scripts/Spells/spell_dk.cpp | 29 ------------------- 2 files changed, 2 insertions(+), 29 deletions(-) create mode 100644 data/sql/updates/pending_db_world/rev_1776010695888104892.sql diff --git a/data/sql/updates/pending_db_world/rev_1776010695888104892.sql b/data/sql/updates/pending_db_world/rev_1776010695888104892.sql new file mode 100644 index 000000000..4885f306d --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1776010695888104892.sql @@ -0,0 +1,2 @@ +-- Remove Bone Shield spell script (double charge consumption bug) +DELETE FROM `spell_script_names` WHERE `spell_id` = 49222 AND `ScriptName` = 'spell_dk_bone_shield'; diff --git a/src/server/scripts/Spells/spell_dk.cpp b/src/server/scripts/Spells/spell_dk.cpp index 228a35642..32b0034f7 100644 --- a/src/server/scripts/Spells/spell_dk.cpp +++ b/src/server/scripts/Spells/spell_dk.cpp @@ -580,34 +580,6 @@ class spell_dk_rune_of_the_fallen_crusader : public SpellScript } }; -// 49222 - Bone Shield -class spell_dk_bone_shield : public AuraScript -{ - PrepareAuraScript(spell_dk_bone_shield); - - uint32 lastChargeUsedTime = 0; - - void HandleProc(ProcEventInfo& eventInfo) - { - PreventDefaultAction(); - uint32 currentTime = getMSTime(); - // Checks for 2 seconds between uses of bone shield charges - if ((currentTime - lastChargeUsedTime) < 2000) - return; - - if (!eventInfo.GetSpellInfo() || !eventInfo.GetSpellInfo()->IsTargetingArea()) - { - DropCharge(); - lastChargeUsedTime = currentTime; - } - } - - void Register() override - { - OnProc += AuraProcFn(spell_dk_bone_shield::HandleProc); - } -}; - // 51209 - Hungering Cold class spell_dk_hungering_cold : public AuraScript { @@ -3031,7 +3003,6 @@ void AddSC_deathknight_spell_scripts() RegisterSpellScript(spell_dk_improved_blood_presence_triggered); RegisterSpellScript(spell_dk_wandering_plague_aura); RegisterSpellScript(spell_dk_rune_of_the_fallen_crusader); - RegisterSpellScript(spell_dk_bone_shield); RegisterSpellScript(spell_dk_hungering_cold); RegisterSpellScript(spell_dk_blood_caked_blade); RegisterSpellScript(spell_dk_dancing_rune_weapon);