Skip to content

Commit

Permalink
Added NonInterruptible Check for Nameplate Castbars
Browse files Browse the repository at this point in the history
  • Loading branch information
muleyo committed Jun 26, 2024
1 parent d2b1446 commit 5f5d816
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions Modules/NamePlates/_Core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,26 @@ function Module:OnEnable()
end
end
end

local _, _, _, _, _, _, _, notInterruptibleCast = UnitCastingInfo(self.unit)
local _, _, _, _, _, _, notInterruptibleChannel = UnitChannelInfo(self.unit)

if (notInterruptibleCast) then
self:SetStatusBarColor(.7, .7, .7)
elseif (notInterruptibleChannel) then
self:SetStatusBarColor(.7, .7, .7)
else
local color
local isChannel = UnitChannelInfo("player");

if (isChannel) then
color = self.startChannelColor
else
color = self.startCastColor
end

self:SetStatusBarColor(color.r, color.g, color.b)
end
end
end
end
Expand Down

0 comments on commit 5f5d816

Please sign in to comment.