mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-13 00:42:40 +00:00
Fix swing timer not resetting on resisted/missed spells
The swing timer now correctly resets when your spell is resisted or misses. Previously, a resisted Moonfire (for example) would not reset the swing timer bar even though the server had already reset your actual swing — causing the bar to desync until the next auto-attack.
This commit is contained in:
+8
-7
@@ -1273,6 +1273,14 @@ if hasNampower then
|
||||
end
|
||||
end
|
||||
|
||||
-- Fire registered SPELL_GO_SELF hooks BEFORE miss guard
|
||||
-- (Swingtimer needs to see ALL casts, even misses, for swing reset)
|
||||
if event == "SPELL_GO_SELF" and pfUI.libdebuff_spell_go_hooks then
|
||||
for _, fn in pairs(pfUI.libdebuff_spell_go_hooks) do
|
||||
fn(spellId, arg1, arg2, arg3, arg4, arg5, arg6, arg7)
|
||||
end
|
||||
end
|
||||
|
||||
if numMissed > 0 or numHit == 0 then return end
|
||||
|
||||
local spellName = GetSpellRecField and GetSpellRecField(spellId, "name")
|
||||
@@ -1317,13 +1325,6 @@ if hasNampower then
|
||||
end
|
||||
end
|
||||
|
||||
-- Fire registered SPELL_GO_SELF hooks (only for own casts)
|
||||
if event == "SPELL_GO_SELF" and pfUI.libdebuff_spell_go_hooks then
|
||||
for _, fn in pairs(pfUI.libdebuff_spell_go_hooks) do
|
||||
fn(spellId, arg1, arg2, arg3, arg4, arg5, arg6, arg7)
|
||||
end
|
||||
end
|
||||
|
||||
-- Fire registered SPELL_GO_OTHER hooks
|
||||
if event == "SPELL_GO_OTHER" and pfUI.libdebuff_spell_go_other_hooks then
|
||||
for _, fn in pairs(pfUI.libdebuff_spell_go_other_hooks) do
|
||||
|
||||
Reference in New Issue
Block a user