(fix/GenericTrigger): change nameplate detection object from WatchNameplates
- Fixes #80 Replaces the nameplate overlay texture with the border texture in nameplate detection logic to improve compatibility. (cherry picked from commit a39f956b11a624da84d802871b7476b8bad55d8d)
This commit is contained in:
@@ -3882,7 +3882,7 @@ do
|
||||
local nameplateList = {}
|
||||
local visibleNameplates = {}
|
||||
|
||||
local OVERLAY = [=[Interface\TargetingFrame\UI-TargetingFrame-Flash]=]
|
||||
local BORDER = [=[Interface\Tooltips\Nameplate-Border]=]
|
||||
local FSPAT = "%s*"..(gsub(gsub(FOREIGN_SERVER_LABEL, "^%s", ""), "[%*()]", "%%%1")).."$"
|
||||
|
||||
local function nameplateShow(self)
|
||||
@@ -3903,8 +3903,8 @@ do
|
||||
local function findNewPlate(...)
|
||||
for i = lastChildern + 1, numChildren do
|
||||
local frame = select(i, ...)
|
||||
local region, _, _, _, _, _, nameText = frame:GetRegions()
|
||||
if (frame.UnitFrame or (region and region:GetObjectType() == "Texture" and region:GetTexture() == OVERLAY)) and not nameplateList[frame] then
|
||||
local _, border, _, _, _, _, nameText = frame:GetRegions()
|
||||
if (frame.UnitFrame or (border and border:GetObjectType() == "Texture" and border:GetTexture() == BORDER)) and not nameplateList[frame] then
|
||||
frame.nameText = nameText
|
||||
frame:HookScript("OnShow", nameplateShow)
|
||||
frame:HookScript("OnHide", nameplateHide)
|
||||
|
||||
Reference in New Issue
Block a user