From c202dbef49bf5ed4aa062cd34596191e0acf4310 Mon Sep 17 00:00:00 2001 From: Simpy Date: Sat, 20 Apr 2024 18:13:29 -0400 Subject: [PATCH 1/3] https://github.com/oUF-wow/oUF/pull/674 --- ElvUI_Libraries/Core/oUF/elements/tags.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ElvUI_Libraries/Core/oUF/elements/tags.lua b/ElvUI_Libraries/Core/oUF/elements/tags.lua index 00ed324814..f9a19165a5 100644 --- a/ElvUI_Libraries/Core/oUF/elements/tags.lua +++ b/ElvUI_Libraries/Core/oUF/elements/tags.lua @@ -448,7 +448,7 @@ local tagStrings = { end]], ['threatcolor'] = [[function(u) - return Hex(GetThreatStatusColor(UnitThreatSituation(u))) + return Hex(GetThreatStatusColor(UnitThreatSituation(u) or 0)) end]], } From 6a9e51488491b367fc33e1f759c3de2b87befcee Mon Sep 17 00:00:00 2001 From: Simpy Date: Sat, 20 Apr 2024 18:14:34 -0400 Subject: [PATCH 2/3] https://github.com/oUF-wow/oUF/pull/675 --- ElvUI_Libraries/Core/oUF/elements/castbar.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ElvUI_Libraries/Core/oUF/elements/castbar.lua b/ElvUI_Libraries/Core/oUF/elements/castbar.lua index d1d1b0c021..effe7bbddb 100644 --- a/ElvUI_Libraries/Core/oUF/elements/castbar.lua +++ b/ElvUI_Libraries/Core/oUF/elements/castbar.lua @@ -184,7 +184,9 @@ local function UpdatePips(element, numStages) pip:Show() if(isHoriz) then - pip:RotateTextures(0) + if(pip.RotateTextures) then + pip:RotateTextures(0) + end if(element:GetReverseFill()) then pip:SetPoint('TOP', element, 'TOPRIGHT', -offset, 0) @@ -194,7 +196,9 @@ local function UpdatePips(element, numStages) pip:SetPoint('BOTTOM', element, 'BOTTOMLEFT', offset, 0) end else - pip:RotateTextures(1.5708) + if(pip.RotateTextures) then + pip:RotateTextures(1.5708) + end if(element:GetReverseFill()) then pip:SetPoint('LEFT', element, 'TOPLEFT', 0, -offset) From 57835e6b8fc98caaac300aff8522dd0c236a57f2 Mon Sep 17 00:00:00 2001 From: Simpy Date: Sat, 20 Apr 2024 18:19:15 -0400 Subject: [PATCH 3/3] https://github.com/oUF-wow/oUF/pull/677 --- ElvUI_Libraries/Core/oUF/elements/castbar.lua | 40 ++++++++++++++----- 1 file changed, 31 insertions(+), 9 deletions(-) diff --git a/ElvUI_Libraries/Core/oUF/elements/castbar.lua b/ElvUI_Libraries/Core/oUF/elements/castbar.lua index effe7bbddb..3a7963ebf9 100644 --- a/ElvUI_Libraries/Core/oUF/elements/castbar.lua +++ b/ElvUI_Libraries/Core/oUF/elements/castbar.lua @@ -216,11 +216,25 @@ local function UpdatePips(element, numStages) end end +--[[ Override: Castbar:ShouldShow(unit) +Handles check for which unit the castbar should show for. +Defaults to the object unit. +* self - the Castbar widget +* unit - the unit for which the update has been triggered (string) +--]] +local function ShouldShow(element, unit) + return element.__owner.unit == unit +end + + local function CastStart(self, real, unit, castGUID) - if self.unit ~= unit then return end if oUF.isRetail and real == 'UNIT_SPELLCAST_START' and not castGUID then return end local element = self.Castbar + if(not (element.ShouldShow or ShouldShow) (element, unit)) then + return + end + local name, text, texture, startTime, endTime, isTradeSkill, castID, notInterruptible, spellID = UnitCastingInfo(unit) local numStages, _ @@ -332,9 +346,11 @@ local function CastStart(self, real, unit, castGUID) end local function CastUpdate(self, event, unit, castID, spellID) - if(self.unit ~= unit) then return end - local element = self.Castbar + if(not (element.ShouldShow or ShouldShow) (element, unit)) then + return + end + if(not element:IsShown() or ((unit == 'player' or oUF.isRetail) and (element.castID ~= castID)) or (oUF.isRetail and (element.spellID ~= spellID))) then return end @@ -389,9 +405,11 @@ local function CastUpdate(self, event, unit, castID, spellID) end local function CastStop(self, event, unit, castID, spellID) - if(self.unit ~= unit) then return end - local element = self.Castbar + if(not (element.ShouldShow or ShouldShow) (element, unit)) then + return + end + if(not element:IsShown() or ((unit == 'player' or oUF.isRetail) and (element.castID ~= castID)) or (oUF.isRetail and (element.spellID ~= spellID))) then return end @@ -419,9 +437,11 @@ local function CastStop(self, event, unit, castID, spellID) end local function CastFail(self, event, unit, castID, spellID) - if(self.unit ~= unit) then return end - local element = self.Castbar + if(not (element.ShouldShow or ShouldShow) (element, unit)) then + return + end + if(not element:IsShown() or ((unit == 'player' or oUF.isRetail) and (element.castID ~= castID)) or (oUF.isRetail and (element.spellID ~= spellID))) then return end @@ -457,9 +477,11 @@ local function CastFail(self, event, unit, castID, spellID) end local function CastInterruptible(self, event, unit) - if(self.unit ~= unit) then return end - local element = self.Castbar + if(not (element.ShouldShow or ShouldShow) (element, unit)) then + return + end + if(not element:IsShown()) then return end element.notInterruptible = event == 'UNIT_SPELLCAST_NOT_INTERRUPTIBLE'