fix(Core/Spells): Fix Bone Shield double charge consumption (#25439)

Co-authored-by: blinkysc <blinkysc@users.noreply.github.com>
This commit is contained in:
blinkysc 2026-04-12 13:06:49 -05:00 committed by GitHub
parent 0b0842adfe
commit 4983d30d63
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 29 deletions

View file

@ -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';

View file

@ -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);