more changes to np

This commit is contained in:
NoM0Re
2024-06-30 19:24:25 +02:00
parent 5521af916a
commit 55939acfe0
7 changed files with 19 additions and 15 deletions
+2 -2
View File
@@ -115,8 +115,8 @@ WeakAuras.HideOverlayGlow = LCG.ButtonGlow_Stop
local LGF = LibStub("LibGetFrame-1.0")
WeakAuras.GetUnitFrame = LGF.GetUnitFrame
WeakAuras.GetUnitNameplate = function(unit)
if (Private.multiUnitUnits.nameplate[unit] and UnitName(unit) ~= WeakAuras.me) then
WeakAuras.GetNamePlateForUnit = function(unit)
if Private.multiUnitUnits.nameplate[unit] then
return LGF.GetUnitNameplate(unit)
end
end
+11
View File
@@ -287,6 +287,17 @@ function Private.Modernize(data)
-- Version 18 was a migration for stance/form trigger, but deleted later because of migration issue
-- Version 19 were introduced in July 2019 in BfA
if data.internalVersion < 19 then
if data.triggers then
for triggerId, triggerData in ipairs(data.triggers) do
if triggerData.trigger.type == "status" and triggerData.trigger.event == "Cast" and triggerData.trigger.unit == "multi" then
triggerData.trigger.unit = "nameplate"
end
end
end
end
-- Version 20 was introduced July 2019 in BfA
if data.internalVersion < 20 then
if data.regionType == "icon" then
+1 -1
View File
@@ -366,7 +366,7 @@ local anchorers = {
local unit = regionData.region.state and regionData.region.state.unit
local found
if unit then
local frame = WeakAuras.GetUnitNameplate(unit)
local frame = WeakAuras.GetNamePlateForUnit(unit)
if frame then
frames[frame] = frames[frame] or {}
tinsert(frames[frame], regionData)
+2 -2
View File
@@ -2860,7 +2860,7 @@ function Private.HandleGlowAction(actions, region)
elseif actions.glow_frame_type == "UNITFRAME" and region.state.unit then
glow_frame = WeakAuras.GetUnitFrame(region.state.unit)
elseif actions.glow_frame_type == "NAMEPLATE" and region.state.unit then
glow_frame = WeakAuras.GetUnitNameplate(region.state.unit)
glow_frame = WeakAuras.GetNamePlateForUnit(region.state.unit)
end
if glow_frame then
@@ -4402,7 +4402,7 @@ local function GetAnchorFrame(data, region, parent)
if (anchorFrameType == "NAMEPLATE") then
local unit = region.state and region.state.unit
if unit then
local frame = unit and WeakAuras.GetUnitNameplate(unit)
local frame = unit and WeakAuras.GetNamePlateForUnit(unit)
if frame then return frame end
end
--if WeakAuras.IsOptionsOpen() then
+1 -4
View File
@@ -263,10 +263,7 @@ function OptionsPrivate.GetActionOptions(data)
end,
name = L["Glow Frame Type"],
order = 10.3,
values = {
UNITFRAME = L["Unit Frame"],
FRAMESELECTOR = L["Frame Selector"]
},
values = OptionsPrivate.Private.glow_frame_types,
hidden = function()
return not data.actions.start.do_glow
or data.actions.start.glow_action == nil
+1 -1
View File
@@ -812,7 +812,7 @@ local function GetBuffTriggerOptions(data, triggernum)
name = L["Ignore Self"],
order = 69.35,
width = WeakAuras.doubleWidth,
hidden = function() return not (trigger.type == "aura2" and (trigger.unit == "group" or trigger.unit == "raid" or trigger.unit == "party")) end
hidden = function() return not (trigger.type == "aura2" and (trigger.unit == "group" or trigger.unit == "raid" or trigger.unit == "party" or trigger.unit == "nameplate")) end
},
ignoreDead = {
+1 -5
View File
@@ -1055,11 +1055,7 @@ local function addControlsForChange(args, order, data, conditionVariable, totalA
values = OptionsPrivate.Private.glow_frame_types,
width = WeakAuras.normalWidth,
name = blueIfNoValue2(data, conditions[i].changes[j], "value", "glow_frame_type", L["Glow Frame Type"], L["Glow Frame Type"]),
desc = descIfNoValue2(data, conditions[i].changes[j], "value", "glow_frame_type", propertyType, {
UNITFRAME = L["Unit Frame"],
NAMEPLATE = L["Nameplate"],
FRAMESELECTOR = L["Frame Selector"]
}),
desc = descIfNoValue2(data, conditions[i].changes[j], "value", "glow_frame_type", propertyType, OptionsPrivate.Private.glow_frame_types),
order = order,
get = function()
return type(conditions[i].changes[j].value) == "table" and conditions[i].changes[j].value.glow_frame_type;