libnameplate: add support to detect tbc plates

This commit is contained in:
shagu
2021-10-06 23:19:21 +02:00
parent 4fbeaec735
commit ce3f867208
+3 -1
View File
@@ -3,12 +3,14 @@ local GetExpansion = ShaguTweaks.GetExpansion
local GetUnitData = ShaguTweaks.GetUnitData
local NAMEPLATE_OBJECTORDER = { "border", "glow", "name", "level", "levelicon", "raidicon" }
local NAMEPLATE_TYPE = "Button"
if GetExpansion() == "tbc" then
NAMEPLATE_OBJECTORDER = { "border", "castborder", "casticon", "glow", "name", "level", "levelicon", "raidicon" }
NAMEPLATE_TYPE = "Frame"
end
local function IsNamePlate(frame)
if frame:GetObjectType() ~= "Button" then return nil end
if frame:GetObjectType() ~= NAMEPLATE_TYPE then return nil end
regions = frame:GetRegions()
if not regions then return nil end