raid: add toggle tank option to raid frame menu

This commit is contained in:
shagu
2025-06-17 08:57:58 +02:00
parent c772825814
commit 3d60b34385
+6 -4
View File
@@ -113,10 +113,12 @@ pfUI:RegisterModule("raid", "vanilla:tbc", function ()
end)
-- raid popup option to toggle tank role
local iupm = table.getn(UnitPopupMenus["RAID"])
for label, data in pairs(pfUI.uf.raid.tanksfirst) do
UnitPopupButtons[label] = { text = TEXT(data[1]), dist = 0 }
table.insert(UnitPopupMenus["RAID"], iupm-1, label)
for _, menu in pairs({"RAID", "PARTY"}) do
local iupm = table.getn(UnitPopupMenus[menu])
for label, data in pairs(pfUI.uf.raid.tanksfirst) do
UnitPopupButtons[label] = { text = TEXT(data[1]), dist = 0 }
table.insert(UnitPopupMenus[menu], 3, label)
end
end
hooksecurefunc("UnitPopup_OnClick", function()