fix(Scripts/Spells): Death Knight Bone shield charges now have a 2 second delay between uses. (#22340)

This commit is contained in:
Christian M
2025-06-29 15:02:09 -04:00
committed by GitHub
parent d00449dbd8
commit 563ef5d7d9

View File

@@ -530,11 +530,21 @@ 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