fix(Core/Spells): Fix Bone Shield double charge consumption (#25439)
Co-authored-by: blinkysc <blinkysc@users.noreply.github.com>
This commit is contained in:
@@ -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';
|
||||||
@@ -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
|
// 51209 - Hungering Cold
|
||||||
class spell_dk_hungering_cold : public AuraScript
|
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_improved_blood_presence_triggered);
|
||||||
RegisterSpellScript(spell_dk_wandering_plague_aura);
|
RegisterSpellScript(spell_dk_wandering_plague_aura);
|
||||||
RegisterSpellScript(spell_dk_rune_of_the_fallen_crusader);
|
RegisterSpellScript(spell_dk_rune_of_the_fallen_crusader);
|
||||||
RegisterSpellScript(spell_dk_bone_shield);
|
|
||||||
RegisterSpellScript(spell_dk_hungering_cold);
|
RegisterSpellScript(spell_dk_hungering_cold);
|
||||||
RegisterSpellScript(spell_dk_blood_caked_blade);
|
RegisterSpellScript(spell_dk_blood_caked_blade);
|
||||||
RegisterSpellScript(spell_dk_dancing_rune_weapon);
|
RegisterSpellScript(spell_dk_dancing_rune_weapon);
|
||||||
|
|||||||
Reference in New Issue
Block a user