fix(Scripts/Spells): Death Knight Bone shield charges now have a 2 second delay between uses. (#22340)
This commit is contained in:
parent
d00449dbd8
commit
563ef5d7d9
1 changed files with 10 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue