From d3ee08c1702c1a159351b705fafbe62520e596d9 Mon Sep 17 00:00:00 2001 From: Meow <30401521+me0wg4ming@users.noreply.github.com> Date: Mon, 30 Mar 2026 03:19:11 +0200 Subject: [PATCH] fix for castbar not resetting if timer duration is the same as before. --- libs/libdebuff.lua | 8 ++++++-- modules/castbar.lua | 1 + 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/libs/libdebuff.lua b/libs/libdebuff.lua index 823760c6..b8e89893 100644 --- a/libs/libdebuff.lua +++ b/libs/libdebuff.lua @@ -1373,9 +1373,13 @@ if hasNampower then elseif event == "SPELL_FAILED_OTHER" then local casterGuid = arg1 - + local spellId = arg2 + if casterGuid and pfUI.libdebuff_casts[casterGuid] then - pfUI.libdebuff_casts[casterGuid] = nil + -- Only clear if spellID matches to avoid clearing a cast that already moved on + if pfUI.libdebuff_casts[casterGuid].spellID == spellId then + pfUI.libdebuff_casts[casterGuid] = nil + end end if pfUI.libdebuff_spell_failed_other_hooks then for _, fn in pairs(pfUI.libdebuff_spell_failed_other_hooks) do diff --git a/modules/castbar.lua b/modules/castbar.lua index 25d78d99..09983345 100644 --- a/modules/castbar.lua +++ b/modules/castbar.lua @@ -174,6 +174,7 @@ pfUI:RegisterModule("castbar", "vanilla", function () this.bar.left:SetText(spellname .. rank) this.fadeout = nil this.endTime = endTime + this.lastMax = nil -- reset so SetMinMaxValues is called for this new cast -- set texture if texture and this.showicon then