mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2025-11-29 17:38:24 +08:00
fix(Scripts/Spells): Death Knight Bone shield charges now have a 2 second delay between uses. (#22340)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user