add nameplate trigger/anchor with awesome wotlk

This commit is contained in:
NoM0Re
2024-06-29 18:33:34 +02:00
parent 58c9953264
commit 909f61f102
14 changed files with 379 additions and 22 deletions
+23 -1
View File
@@ -360,6 +360,28 @@ local function staggerCoefficient(alignment, stagger)
end
local anchorers = {
["NAMEPLATE"] = function(data)
return function(frames, activeRegions)
for _, regionData in ipairs(activeRegions) do
local unit = regionData.region.state and regionData.region.state.unit
local found
if unit then
local frame = WeakAuras.GetUnitNameplate(unit)
if frame then
frames[frame] = frames[frame] or {}
tinsert(frames[frame], regionData)
found = true
end
end
--if not found and WeakAuras.IsOptionsOpen() and regionData.region.state then
-- Private.ensurePRDFrame()
-- Private.personalRessourceDisplayFrame:anchorFrame(regionData.region.state.id, "NAMEPLATE")
-- frames[Private.personalRessourceDisplayFrame] = frames[Private.personalRessourceDisplayFrame] or {}
-- tinsert(frames[Private.personalRessourceDisplayFrame], regionData)
--end
end
end
end,
["UNITFRAME"] = function(data)
return function(frames, activeRegions)
for _, regionData in ipairs(activeRegions) do
@@ -389,7 +411,7 @@ local anchorers = {
}
local function createAnchorPerUnitFunc(data)
local anchorer = anchorers[data.anchorPerUnit] or anchorers.UNITFRAME
local anchorer = anchorers[data.anchorPerUnit] or anchorers.NAMEPLATE or anchorers.UNITFRAME
return anchorer(data)
end