diff --git a/ElvUI/Libraries/oUF/elements/auras.lua b/ElvUI/Libraries/oUF/elements/auras.lua index a33bed8..b7472b7 100644 --- a/ElvUI/Libraries/oUF/elements/auras.lua +++ b/ElvUI/Libraries/oUF/elements/auras.lua @@ -356,13 +356,6 @@ local function filterIcons(element, unit, filter, limit, isDebuff, offset, dontH end local function UpdateAuras(self, event, unit) - if unit and self.isNamePlate and unit:sub(1, 9) ~= "nameplate" then - local isUnit = self.unit and UnitIsUnit(self.unit, unit) - if isUnit then - unit = self.unit - end - end - if(self.unit ~= unit) then return end local auras = self.Auras @@ -509,12 +502,6 @@ local function UpdateAuras(self, event, unit) end local function Update(self, event, unit) - if unit and self.isNamePlate and unit:sub(1, 9) ~= "nameplate" then - local isUnit = self.unit and UnitIsUnit(self.unit, unit) - if isUnit then - unit = self.unit - end - end if(self.unit ~= unit) then return end UpdateAuras(self, event, unit) diff --git a/ElvUI/Libraries/oUF/elements/castbar.lua b/ElvUI/Libraries/oUF/elements/castbar.lua index e924f14..7cd4a34 100644 --- a/ElvUI/Libraries/oUF/elements/castbar.lua +++ b/ElvUI/Libraries/oUF/elements/castbar.lua @@ -114,12 +114,6 @@ end -- end block local function CastStart(self, event, unit) - if unit and self.isNamePlate and unit:sub(1, 9) ~= "nameplate" then - local isUnit = self.unit and UnitIsUnit(self.unit, unit) - if isUnit then - unit = self.unit - end - end if(self.unit ~= unit) then return end local element = self.Castbar @@ -213,12 +207,6 @@ local function CastStart(self, event, unit) end local function CastUpdate(self, event, unit, _, _, castID) - if unit and self.isNamePlate and unit:sub(1, 9) ~= "nameplate" then - local isUnit = self.unit and UnitIsUnit(self.unit, unit) - if isUnit then - unit = self.unit - end - end if(self.unit ~= unit) then return end local element = self.Castbar @@ -272,12 +260,6 @@ local function CastUpdate(self, event, unit, _, _, castID) end local function CastStop(self, event, unit, _, _, castID) - if unit and self.isNamePlate and unit:sub(1, 9) ~= "nameplate" then - local isUnit = self.unit and UnitIsUnit(self.unit, unit) - if isUnit then - unit = self.unit - end - end if(self.unit ~= unit) then return end local element = self.Castbar @@ -307,12 +289,6 @@ local function CastStop(self, event, unit, _, _, castID) end local function CastFail(self, event, unit, _, _, castID) - if unit and self.isNamePlate and unit:sub(1, 9) ~= "nameplate" then - local isUnit = self.unit and UnitIsUnit(self.unit, unit) - if isUnit then - unit = self.unit - end - end if(self.unit ~= unit) then return end local element = self.Castbar @@ -350,12 +326,6 @@ local function CastFail(self, event, unit, _, _, castID) end local function CastInterruptible(self, event, unit) - if unit and self.isNamePlate and unit:sub(1, 9) ~= "nameplate" then - local isUnit = self.unit and UnitIsUnit(self.unit, unit) - if isUnit then - unit = self.unit - end - end if(self.unit ~= unit) then return end local element = self.Castbar @@ -440,43 +410,22 @@ local function ForceUpdate(element) return Update(element.__owner, 'ForceUpdate', element.__owner.unit) end -local function NamePlateCastBarOnShow(self) - if C_NamePlateManager.IsNamePlateMoving(self) then return end - CastStart(self, "UNIT_SPELLCAST_START", self.unit) -end - -local function NamePlateCastBarOnHide(self) - if C_NamePlateManager.IsNamePlateMoving(self) then return end - CastFail(self, "UNIT_SPELLCAST_FAILED", self.unit, nil, nil, self.Castbar.castID) -end - -local function NamePlateCastBarOnValueChanged(self) - CastUpdate(self, nil, self.unit, nil, nil, self.Castbar.castID) -end - local function Enable(self, unit) local element = self.Castbar if(element and unit and not unit:match('%wtarget$')) then element.__owner = self element.ForceUpdate = ForceUpdate - if self.isNamePlate then - local castBar = self.nameplateAnchor.CastBar - castBar:SetScript("OnShow", GenerateClosure(NamePlateCastBarOnShow, self)) - castBar:SetScript("OnHide", GenerateClosure(NamePlateCastBarOnHide, self)) - castBar:SetScript("OnValueChanged", GenerateClosure(NamePlateCastBarOnValueChanged, self)) - else - self:RegisterEvent('UNIT_SPELLCAST_START', CastStart) - self:RegisterEvent('UNIT_SPELLCAST_CHANNEL_START', CastStart) - self:RegisterEvent('UNIT_SPELLCAST_STOP', CastStop) - self:RegisterEvent('UNIT_SPELLCAST_CHANNEL_STOP', CastStop) - self:RegisterEvent('UNIT_SPELLCAST_DELAYED', CastUpdate) - self:RegisterEvent('UNIT_SPELLCAST_CHANNEL_UPDATE', CastUpdate) - self:RegisterEvent('UNIT_SPELLCAST_FAILED', CastFail) - self:RegisterEvent('UNIT_SPELLCAST_INTERRUPTED', CastFail) - self:RegisterEvent('UNIT_SPELLCAST_INTERRUPTIBLE', CastInterruptible) - self:RegisterEvent('UNIT_SPELLCAST_NOT_INTERRUPTIBLE', CastInterruptible) - end + self:RegisterEvent('UNIT_SPELLCAST_START', CastStart) + self:RegisterEvent('UNIT_SPELLCAST_CHANNEL_START', CastStart) + self:RegisterEvent('UNIT_SPELLCAST_STOP', CastStop) + self:RegisterEvent('UNIT_SPELLCAST_CHANNEL_STOP', CastStop) + self:RegisterEvent('UNIT_SPELLCAST_DELAYED', CastUpdate) + self:RegisterEvent('UNIT_SPELLCAST_CHANNEL_UPDATE', CastUpdate) + self:RegisterEvent('UNIT_SPELLCAST_FAILED', CastFail) + self:RegisterEvent('UNIT_SPELLCAST_INTERRUPTED', CastFail) + self:RegisterEvent('UNIT_SPELLCAST_INTERRUPTIBLE', CastInterruptible) + self:RegisterEvent('UNIT_SPELLCAST_NOT_INTERRUPTIBLE', CastInterruptible) -- ElvUI block self:RegisterEvent('UNIT_SPELLCAST_SENT', UNIT_SPELLCAST_SENT, true) @@ -521,13 +470,7 @@ local function Disable(self) if(element) then element:Hide() - if self.isNamePlate then - local castBar = self.nameplateAnchor.CastBar - castBar:SetScript("OnShow", nil) - castBar:SetScript("OnHide", nil) - castBar:SetScript("OnValueChanged", nil) - else - self:UnregisterEvent('UNIT_SPELLCAST_START', CastStart) + self:UnregisterEvent('UNIT_SPELLCAST_START', CastStart) self:UnregisterEvent('UNIT_SPELLCAST_CHANNEL_START', CastStart) self:UnregisterEvent('UNIT_SPELLCAST_DELAYED', CastUpdate) self:UnregisterEvent('UNIT_SPELLCAST_CHANNEL_UPDATE', CastUpdate) @@ -537,7 +480,6 @@ local function Disable(self) self:UnregisterEvent('UNIT_SPELLCAST_INTERRUPTED', CastFail) self:UnregisterEvent('UNIT_SPELLCAST_INTERRUPTIBLE', CastInterruptible) self:UnregisterEvent('UNIT_SPELLCAST_NOT_INTERRUPTIBLE', CastInterruptible) - end element:SetScript('OnUpdate', nil) @@ -561,12 +503,6 @@ end) oUF:AddElement('Castbar', Update, Enable, Disable) function CastingBarFrame_SetUnit(self, unit, showTradeSkills, showShield) - if unit and self.isNamePlate and unit:sub(1, 9) ~= "nameplate" then - local isUnit = self.unit and UnitIsUnit(self.unit, unit) - if isUnit then - unit = self.unit - end - end if(self.unit ~= unit) then self.unit = unit self.showTradeSkills = showTradeSkills diff --git a/ElvUI/Libraries/oUF/elements/combopoints.lua b/ElvUI/Libraries/oUF/elements/combopoints.lua index e99e5a5..e7c47ac 100644 --- a/ElvUI/Libraries/oUF/elements/combopoints.lua +++ b/ElvUI/Libraries/oUF/elements/combopoints.lua @@ -37,12 +37,6 @@ local UnitHasVehicleUI = UnitHasVehicleUI local MAX_COMBO_POINTS = MAX_COMBO_POINTS local function Update(self, event, unit) - if self.isNamePlate then - local isUnit = self.unit and UnitIsUnit(self.unit, unit) - if isUnit then - unit = self.unit - end - end if(unit == 'pet') then return end local element = self.ComboPoints diff --git a/ElvUI/Libraries/oUF/elements/happinessindicator.lua b/ElvUI/Libraries/oUF/elements/happinessindicator.lua index 2c553ca..f611398 100644 --- a/ElvUI/Libraries/oUF/elements/happinessindicator.lua +++ b/ElvUI/Libraries/oUF/elements/happinessindicator.lua @@ -30,12 +30,6 @@ local GetPetHappiness = GetPetHappiness local HasPetUI = HasPetUI local function Update(self, event, unit) - if unit and self.isNamePlate and unit:sub(1, 9) ~= "nameplate" then - local isUnit = self.unit and UnitIsUnit(self.unit, unit) - if isUnit then - unit = self.unit - end - end if(not unit or self.unit ~= unit) then return end local element = self.HappinessIndicator diff --git a/ElvUI/Libraries/oUF/elements/health.lua b/ElvUI/Libraries/oUF/elements/health.lua index 34af5a3..0daee4f 100644 --- a/ElvUI/Libraries/oUF/elements/health.lua +++ b/ElvUI/Libraries/oUF/elements/health.lua @@ -142,25 +142,7 @@ local function ColorPath(self, ...) * event - the event triggering the update (string) * unit - the unit accompanying the event (string) --]] - local _, unit = ... - local args - if unit and self.isNamePlate then - if ((event == "UNIT_THREAT_SITUATION_UPDATE" or event == "UNIT_FLAGS") and unit == "player") or event == "UNIT_THREAT_LIST_UPDATE" then - args = { ... } - args[2] = self.unit - elseif unit:sub(1, 9) ~= "nameplate" then - local isUnit = self.unit and UnitIsUnit(self.unit, unit) - if isUnit then - args = { ... } - args[2] = self.unit - end - end - end - if args then - (self.Health.UpdateColor or UpdateColor) (self, unpack(args)) - else - (self.Health.UpdateColor or UpdateColor) (self, ...) - end + (self.Health.UpdateColor or UpdateColor) (self, ...) end local function Update(self, event, unit) @@ -218,13 +200,6 @@ local function Path(self, ...) * event - the event triggering the update (string) * unit - the unit accompanying the event (string) --]] - local _, unit = ... - if unit and self.isNamePlate and unit:sub(1, 9) ~= "nameplate" then - local isUnit = self.unit and UnitIsUnit(self.unit, unit) - if isUnit then - unit = self.unit - end - end (self.Health.Override or Update) (self, ...); ColorPath(self, ...) end @@ -397,18 +372,6 @@ local function Enable(self, unit) self:RegisterEvent('UNIT_MAXHEALTH', Path) - if self.isNamePlate then - local healthBar = self.nameplateAnchor.HealthBar - healthBar:SetScript("OnValueChanged", function() - Path(self, "UNIT_HEALTH", self.unit) - end) - healthBar:SetScript("OnMinMaxChanged", function() - Path(self, "UNIT_MAXHEALTH", self.unit) - end) - self:RegisterEvent('UNIT_THREAT_SITUATION_UPDATE', Path) - self:RegisterEvent('UNIT_FLAGS', Path) - end - if(element:IsObjectType('StatusBar') and not element:GetStatusBarTexture()) then element:SetStatusBarTexture([[Interface\TargetingFrame\UI-StatusBar]]) end diff --git a/ElvUI/Libraries/oUF/elements/portrait.lua b/ElvUI/Libraries/oUF/elements/portrait.lua index 4a8410a..2ca381a 100644 --- a/ElvUI/Libraries/oUF/elements/portrait.lua +++ b/ElvUI/Libraries/oUF/elements/portrait.lua @@ -43,12 +43,6 @@ local UnitIsUnit = UnitIsUnit local UnitIsVisible = UnitIsVisible local function Update(self, event, unit) - if self.isNamePlate then - local isUnit = self.unit and UnitIsUnit(self.unit, unit) - if isUnit then - unit = self.unit - end - end if(not unit or not UnitIsUnit(self.unit, unit)) then return end local element = self.Portrait diff --git a/ElvUI/Libraries/oUF/elements/power.lua b/ElvUI/Libraries/oUF/elements/power.lua index 85f4050..31765e5 100644 --- a/ElvUI/Libraries/oUF/elements/power.lua +++ b/ElvUI/Libraries/oUF/elements/power.lua @@ -100,12 +100,6 @@ local UnitPowerType = UnitPowerType local UnitReaction = UnitReaction local function UpdateColor(self, event, unit) - if unit and self.isNamePlate and unit:sub(1, 9) ~= "nameplate" then - local isUnit = self.unit and UnitIsUnit(self.unit, unit) - if isUnit then - unit = self.unit - end - end if(self.unit ~= unit) then return end local element = self.Power @@ -176,12 +170,6 @@ local function ColorPath(self, ...) end local function Update(self, event, unit) - if unit and self.isNamePlate and unit:sub(1, 9) ~= "nameplate" then - local isUnit = self.unit and UnitIsUnit(self.unit, unit) - if isUnit then - unit = self.unit - end - end if(self.unit ~= unit) then return end local element = self.Power diff --git a/ElvUI/Libraries/oUF/elements/powerenergy.lua b/ElvUI/Libraries/oUF/elements/powerenergy.lua index 560b242..2fef6d2 100644 --- a/ElvUI/Libraries/oUF/elements/powerenergy.lua +++ b/ElvUI/Libraries/oUF/elements/powerenergy.lua @@ -17,12 +17,6 @@ local UnitPowerType = UnitPowerType local UnitReaction = UnitReaction local function UpdateColor(self, event, unit) - if unit and self.isNamePlate and unit:sub(1, 9) ~= "nameplate" then - local isUnit = self.unit and UnitIsUnit(self.unit, unit) - if isUnit then - unit = self.unit - end - end if(self.unit ~= unit) then return end local element = self.Energy @@ -90,12 +84,6 @@ local function ColorPath(self, ...) end local function Update(self, event, unit) - if unit and self.isNamePlate and unit:sub(1, 9) ~= "nameplate" then - local isUnit = self.unit and UnitIsUnit(self.unit, unit) - if isUnit then - unit = self.unit - end - end if(self.unit ~= unit) then return end local element = self.Energy diff --git a/ElvUI/Libraries/oUF/elements/powerrage.lua b/ElvUI/Libraries/oUF/elements/powerrage.lua index fb2d344..e301677 100644 --- a/ElvUI/Libraries/oUF/elements/powerrage.lua +++ b/ElvUI/Libraries/oUF/elements/powerrage.lua @@ -80,22 +80,7 @@ local function ColorPath(self, ...) * event - the event triggering the update (string) * unit - the unit accompanying the event (string) --]] - local _, unit = ... - local args - if unit and self.isNamePlate then - if unit:sub(1, 9) ~= "nameplate" then - local isUnit = self.unit and UnitIsUnit(self.unit, unit) - if isUnit then - args = { ... } - args[2] = self.unit - end - end - end - if args then - return (self.Rage.UpdateColor or UpdateColor) (self, unpack(args)) - else - return (self.Rage.UpdateColor or UpdateColor) (self, ...) - end + return (self.Rage.UpdateColor or UpdateColor) (self, ...) end local function Update(self, event, unit) @@ -152,24 +137,8 @@ local function Path(self, ...) * unit - the unit accompanying the event (string) * ... - the arguments accompanying the event --]] - local _, unit = ... - local args - if unit and self.isNamePlate then - if unit:sub(1, 9) ~= "nameplate" then - local isUnit = self.unit and UnitIsUnit(self.unit, unit) - if isUnit then - args = { ... } - args[2] = self.unit - end - end - end - if args then - (self.Rage.Override or Update) (self, unpack(args)); - ColorPath(self, unpack(args)) - else - (self.Rage.Override or Update) (self, ...); - ColorPath(self, ...) - end + (self.Rage.Override or Update) (self, ...); + ColorPath(self, ...) end local function ForceUpdate(element) diff --git a/ElvUI/Libraries/oUF/elements/pvpindicator.lua b/ElvUI/Libraries/oUF/elements/pvpindicator.lua index 5bd475b..fcf1798 100644 --- a/ElvUI/Libraries/oUF/elements/pvpindicator.lua +++ b/ElvUI/Libraries/oUF/elements/pvpindicator.lua @@ -87,22 +87,7 @@ local function Path(self, ...) * event - the event triggering the update (string) * ... - the arguments accompanying the event --]] - local _, unit = ... - local args - if unit and self.isNamePlate then - if unit:sub(1, 9) ~= "nameplate" then - local isUnit = self.unit and UnitIsUnit(self.unit, unit) - if isUnit then - args = { ... } - args[2] = self.unit - end - end - end - if args then - return (self.PvPIndicator.Override or Update) (self, unpack(args)) - else - return (self.PvPIndicator.Override or Update) (self, ...) - end + return (self.PvPIndicator.Override or Update) (self, ...) end local function ForceUpdate(element) diff --git a/ElvUI/Libraries/oUF/elements/threatindicator.lua b/ElvUI/Libraries/oUF/elements/threatindicator.lua index 281a2df..1bece56 100644 --- a/ElvUI/Libraries/oUF/elements/threatindicator.lua +++ b/ElvUI/Libraries/oUF/elements/threatindicator.lua @@ -96,22 +96,7 @@ local function Path(self, ...) * event - the event triggering the update (string) * ... - the arguments accompanying the event --]] - local _, unit = ... - local args - if unit and self.isNamePlate then - if unit:sub(1, 9) ~= "nameplate" then - local isUnit = self.unit and UnitIsUnit(self.unit, unit) - if isUnit then - args = { ... } - args[2] = self.unit - end - end - end - if args then - return (self.ThreatIndicator.Override or Update) (self, unpack(args)) - else - return (self.ThreatIndicator.Override or Update) (self, ...) - end + return (self.ThreatIndicator.Override or Update) (self, ...) end local function ForceUpdate(element) diff --git a/ElvUI/Libraries/oUF_Plugins/oUF_AuraBars/oUF_AuraBars.lua b/ElvUI/Libraries/oUF_Plugins/oUF_AuraBars/oUF_AuraBars.lua index 23c05dd..12e6b86 100644 --- a/ElvUI/Libraries/oUF_Plugins/oUF_AuraBars/oUF_AuraBars.lua +++ b/ElvUI/Libraries/oUF_Plugins/oUF_AuraBars/oUF_AuraBars.lua @@ -190,12 +190,6 @@ local function sortByTime(a, b) end local function Update(self, event, unit) - if unit and self.isNamePlate and unit:sub(1, 9) ~= "nameplate" then - local isUnit = self.unit and UnitIsUnit(self.unit, unit) - if isUnit then - unit = self.unit - end - end if self.unit ~= unit then return end local element = self.AuraBars diff --git a/ElvUI/Libraries/oUF_Plugins/oUF_AuraWatch/oUF_AuraWatch.lua b/ElvUI/Libraries/oUF_Plugins/oUF_AuraWatch/oUF_AuraWatch.lua index 4e71f26..488c720 100644 --- a/ElvUI/Libraries/oUF_Plugins/oUF_AuraWatch/oUF_AuraWatch.lua +++ b/ElvUI/Libraries/oUF_Plugins/oUF_AuraWatch/oUF_AuraWatch.lua @@ -258,12 +258,6 @@ end local found = {} local function Update(self, event, unit) - if unit and self.isNamePlate and unit:sub(1, 9) ~= "nameplate" then - local isUnit = self.unit and UnitIsUnit(self.unit, unit) - if isUnit then - unit = self.unit - end - end if not unit or self.unit ~= unit then return end local guid = UnitGUID(unit) diff --git a/ElvUI/Libraries/oUF_Plugins/oUF_Cutaway/oUF_Cutaway.lua b/ElvUI/Libraries/oUF_Plugins/oUF_Cutaway/oUF_Cutaway.lua index db1589e..14b45fa 100644 --- a/ElvUI/Libraries/oUF_Plugins/oUF_Cutaway/oUF_Cutaway.lua +++ b/ElvUI/Libraries/oUF_Plugins/oUF_Cutaway/oUF_Cutaway.lua @@ -83,12 +83,6 @@ local function Shared_UpdateCheckReturn(self, element, updateType, ...) return (not element.enabled or not self.cur) or element.ready or not maxV elseif (updateType == POST) then local curV, maxV, unit = ... - if unit and element.isNamePlate and unit:sub(1, 9) ~= "nameplate" then - local isUnit = element.unit and UnitIsUnit(element.unit, unit) - if isUnit then - unit = element.unit - end - end return (not element.enabled or not element.cur) or (not element.ready or not curV or not maxV) or element.unit ~= unit else return false diff --git a/ElvUI/Libraries/oUF_Plugins/oUF_DebuffHighlight/oUF_DebuffHighlight.lua b/ElvUI/Libraries/oUF_Plugins/oUF_DebuffHighlight/oUF_DebuffHighlight.lua index 120138b..d3de78f 100644 --- a/ElvUI/Libraries/oUF_Plugins/oUF_DebuffHighlight/oUF_DebuffHighlight.lua +++ b/ElvUI/Libraries/oUF_Plugins/oUF_DebuffHighlight/oUF_DebuffHighlight.lua @@ -26,12 +26,6 @@ local function GetDebuffType(unit, filterTable) end local function Update(object, event, unit) - if unit and object.isNamePlate and unit:sub(1, 9) ~= "nameplate" then - local isUnit = object.unit and UnitIsUnit(object.unit, unit) - if isUnit then - unit = object.unit - end - end if unit ~= object.unit then return end local debuffType, texture, wasFiltered, style, color = GetDebuffType(unit, object.DebuffHighlightFilterTable) diff --git a/ElvUI/Libraries/oUF_Plugins/oUF_Fader/oUF_Fader.lua b/ElvUI/Libraries/oUF_Plugins/oUF_Fader/oUF_Fader.lua index 7845fbd..974c774 100644 --- a/ElvUI/Libraries/oUF_Plugins/oUF_Fader/oUF_Fader.lua +++ b/ElvUI/Libraries/oUF_Plugins/oUF_Fader/oUF_Fader.lua @@ -62,12 +62,6 @@ local function Update(self, _, unit) end unit = unit or self.unit - if unit and self.isNamePlate and unit:sub(1, 9) ~= "nameplate" then - local isUnit = self.unit and UnitIsUnit(self.unit, unit) - if isUnit then - unit = self.unit - end - end if self.unit ~= unit then return end -- range fader diff --git a/ElvUI/Libraries/oUF_Plugins/oUF_RaidDebuffs/oUF_RaidDebuffs.lua b/ElvUI/Libraries/oUF_Plugins/oUF_RaidDebuffs/oUF_RaidDebuffs.lua index 91221b7..a424865 100644 --- a/ElvUI/Libraries/oUF_Plugins/oUF_RaidDebuffs/oUF_RaidDebuffs.lua +++ b/ElvUI/Libraries/oUF_Plugins/oUF_RaidDebuffs/oUF_RaidDebuffs.lua @@ -161,12 +161,6 @@ local function UpdateDebuff(self, name, icon, count, debuffType, duration, endTi end local function Update(self, event, unit) - if unit and self.isNamePlate and unit:sub(1, 9) ~= "nameplate" then - local isUnit = self.unit and UnitIsUnit(self.unit, unit) - if isUnit then - unit = self.unit - end - end if unit ~= self.unit then return end local element = self.RaidDebuffs diff --git a/ElvUI/Libraries/oUF_Plugins/oUF_ResComm/oUF_ResComm.lua b/ElvUI/Libraries/oUF_Plugins/oUF_ResComm/oUF_ResComm.lua index 9da6c59..3de1ceb 100644 --- a/ElvUI/Libraries/oUF_Plugins/oUF_ResComm/oUF_ResComm.lua +++ b/ElvUI/Libraries/oUF_Plugins/oUF_ResComm/oUF_ResComm.lua @@ -37,12 +37,6 @@ local UnitName = UnitName local enabledUF, enabled = {} local function Update(self, event, unit, succeeded) - if unit and self.isNamePlate and unit:sub(1, 9) ~= "nameplate" then - local isUnit = self.unit and UnitIsUnit(self.unit, unit) - if isUnit then - unit = self.unit - end - end if not unit or self.unit ~= unit then return end local element = self.ResurrectIndicator diff --git a/ElvUI/Modules/Nameplates/Elements/Health.lua b/ElvUI/Modules/Nameplates/Elements/Health.lua index 12da215..3f8a69d 100644 --- a/ElvUI/Modules/Nameplates/Elements/Health.lua +++ b/ElvUI/Modules/Nameplates/Elements/Health.lua @@ -12,12 +12,6 @@ local UnitIsConnected = UnitIsConnected local CreateFrame = CreateFrame function NP:Health_UpdateColor(_, unit) - if unit and self.isNamePlate and unit:sub(1, 9) ~= "nameplate" then - local isUnit = self.unit and UnitIsUnit(self.unit, unit) - if isUnit then - unit = self.unit - end - end if not unit or self.unit ~= unit then return end local element = self.Health diff --git a/ElvUI/Modules/Nameplates/Elements/Power.lua b/ElvUI/Modules/Nameplates/Elements/Power.lua index db39774..a09cbf8 100644 --- a/ElvUI/Modules/Nameplates/Elements/Power.lua +++ b/ElvUI/Modules/Nameplates/Elements/Power.lua @@ -13,12 +13,6 @@ local UnitPowerType = UnitPowerType local POWERTYPE_ALTERNATE = 10 function NP:Power_UpdateColor(_, unit) - if unit and self.isNamePlate and unit:sub(1, 9) ~= "nameplate" then - local isUnit = self.unit and UnitIsUnit(self.unit, unit) - if isUnit then - unit = self.unit - end - end if self.unit ~= unit then return end local element = self.Power diff --git a/ElvUI/Modules/Nameplates/StyleFilter.lua b/ElvUI/Modules/Nameplates/StyleFilter.lua index b398a9b..e74da1a 100644 --- a/ElvUI/Modules/Nameplates/StyleFilter.lua +++ b/ElvUI/Modules/Nameplates/StyleFilter.lua @@ -1512,13 +1512,6 @@ do -- oUF style filter inject watch functions without actually registering any e local update = function(frame, event, arg1, arg2, arg3, ...) local eventFunc = mod.StyleFilterEventFunctions[event] - if arg1 and frame.isNamePlate and arg1:sub(1, 9) ~= "nameplate" then - local isUnit = frame.unit and UnitIsUnit(frame.unit, arg1) - if isUnit then - arg1 = frame.unit - end - end - if eventFunc then eventFunc(frame, event, arg1, arg2, arg3, ...) end diff --git a/ElvUI/Modules/UnitFrames/Elements/Happiness.lua b/ElvUI/Modules/UnitFrames/Elements/Happiness.lua index 4ae37eb..4cc5ce1 100644 --- a/ElvUI/Modules/UnitFrames/Elements/Happiness.lua +++ b/ElvUI/Modules/UnitFrames/Elements/Happiness.lua @@ -65,12 +65,6 @@ function UF:Configure_Happiness(frame) end function UF:HappinessOverride(event, unit) - if unit and self.isNamePlate and unit:sub(1, 9) ~= "nameplate" then - local isUnit = self.unit and UnitIsUnit(self.unit, unit) - if isUnit then - unit = self.unit - end - end if not unit or self.unit ~= unit then return end local db = self.db diff --git a/ElvUI/Modules/UnitFrames/Elements/PvPIcon.lua b/ElvUI/Modules/UnitFrames/Elements/PvPIcon.lua index 3b45d96..9c04cac 100644 --- a/ElvUI/Modules/UnitFrames/Elements/PvPIcon.lua +++ b/ElvUI/Modules/UnitFrames/Elements/PvPIcon.lua @@ -30,12 +30,6 @@ function UF:Configure_PVPIcon(frame) end function UF:UpdateOverridePvP(event, unit) - if unit and self.isNamePlate and unit:sub(1, 9) ~= "nameplate" then - local isUnit = self.unit and UnitIsUnit(self.unit, unit) - if isUnit then - unit = self.unit - end - end if not unit or self.unit ~= unit then return end local element = self.PvPIndicator diff --git a/ElvUI/Modules/UnitFrames/Elements/Threat.lua b/ElvUI/Modules/UnitFrames/Elements/Threat.lua index 3f0f15c..310ad93 100644 --- a/ElvUI/Modules/UnitFrames/Elements/Threat.lua +++ b/ElvUI/Modules/UnitFrames/Elements/Threat.lua @@ -95,12 +95,6 @@ end function UF:UpdateThreat(unit, status, r, g, b) local parent = self:GetParent() - if unit and parent.isNamePlate and unit:sub(1, 9) ~= "nameplate" then - local isUnit = parent.unit and UnitIsUnit(parent.unit, unit) - if isUnit then - unit = parent.unit - end - end if (parent.unit ~= unit) or not unit then return end local db = parent.db