castbar: add missing channel detection

This commit is contained in:
shagu
2018-11-04 15:58:05 +01:00
parent fb8fbbc8c4
commit 977948263c
+5 -1
View File
@@ -74,6 +74,10 @@ pfUI:RegisterModule("castbar", function ()
if not name then return end
local cast, nameSubtext, text, texture, startTime, endTime, isTradeSkill = UnitCastingInfo(name)
if not cast then
-- scan for channel spells if no cast was found
cast, nameSubtext, text, texture, startTime, endTime, isTradeSkill = UnitChannelInfo(name)
end
if cast then
local duration = endTime - startTime
@@ -92,7 +96,7 @@ pfUI:RegisterModule("castbar", function ()
end
if channel then
cur = duration + startTime / 1000 - GetTime() -- channel
cur = max + startTime/1000 - GetTime()
end
cur = cur > max and max or cur