From 977948263c27fe2d752488077270407c226f4abb Mon Sep 17 00:00:00 2001 From: shagu Date: Sun, 4 Nov 2018 15:58:05 +0100 Subject: [PATCH] castbar: add missing channel detection --- modules/castbar.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/castbar.lua b/modules/castbar.lua index a847fddb..21ec6882 100644 --- a/modules/castbar.lua +++ b/modules/castbar.lua @@ -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