Libs/oUF: Nameplates now have native UNIT events
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user