from retail
This commit is contained in:
@@ -798,10 +798,14 @@ local function GetBuffTriggerOptions(data, triggernum)
|
||||
useHostility = {
|
||||
type = "toggle",
|
||||
width = WeakAuras.normalWidth,
|
||||
name = L["Filter by Nameplate Type"],
|
||||
name = L["Filter by Hostility"],
|
||||
order = 69.1,
|
||||
hidden = function() return
|
||||
not (trigger.type == "aura2" and trigger.unit == "nameplate")
|
||||
hidden = function()
|
||||
return not (trigger.type == "aura2"
|
||||
and (trigger.unit == "group"
|
||||
or trigger.unit == "raid"
|
||||
or trigger.unit == "party"
|
||||
or trigger.unit == "nameplate"))
|
||||
end
|
||||
},
|
||||
hostility = {
|
||||
@@ -809,7 +813,14 @@ local function GetBuffTriggerOptions(data, triggernum)
|
||||
width = WeakAuras.normalWidth,
|
||||
name = L["Hostility"],
|
||||
values = OptionsPrivate.Private.hostility_types,
|
||||
hidden = function() return not (trigger.type == "aura2" and trigger.useHostility) end,
|
||||
hidden = function()
|
||||
return not (trigger.type == "aura2"
|
||||
and trigger.useHostility
|
||||
and (trigger.unit == "group"
|
||||
or trigger.unit == "raid"
|
||||
or trigger.unit == "party"
|
||||
or trigger.unit == "nameplate"))
|
||||
end,
|
||||
order = 69.2
|
||||
},
|
||||
hostilitySpace = {
|
||||
@@ -817,7 +828,14 @@ local function GetBuffTriggerOptions(data, triggernum)
|
||||
name = "",
|
||||
order = 69.3,
|
||||
width = WeakAuras.normalWidth,
|
||||
hidden = function() return not (trigger.type == "aura2" and trigger.unit == "nameplate" and not trigger.useHostility) end
|
||||
hidden = function()
|
||||
return not (trigger.type == "aura2"
|
||||
and not trigger.useHostility
|
||||
and (trigger.unit == "group"
|
||||
or trigger.unit == "raid"
|
||||
or trigger.unit == "party"
|
||||
or trigger.unit == "nameplate"))
|
||||
end
|
||||
},
|
||||
|
||||
useNpcId = {
|
||||
|
||||
@@ -92,7 +92,7 @@ function spellCache.GetIcon(name)
|
||||
if (icons) then
|
||||
if (icons.spells) then
|
||||
for spellId, icon in pairs(icons.spells) do
|
||||
if not bestMatch or (type(spellId) == "number" and IsSpellKnown(spellId)) then
|
||||
if not bestMatch or (type(spellId) == "number" and spellId ~= 0 and IsSpellKnown(spellId)) then
|
||||
bestMatch = spellId
|
||||
end
|
||||
end
|
||||
|
||||
@@ -16,6 +16,23 @@ local frameChooserBox
|
||||
|
||||
local oldFocus
|
||||
local oldFocusName
|
||||
|
||||
-- if frame doesn't have a name, try to use the key from it's parent
|
||||
local function recurseGetName(frame)
|
||||
local name = frame.GetName and frame:GetName() or nil
|
||||
if name then
|
||||
return name
|
||||
end
|
||||
local parent = frame.GetParent and frame:GetParent()
|
||||
if parent then
|
||||
for key, child in pairs(parent) do
|
||||
if child == frame then
|
||||
return (recurseGetName(parent) or "") .. "." .. key
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function OptionsPrivate.StartFrameChooser(data, path)
|
||||
local frame = OptionsPrivate.Private.OptionsFrame();
|
||||
if not(frameChooserFrame) then
|
||||
@@ -46,7 +63,7 @@ function OptionsPrivate.StartFrameChooser(data, path)
|
||||
local focusName;
|
||||
|
||||
if(focus) then
|
||||
focusName = focus:GetName();
|
||||
focusName = recurseGetName(focus)
|
||||
if(focusName == "WorldFrame" or not focusName) then
|
||||
focusName = nil;
|
||||
local focusIsGroup = false;
|
||||
|
||||
@@ -975,6 +975,13 @@ function OptionsPrivate.CreateFrame()
|
||||
end
|
||||
end
|
||||
|
||||
frame.ReloadOptions = function(self)
|
||||
if self.pickedDisplay then
|
||||
self:ClearAndUpdateOptions(self.pickedDisplay, true)
|
||||
self:FillOptions()
|
||||
end
|
||||
end
|
||||
|
||||
frame.ClearAndUpdateOptions = function(self, id, clearChildren)
|
||||
frame:ClearOptions(id)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user