Quantcast WoWInterface - View Single Post - Highlight Targeted unit
View Single Post
03-04-18, 03:05 PM   #4
aallkkaa
A Warpwood Thunder Caller
 
aallkkaa's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2017
Posts: 98
It's been years since I worked on a oUF layout, but in this case, I guess it would be as simple as this:
Code:
local oldTarget
local OnSpawnNamePlates = function(self, event, unit)
    if (UnitExists('target') and UnitIsUnit('target', unit)) then
        if oldTarget then
                oldTarget:SetBackdropColor(0, 0, 0, 1)
        end
        self:SetBackdropColor(1, 1, 1, 1)
        oldTarget = self
    else
        self:SetBackdropColor(0, 0, 0, 1)
    end
end

oUF:SpawnNamePlates("mnkNames", OnSpawnNamePlates, cvars)
  Reply With Quote