General Updates and fixed (see commit description)

- Added the 'Remove Battleground Segments' option to the menu that opens when hovering over the erase button.
- Attempt to fix Battleground faction icons, shown on enemy players damage bars.
- Fixed custom scripts showing the damage text too close to the dps text.
- Lib OpenRaid updated.
- Framework Updated.
This commit is contained in:
Tercio Jose
2023-12-21 14:34:21 -03:00
parent 0bd0343034
commit 2efc5a58f8
9 changed files with 116 additions and 32 deletions
+55 -1
View File
@@ -1,6 +1,6 @@
local dversion = 493
local dversion = 495
local major, minor = "DetailsFramework-1.0", dversion
local DF, oldminor = LibStub:NewLibrary(major, minor)
@@ -523,6 +523,60 @@ function DF.table.find(t, value)
end
end
function DF:GetParentKeyPath(object)
local parentKey = object:GetParentKey()
if (not parentKey) then
return ""
end
local path = "" .. parentKey
local parent = object:GetParent()
while (parent) do
parentKey = parent:GetParentKey()
if (parentKey) then
path = parentKey .. "." .. path
else
return path
end
parent = parent:GetParent()
end
return path
end
function DF:GetParentNamePath(object)
local parent = object
local path = ""
while (parent) do
local parentName = parent:GetName()
if (not parentName) then
local parentOfParent = parent:GetParent()
if (parentOfParent) then
local parentKey = parentOfParent:GetParentKey()
if (parentKey) then
parentName = parentKey
else
return path:gsub("%.$", "")
end
end
end
if (parentName) then
path = parentName .. "." .. path
else
return path:gsub("%.$", "")
end
parent = parent:GetParent()
end
return path:gsub("%.$", "")
end
---get a value from a table using a path, e.g. getfrompath(tbl, "a.b.c") is the same as tbl.a.b.c
---@param t table
---@param path string