more changes to np
This commit is contained in:
@@ -115,8 +115,8 @@ WeakAuras.HideOverlayGlow = LCG.ButtonGlow_Stop
|
|||||||
|
|
||||||
local LGF = LibStub("LibGetFrame-1.0")
|
local LGF = LibStub("LibGetFrame-1.0")
|
||||||
WeakAuras.GetUnitFrame = LGF.GetUnitFrame
|
WeakAuras.GetUnitFrame = LGF.GetUnitFrame
|
||||||
WeakAuras.GetUnitNameplate = function(unit)
|
WeakAuras.GetNamePlateForUnit = function(unit)
|
||||||
if (Private.multiUnitUnits.nameplate[unit] and UnitName(unit) ~= WeakAuras.me) then
|
if Private.multiUnitUnits.nameplate[unit] then
|
||||||
return LGF.GetUnitNameplate(unit)
|
return LGF.GetUnitNameplate(unit)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -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 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
|
-- Version 20 was introduced July 2019 in BfA
|
||||||
if data.internalVersion < 20 then
|
if data.internalVersion < 20 then
|
||||||
if data.regionType == "icon" then
|
if data.regionType == "icon" then
|
||||||
|
|||||||
@@ -366,7 +366,7 @@ local anchorers = {
|
|||||||
local unit = regionData.region.state and regionData.region.state.unit
|
local unit = regionData.region.state and regionData.region.state.unit
|
||||||
local found
|
local found
|
||||||
if unit then
|
if unit then
|
||||||
local frame = WeakAuras.GetUnitNameplate(unit)
|
local frame = WeakAuras.GetNamePlateForUnit(unit)
|
||||||
if frame then
|
if frame then
|
||||||
frames[frame] = frames[frame] or {}
|
frames[frame] = frames[frame] or {}
|
||||||
tinsert(frames[frame], regionData)
|
tinsert(frames[frame], regionData)
|
||||||
|
|||||||
@@ -2860,7 +2860,7 @@ function Private.HandleGlowAction(actions, region)
|
|||||||
elseif actions.glow_frame_type == "UNITFRAME" and region.state.unit then
|
elseif actions.glow_frame_type == "UNITFRAME" and region.state.unit then
|
||||||
glow_frame = WeakAuras.GetUnitFrame(region.state.unit)
|
glow_frame = WeakAuras.GetUnitFrame(region.state.unit)
|
||||||
elseif actions.glow_frame_type == "NAMEPLATE" and region.state.unit then
|
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
|
end
|
||||||
|
|
||||||
if glow_frame then
|
if glow_frame then
|
||||||
@@ -4402,7 +4402,7 @@ local function GetAnchorFrame(data, region, parent)
|
|||||||
if (anchorFrameType == "NAMEPLATE") then
|
if (anchorFrameType == "NAMEPLATE") then
|
||||||
local unit = region.state and region.state.unit
|
local unit = region.state and region.state.unit
|
||||||
if unit then
|
if unit then
|
||||||
local frame = unit and WeakAuras.GetUnitNameplate(unit)
|
local frame = unit and WeakAuras.GetNamePlateForUnit(unit)
|
||||||
if frame then return frame end
|
if frame then return frame end
|
||||||
end
|
end
|
||||||
--if WeakAuras.IsOptionsOpen() then
|
--if WeakAuras.IsOptionsOpen() then
|
||||||
|
|||||||
@@ -263,10 +263,7 @@ function OptionsPrivate.GetActionOptions(data)
|
|||||||
end,
|
end,
|
||||||
name = L["Glow Frame Type"],
|
name = L["Glow Frame Type"],
|
||||||
order = 10.3,
|
order = 10.3,
|
||||||
values = {
|
values = OptionsPrivate.Private.glow_frame_types,
|
||||||
UNITFRAME = L["Unit Frame"],
|
|
||||||
FRAMESELECTOR = L["Frame Selector"]
|
|
||||||
},
|
|
||||||
hidden = function()
|
hidden = function()
|
||||||
return not data.actions.start.do_glow
|
return not data.actions.start.do_glow
|
||||||
or data.actions.start.glow_action == nil
|
or data.actions.start.glow_action == nil
|
||||||
|
|||||||
@@ -812,7 +812,7 @@ local function GetBuffTriggerOptions(data, triggernum)
|
|||||||
name = L["Ignore Self"],
|
name = L["Ignore Self"],
|
||||||
order = 69.35,
|
order = 69.35,
|
||||||
width = WeakAuras.doubleWidth,
|
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 = {
|
ignoreDead = {
|
||||||
|
|||||||
@@ -1055,11 +1055,7 @@ local function addControlsForChange(args, order, data, conditionVariable, totalA
|
|||||||
values = OptionsPrivate.Private.glow_frame_types,
|
values = OptionsPrivate.Private.glow_frame_types,
|
||||||
width = WeakAuras.normalWidth,
|
width = WeakAuras.normalWidth,
|
||||||
name = blueIfNoValue2(data, conditions[i].changes[j], "value", "glow_frame_type", L["Glow Frame Type"], L["Glow Frame Type"]),
|
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, {
|
desc = descIfNoValue2(data, conditions[i].changes[j], "value", "glow_frame_type", propertyType, OptionsPrivate.Private.glow_frame_types),
|
||||||
UNITFRAME = L["Unit Frame"],
|
|
||||||
NAMEPLATE = L["Nameplate"],
|
|
||||||
FRAMESELECTOR = L["Frame Selector"]
|
|
||||||
}),
|
|
||||||
order = order,
|
order = order,
|
||||||
get = function()
|
get = function()
|
||||||
return type(conditions[i].changes[j].value) == "table" and conditions[i].changes[j].value.glow_frame_type;
|
return type(conditions[i].changes[j].value) == "table" and conditions[i].changes[j].value.glow_frame_type;
|
||||||
|
|||||||
Reference in New Issue
Block a user