From 5d522900e29cd04ca26ecd29dd100dab7b207d61 Mon Sep 17 00:00:00 2001 From: NoM0Re Date: Fri, 17 Jan 2025 16:16:28 +0100 Subject: [PATCH] tweak non awesome wotlk imports some more --- WeakAuras/WeakAuras.lua | 36 +++++++++++++++++++++++++----------- 1 file changed, 25 insertions(+), 11 deletions(-) diff --git a/WeakAuras/WeakAuras.lua b/WeakAuras/WeakAuras.lua index 51522e5..f7234b8 100644 --- a/WeakAuras/WeakAuras.lua +++ b/WeakAuras/WeakAuras.lua @@ -2315,17 +2315,31 @@ local function removeSpellNames(data) end end -local function removeNameplateUnits(data) - for _, triggerData in ipairs(data.triggers) do - local trigger = triggerData.trigger - if trigger and trigger.type == "unit" then - if trigger.unit == "nameplate" then - trigger.unit = "target" - elseif trigger.threatUnit == "nameplate" then - trigger.threatUnit = "target" - end - end +local function removeNameplateUnitsAndAnchors(data) + -- Dynamic Group Anchor + if data.useAnchorPerUnit == true and data.anchorPerUnit == "NAMEPLATE" then + data.useAnchorPerUnit = false + data.anchorPerUnit = "CUSTOM" + end + -- Aura Anchor + if data.anchorFrameType == "NAMEPLATE" then + data.anchorFrameType = "SCREEN" + end + -- Action Glow Anchor + if data.actions and data.actions.start and data.actions.start.glow_frame_type == "NAMEPLATE" then + data.actions.start.glow_frame_type = "FRAMESELECTOR" + end + -- Trigger units + for _, triggerData in ipairs(data.triggers) do + local trigger = triggerData.trigger + if trigger and trigger.type == "unit" then + if trigger.unit == "nameplate" then + trigger.unit = "target" + elseif trigger.threatUnit == "nameplate" then + trigger.threatUnit = "target" + end end + end end local oldDataStub = { @@ -2525,7 +2539,7 @@ function WeakAuras.PreAdd(data) validateUserConfig(data, data.authorOptions, data.config) removeSpellNames(data) if not(WeakAuras.isAwesomeEnabled()) then - removeNameplateUnits(data) + removeNameplateUnitsAndAnchors(data) end data.init_started = nil data.init_completed = nil