mirror of
https://github.com/Bluewhale1337/ElvUIModernized.git
synced 2026-07-27 08:24:44 +00:00
Show aura config on player without throwing errors
This commit is contained in:
@@ -21,6 +21,11 @@ G["classtimer"] = {}
|
|||||||
|
|
||||||
G["nameplates"] = {}
|
G["nameplates"] = {}
|
||||||
|
|
||||||
|
G["unitframe"] = {
|
||||||
|
["specialFilters"] = {},
|
||||||
|
["aurafilters"] = {}
|
||||||
|
}
|
||||||
|
|
||||||
G["chat"] = {
|
G["chat"] = {
|
||||||
["classColorMentionExcludedNames"] = {}
|
["classColorMentionExcludedNames"] = {}
|
||||||
}
|
}
|
||||||
|
|||||||
+97
-98
@@ -340,53 +340,53 @@ local function GetOptionsTable_AuraBars(friendlyOnly, updateFunc, groupName)
|
|||||||
updateFunc(UF, groupName)
|
updateFunc(UF, groupName)
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
config.args.filters.args.filterPriority = {
|
-- config.args.filters.args.filterPriority = {
|
||||||
order = 22,
|
-- order = 22,
|
||||||
dragdrop = true,
|
-- dragdrop = true,
|
||||||
type = "multiselect",
|
-- type = "multiselect",
|
||||||
name = L["Filter Priority"],
|
-- name = L["Filter Priority"],
|
||||||
dragOnLeave = function() end, --keep this here
|
-- dragOnLeave = function() end, --keep this here
|
||||||
dragOnEnter = function(info, value)
|
-- dragOnEnter = function(info, value)
|
||||||
carryFilterTo = info.obj.value
|
-- carryFilterTo = info.obj.value
|
||||||
end,
|
-- end,
|
||||||
dragOnMouseDown = function(info, value)
|
-- dragOnMouseDown = function(info, value)
|
||||||
carryFilterFrom, carryFilterTo = info.obj.value, nil
|
-- carryFilterFrom, carryFilterTo = info.obj.value, nil
|
||||||
end,
|
-- end,
|
||||||
dragOnMouseUp = function(info, value)
|
-- dragOnMouseUp = function(info, value)
|
||||||
filterPriority("aurabar", groupName, carryFilterTo, nil, carryFilterFrom) --add it in the new spot
|
-- filterPriority("aurabar", groupName, carryFilterTo, nil, carryFilterFrom) --add it in the new spot
|
||||||
carryFilterFrom, carryFilterTo = nil, nil
|
-- carryFilterFrom, carryFilterTo = nil, nil
|
||||||
end,
|
-- end,
|
||||||
dragOnClick = function(info, value)
|
-- dragOnClick = function(info, value)
|
||||||
filterPriority("aurabar", groupName, carryFilterFrom, true)
|
-- filterPriority("aurabar", groupName, carryFilterFrom, true)
|
||||||
end,
|
-- end,
|
||||||
stateSwitchGetText = function(button, text, value)
|
-- stateSwitchGetText = function(button, text, value)
|
||||||
local friend, enemy = match(text, "^Friendly:([^,]*)"), match(text, "^Enemy:([^,]*)")
|
-- local friend, enemy = match(text, "^Friendly:([^,]*)"), match(text, "^Enemy:([^,]*)")
|
||||||
return (friend and format("|cFF33FF33%s|r %s", L["Friend"], friend)) or (enemy and format("|cFFFF3333%s|r %s", L["Enemy"], enemy))
|
-- return (friend and format("|cFF33FF33%s|r %s", L["Friend"], friend)) or (enemy and format("|cFFFF3333%s|r %s", L["Enemy"], enemy))
|
||||||
end,
|
-- end,
|
||||||
stateSwitchOnClick = function(info, value)
|
-- stateSwitchOnClick = function(info, value)
|
||||||
filterPriority("aurabar", groupName, carryFilterFrom, nil, nil, true)
|
-- filterPriority("aurabar", groupName, carryFilterFrom, nil, nil, true)
|
||||||
end,
|
-- end,
|
||||||
values = function()
|
-- values = function()
|
||||||
local str = E.db.unitframe.units[groupName].aurabar.priority
|
-- local str = E.db.unitframe.units[groupName].aurabar.priority
|
||||||
if str == "" then return nil end
|
-- if str == "" then return nil end
|
||||||
return {strsplit(",",str)}
|
-- return {strsplit(",",str)}
|
||||||
end,
|
-- end,
|
||||||
get = function(info, value)
|
-- get = function(info, value)
|
||||||
local str = E.db.unitframe.units[groupName].aurabar.priority
|
-- local str = E.db.unitframe.units[groupName].aurabar.priority
|
||||||
if str == "" then return nil end
|
-- if str == "" then return nil end
|
||||||
local tbl = {strsplit(",",str)}
|
-- local tbl = {strsplit(",",str)}
|
||||||
return tbl[value]
|
-- return tbl[value]
|
||||||
end,
|
-- end,
|
||||||
set = function(info, value)
|
-- set = function(info, value)
|
||||||
E.db.unitframe.units[groupName].aurabar[ info[getn(info)] ] = nil -- this was being set when drag and drop was first added, setting it to nil to clear tester profiles of this variable
|
-- E.db.unitframe.units[groupName].aurabar[ info[getn(info)] ] = nil -- this was being set when drag and drop was first added, setting it to nil to clear tester profiles of this variable
|
||||||
updateFunc(UF, groupName)
|
-- updateFunc(UF, groupName)
|
||||||
end
|
-- end
|
||||||
}
|
-- }
|
||||||
config.args.filters.args.spacer1 = {
|
-- config.args.filters.args.spacer1 = {
|
||||||
order = 23,
|
-- order = 23,
|
||||||
type = "description",
|
-- type = "description",
|
||||||
name = L["Use drag and drop to rearrange filter priority or right click to remove a filter."].."\n"..L["Use Shift+LeftClick to toggle between friendly or enemy or normal state. Normal state will allow the filter to be checked on all units. Friendly state is for friendly units only and enemy state is for enemy units."],
|
-- name = L["Use drag and drop to rearrange filter priority or right click to remove a filter."].."\n"..L["Use Shift+LeftClick to toggle between friendly or enemy or normal state. Normal state will allow the filter to be checked on all units. Friendly state is for friendly units only and enemy state is for enemy units."],
|
||||||
}
|
-- }
|
||||||
|
|
||||||
return config
|
return config
|
||||||
end
|
end
|
||||||
@@ -589,53 +589,53 @@ local function GetOptionsTable_Auras(friendlyUnitOnly, auraType, isGroupFrame, u
|
|||||||
updateFunc(UF, groupName, numUnits)
|
updateFunc(UF, groupName, numUnits)
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
config.args.filters.args.filterPriority = {
|
-- config.args.filters.args.filterPriority = {
|
||||||
order = 22,
|
-- order = 22,
|
||||||
dragdrop = true,
|
-- dragdrop = true,
|
||||||
type = "multiselect",
|
-- type = "multiselect",
|
||||||
name = L["Filter Priority"],
|
-- name = L["Filter Priority"],
|
||||||
dragOnLeave = function() end, --keep this here
|
-- dragOnLeave = function() end, --keep this here
|
||||||
dragOnEnter = function(info, value)
|
-- dragOnEnter = function(info, value)
|
||||||
carryFilterTo = info.obj.value
|
-- carryFilterTo = info.obj.value
|
||||||
end,
|
-- end,
|
||||||
dragOnMouseDown = function(info, value)
|
-- dragOnMouseDown = function(info, value)
|
||||||
carryFilterFrom, carryFilterTo = info.obj.value, nil
|
-- carryFilterFrom, carryFilterTo = info.obj.value, nil
|
||||||
end,
|
-- end,
|
||||||
dragOnMouseUp = function(info, value)
|
-- dragOnMouseUp = function(info, value)
|
||||||
filterPriority(auraType, groupName, carryFilterTo, nil, carryFilterFrom) --add it in the new spot
|
-- filterPriority(auraType, groupName, carryFilterTo, nil, carryFilterFrom) --add it in the new spot
|
||||||
carryFilterFrom, carryFilterTo = nil, nil
|
-- carryFilterFrom, carryFilterTo = nil, nil
|
||||||
end,
|
-- end,
|
||||||
dragOnClick = function(info, value)
|
-- dragOnClick = function(info, value)
|
||||||
filterPriority(auraType, groupName, carryFilterFrom, true)
|
-- filterPriority(auraType, groupName, carryFilterFrom, true)
|
||||||
end,
|
-- end,
|
||||||
stateSwitchGetText = function(button, text, value)
|
-- stateSwitchGetText = function(button, text, value)
|
||||||
local friend, enemy = match(text, "^Friendly:([^,]*)"), match(text, "^Enemy:([^,]*)")
|
-- local friend, enemy = match(text, "^Friendly:([^,]*)"), match(text, "^Enemy:([^,]*)")
|
||||||
return (friend and format("|cFF33FF33%s|r %s", L["Friend"], friend)) or (enemy and format("|cFFFF3333%s|r %s", L["Enemy"], enemy))
|
-- return (friend and format("|cFF33FF33%s|r %s", L["Friend"], friend)) or (enemy and format("|cFFFF3333%s|r %s", L["Enemy"], enemy))
|
||||||
end,
|
-- end,
|
||||||
stateSwitchOnClick = function(info, value)
|
-- stateSwitchOnClick = function(info, value)
|
||||||
filterPriority(auraType, groupName, carryFilterFrom, nil, nil, true)
|
-- filterPriority(auraType, groupName, carryFilterFrom, nil, nil, true)
|
||||||
end,
|
-- end,
|
||||||
values = function()
|
-- values = function()
|
||||||
local str = E.db.unitframe.units[groupName][auraType].priority
|
-- local str = E.db.unitframe.units[groupName][auraType].priority
|
||||||
if str == "" then return nil end
|
-- if str == "" then return nil end
|
||||||
return {strsplit(",",str)}
|
-- return {strsplit(",",str)}
|
||||||
end,
|
-- end,
|
||||||
get = function(info, value)
|
-- get = function(info, value)
|
||||||
local str = E.db.unitframe.units[groupName][auraType].priority
|
-- local str = E.db.unitframe.units[groupName][auraType].priority
|
||||||
if str == "" then return nil end
|
-- if str == "" then return nil end
|
||||||
local tbl = {strsplit(",",str)}
|
-- local tbl = {strsplit(",",str)}
|
||||||
return tbl[value]
|
-- return tbl[value]
|
||||||
end,
|
-- end,
|
||||||
set = function(info, value)
|
-- set = function(info, value)
|
||||||
E.db.unitframe.units[groupName][auraType][ info[getn(info)] ] = nil -- this was being set when drag and drop was first added, setting it to nil to clear tester profiles of this variable
|
-- E.db.unitframe.units[groupName][auraType][ info[getn(info)] ] = nil -- this was being set when drag and drop was first added, setting it to nil to clear tester profiles of this variable
|
||||||
updateFunc(UF, groupName, numUnits)
|
-- updateFunc(UF, groupName, numUnits)
|
||||||
end
|
-- end
|
||||||
}
|
-- }
|
||||||
config.args.filters.args.spacer1 = {
|
-- config.args.filters.args.spacer1 = {
|
||||||
order = 23,
|
-- order = 23,
|
||||||
type = "description",
|
-- type = "description",
|
||||||
name = L["Use drag and drop to rearrange filter priority or right click to remove a filter."].."\n"..L["Use Shift+LeftClick to toggle between friendly or enemy or normal state. Normal state will allow the filter to be checked on all units. Friendly state is for friendly units only and enemy state is for enemy units."],
|
-- name = L["Use drag and drop to rearrange filter priority or right click to remove a filter."].."\n"..L["Use Shift+LeftClick to toggle between friendly or enemy or normal state. Normal state will allow the filter to be checked on all units. Friendly state is for friendly units only and enemy state is for enemy units."],
|
||||||
}
|
-- }
|
||||||
|
|
||||||
return config
|
return config
|
||||||
end
|
end
|
||||||
@@ -861,7 +861,6 @@ local function GetOptionsTable_Castbar(hasTicks, updateFunc, groupName, numUnits
|
|||||||
return config
|
return config
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
local function GetOptionsTable_InformationPanel(updateFunc, groupName, numUnits)
|
local function GetOptionsTable_InformationPanel(updateFunc, groupName, numUnits)
|
||||||
|
|
||||||
local config = {
|
local config = {
|
||||||
@@ -2734,10 +2733,10 @@ E.Options.args.unitframe.args.player = {
|
|||||||
power = GetOptionsTable_Power(true, UF.CreateAndUpdateUF, "player", nil, true),
|
power = GetOptionsTable_Power(true, UF.CreateAndUpdateUF, "player", nil, true),
|
||||||
name = GetOptionsTable_Name(UF.CreateAndUpdateUF, "player"),
|
name = GetOptionsTable_Name(UF.CreateAndUpdateUF, "player"),
|
||||||
portrait = GetOptionsTable_Portrait(UF.CreateAndUpdateUF, "player"),
|
portrait = GetOptionsTable_Portrait(UF.CreateAndUpdateUF, "player"),
|
||||||
--buffs = GetOptionsTable_Auras(true, "buffs", false, UF.CreateAndUpdateUF, "player"),
|
buffs = GetOptionsTable_Auras(true, "buffs", false, UF.CreateAndUpdateUF, "player"),
|
||||||
--debuffs = GetOptionsTable_Auras(true, "debuffs", false, UF.CreateAndUpdateUF, "player"),
|
debuffs = GetOptionsTable_Auras(true, "debuffs", false, UF.CreateAndUpdateUF, "player"),
|
||||||
castbar = GetOptionsTable_Castbar(true, UF.CreateAndUpdateUF, "player"),
|
castbar = GetOptionsTable_Castbar(true, UF.CreateAndUpdateUF, "player"),
|
||||||
--aurabar = GetOptionsTable_AuraBars(true, UF.CreateAndUpdateUF, "player"),
|
aurabar = GetOptionsTable_AuraBars(true, UF.CreateAndUpdateUF, "player"),
|
||||||
raidicon = GetOptionsTable_RaidIcon(UF.CreateAndUpdateUF, "player"),
|
raidicon = GetOptionsTable_RaidIcon(UF.CreateAndUpdateUF, "player"),
|
||||||
classbar = {
|
classbar = {
|
||||||
order = 1000,
|
order = 1000,
|
||||||
|
|||||||
Reference in New Issue
Block a user