Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
muleyo committed Jun 27, 2024
1 parent df364c7 commit 0842f92
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 57 deletions.
32 changes: 14 additions & 18 deletions Modules/CastBars/_Focus.lua
Original file line number Diff line number Diff line change
Expand Up @@ -17,28 +17,24 @@ function Module:OnEnable()
end

FocusFrameSpellBar:HookScript("OnEvent", function(self, event)
if (event == "UNIT_SPELLCAST_INTERRUPTED" or event == "UNIT_SPELLCAST_FAILED") then
self:SetStatusBarColor(self.failedCastColor.r, self.failedCastColor.g, self.failedCastColor.b)
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 _, _, _, _, _, _, _, notInterruptibleCast = UnitCastingInfo(self.unit)
local _, _, _, _, _, _, notInterruptibleChannel = UnitChannelInfo(self.unit)
local color
local isChannel = UnitChannelInfo(self.unit);

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

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

self:SetStatusBarColor(color.r, color.g, color.b)
color = self.startCastColor
end

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

Expand Down
34 changes: 15 additions & 19 deletions Modules/CastBars/_Player.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,28 +12,24 @@ function Module:OnEnable()
end

CastingBarFrame:HookScript("OnEvent", function(self, event)
if (event == "UNIT_SPELLCAST_INTERRUPTED" or event == "UNIT_SPELLCAST_FAILED") then
self:SetStatusBarColor(self.failedCastColor.r, self.failedCastColor.g, self.failedCastColor.b)
local _, _, _, _, _, _, _, notInterruptibleCast = UnitCastingInfo("player")
local _, _, _, _, _, _, notInterruptibleChannel = UnitChannelInfo("player")

if (notInterruptibleCast) then
self:SetStatusBarColor(.7, .7, .7)
elseif (notInterruptibleChannel) then
self:SetStatusBarColor(.7, .7, .7)
else
local _, _, _, _, _, _, _, notInterruptibleCast = UnitCastingInfo("player")
local _, _, _, _, _, _, notInterruptibleChannel = UnitChannelInfo("player")

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

if (isChannel) then
color = self.startChannelColor
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)
color = self.startCastColor
end

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

Expand Down
34 changes: 15 additions & 19 deletions Modules/CastBars/_Target.lua
Original file line number Diff line number Diff line change
Expand Up @@ -14,29 +14,25 @@ function Module:OnEnable()
TargetFrameSpellBar.Border:SetVertexColor(unpack(SUI:Color(0.15)))
end

TargetFrameSpellBar:HookScript("OnEvent", function(self, event)
if (event == "UNIT_SPELLCAST_INTERRUPTED" or event == "UNIT_SPELLCAST_FAILED") then
self:SetStatusBarColor(self.failedCastColor.r, self.failedCastColor.g, self.failedCastColor.b)
TargetFrameSpellBar:HookScript("OnEvent", function(self, event, unit)
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 _, _, _, _, _, _, _, notInterruptibleCast = UnitCastingInfo(self.unit)
local _, _, _, _, _, _, notInterruptibleChannel = UnitChannelInfo(self.unit)
local color
local isChannel = UnitChannelInfo(self.unit);

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

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

self:SetStatusBarColor(color.r, color.g, color.b)
color = self.startCastColor
end

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

Expand Down
1 change: 1 addition & 0 deletions Modules/Skins/Blizzard/_quest.lua
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ function Module:OnEnable()
SUI:Skin(QuestFrameGoodbyeButton)
SUI:Skin(QuestFrameCompleteQuestButton)
SUI:Skin(QuestFrameCancelButton)
SUI:Skin(QuestFrameGreetingPanel)

if not QuestFrameDetailPanel.ParchmentFrame then
QuestFrameDetailPanel.ParchmentFrame = QuestFrameDetailPanel:CreateTexture(nil, "OVERLAY", nil, 1)
Expand Down
2 changes: 1 addition & 1 deletion SUI.toc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Interface: 40400
## Author: Syiana & Muleyo
## Version: 4.4.18
## Version: 4.4.19
## Title: |cffff00d5S|r|cff027bffUI|r
## Notes: Made with <3 by Syiana & Muleyo
## SavedVariables: SUIDB
Expand Down

0 comments on commit 0842f92

Please sign in to comment.