Skip to content

Commit 17cc7b5

Browse files
committed
fix channel bars - thanks Eleesium, Mapko
1 parent 55b4e7f commit 17cc7b5

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Modules/Factory.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,6 @@ local function UpdateUnitCastBar(self, event, unit)
337337

338338
local CAST_START = {
339339
UNIT_SPELLCAST_START = true,
340-
UNIT_SPELLCAST_CHANNEL_START = true,
341340
UNIT_SPELLCAST_INTERRUPTIBLE = true,
342341
UNIT_SPELLCAST_NOT_INTERRUPTIBLE = true,
343342
UNIT_SPELLCAST_SENT = true,
@@ -368,9 +367,10 @@ local function UpdateUnitCastBar(self, event, unit)
368367
local channelDuration = UnitChannelDuration(self.unit)
369368
if not channelDuration then return end
370369
self.CastBar:SetTimerDuration(channelDuration, 0)
370+
self.CastBar:SetMinMaxValues(0, channelDuration:GetTotalDuration())
371371
self.CastBar.SpellName:SetText(UnitChannelInfo(self.unit) or "")
372372
self.CastBar.Icon:SetTexture(select(3, UnitChannelInfo(self.unit)) or nil)
373-
self.CastBar:SetScript("OnUpdate", function() local remainingDuration = channelDuration:GetRemainingDuration() self.CastBar.Time:SetText(string.format("%.1f", remainingDuration)) end)
373+
self.CastBar:SetScript("OnUpdate", function() local remainingDuration = channelDuration:GetRemainingDuration() self.CastBar:SetValue(remainingDuration) self.CastBar.Time:SetText(string.format("%.1f", remainingDuration)) end)
374374
self.CastBarContainer:Show()
375375
self.CastBar:Show()
376376
elseif CAST_STOP[event] then

0 commit comments

Comments
 (0)