mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-08 22:50:00 +00:00
fixed castbar for channeling units
This commit is contained in:
+4
-1
@@ -120,12 +120,15 @@ pfUI:RegisterModule("castbar", "vanilla", function ()
|
||||
if castData.event == "CAST" or castData.event == "FAIL" then
|
||||
castBlocked = true
|
||||
pfUI.libdebuff_casts[focusGuid] = nil
|
||||
elseif castData.event == "START" and castData.endTime and castData.endTime > GetTime() then
|
||||
elseif (castData.event == "START" or castData.event == "CHANNEL") and castData.endTime and castData.endTime > GetTime() then
|
||||
cast = castData.spellName
|
||||
texture = castData.icon
|
||||
startTime = castData.startTime * 1000
|
||||
endTime = castData.endTime * 1000
|
||||
nameSubtext = ""
|
||||
if castData.event == "CHANNEL" then
|
||||
channel = cast
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
+11
-2
@@ -1579,8 +1579,17 @@ nameplates:RegisterEvent("ZONE_CHANGED_NEW_AREA")
|
||||
local channel, cast, nameSubtext, text, texture, startTime, endTime, isTradeSkill
|
||||
|
||||
if targetGUID then
|
||||
-- We have a GUID = Nampower is authority, no cast means no cast
|
||||
nameplate.castbar:Hide()
|
||||
-- We have a GUID but Nampower has no cast info.
|
||||
-- Fall back to API for the target plate (channels may not be in cast cache)
|
||||
if isTargetPlate and UnitExists("target") then
|
||||
cast, nameSubtext, text, texture, startTime, endTime, isTradeSkill = UnitCastingInfo("target")
|
||||
if not cast then
|
||||
channel, nameSubtext, text, texture, startTime, endTime, isTradeSkill = UnitChannelInfo("target")
|
||||
end
|
||||
end
|
||||
if not cast and not channel then
|
||||
nameplate.castbar:Hide()
|
||||
end
|
||||
elseif isTargetPlate and UnitExists("target") then
|
||||
cast, nameSubtext, text, texture, startTime, endTime, isTradeSkill = UnitCastingInfo("target")
|
||||
if not cast then
|
||||
|
||||
Reference in New Issue
Block a user