mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-07 22:20:00 +00:00
fixed castbar for channeling units
This commit is contained in:
+6
-3
@@ -1200,7 +1200,9 @@ if hasNampower then
|
||||
local itemId = arg1
|
||||
local spellId = arg2
|
||||
local casterGuid = arg3
|
||||
local castTime = arg6
|
||||
local spellType = arg8 or 0 -- 0=Normal, 1=Channel, 2=Autorepeating
|
||||
local isChannel = spellType == 1
|
||||
local castTime = isChannel and arg7 or arg6 -- arg6=castTime (normal), arg7=duration (channel)
|
||||
|
||||
if not casterGuid or not spellId then return end
|
||||
|
||||
@@ -1244,7 +1246,7 @@ if hasNampower then
|
||||
startTime = GetTime(),
|
||||
duration = castTime and castTime / 1000 or 0,
|
||||
endTime = castTime and (GetTime() + castTime / 1000) or nil,
|
||||
event = "START"
|
||||
event = isChannel and "CHANNEL" or "START"
|
||||
}
|
||||
|
||||
if event == "SPELL_START_SELF" and pfUI.libdebuff_spell_start_self_hooks then
|
||||
@@ -1267,8 +1269,9 @@ if hasNampower then
|
||||
|
||||
-- Clear cast bar only if SPELL_GO matches the active cast
|
||||
-- (Reactive procs like Frost Armor trigger SPELL_GO but shouldn't clear the castbar)
|
||||
-- Don't clear channels on SPELL_GO - channels persist until duration expires or SPELL_FAILED
|
||||
if casterGuid and pfUI.libdebuff_casts[casterGuid] then
|
||||
if pfUI.libdebuff_casts[casterGuid].spellID == spellId then
|
||||
if pfUI.libdebuff_casts[casterGuid].spellID == spellId and pfUI.libdebuff_casts[casterGuid].event ~= "CHANNEL" then
|
||||
pfUI.libdebuff_casts[casterGuid] = nil
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user