mirror of
https://github.com/brues-code/pfUI.git
synced 2026-09-29 18:56:02 +00:00
unitframes: add option to always show self in raid
This commit is contained in:
@@ -179,6 +179,7 @@ function pfUI:LoadConfig()
|
||||
pfUI:UpdateConfig("unitframes", nil, "abbrevnum", "1")
|
||||
|
||||
pfUI:UpdateConfig("unitframes", nil, "selfingroup", "0")
|
||||
pfUI:UpdateConfig("unitframes", nil, "selfinraid", "0")
|
||||
pfUI:UpdateConfig("unitframes", nil, "raidforgroup", "0")
|
||||
pfUI:UpdateConfig("unitframes", nil, "show_hots", "0")
|
||||
pfUI:UpdateConfig("unitframes", nil, "all_hots", "0")
|
||||
|
||||
+16
-15
@@ -992,22 +992,23 @@ function pfUI.uf:RefreshUnit(unit, component)
|
||||
|
||||
local C = pfUI_config
|
||||
-- show groupframes as raid
|
||||
if C["unitframes"]["raidforgroup"] == "1" then
|
||||
if strsub(unit:GetName(),0,6) == "pfRaid" then
|
||||
local id = tonumber(strsub(unit:GetName(),7,8))
|
||||
if strsub(unit:GetName(),0,6) == "pfRaid" then
|
||||
local id = tonumber(strsub(unit:GetName(),7,8))
|
||||
|
||||
if not UnitInRaid("player") and GetNumPartyMembers() > 0 then
|
||||
if id == 1 then
|
||||
unit.id = ""
|
||||
unit.label = "player"
|
||||
elseif id <= 5 then
|
||||
unit.id = id - 1
|
||||
unit.label = "party"
|
||||
end
|
||||
elseif unit.label == "party" or unit.label == "player" then
|
||||
unit.id = id
|
||||
unit.label = "raid"
|
||||
if not UnitInRaid("player") and GetNumPartyMembers() == 0 and C.unitframes.selfinraid == "1" and id == 1 then
|
||||
unit.id = ""
|
||||
unit.label = "player"
|
||||
elseif not UnitInRaid("player") and GetNumPartyMembers() > 0 and C.unitframes.raidforgroup == "1" then
|
||||
if id == 1 then
|
||||
unit.id = ""
|
||||
unit.label = "player"
|
||||
elseif id <= 5 then
|
||||
unit.id = id - 1
|
||||
unit.label = "party"
|
||||
end
|
||||
elseif unit.label == "party" or unit.label == "player" then
|
||||
unit.id = id
|
||||
unit.label = "raid"
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1049,7 +1050,7 @@ function pfUI.uf:RefreshUnit(unit, component)
|
||||
|
||||
-- hide self in group if solo or hide in raid is set
|
||||
elseif unit.fname == "Group0" or unit.fname == "PartyPet0" or unit.fname == "Party0Target" then
|
||||
if ( GetNumPartyMembers() <= 0 ) or ( C["unitframes"]["group"]["hide_in_raid"] == "1" and UnitInRaid("player") ) then
|
||||
if ( C["unitframes"]["group"]["hide_in_raid"] == "1" and UnitInRaid("player") ) then
|
||||
unit:Hide()
|
||||
return
|
||||
end
|
||||
|
||||
+3
-2
@@ -1425,9 +1425,10 @@ pfUI:RegisterModule("gui", function ()
|
||||
end)
|
||||
|
||||
CreateGUIEntry(T["Group Frames"], T["General"], function()
|
||||
CreateConfig(U["group"], T["Show Self in Group Frames"], C.unitframes, "selfingroup", "checkbox")
|
||||
CreateConfig(nil, T["Hide Group Frames While In Raid"], C.unitframes.group, "hide_in_raid", "checkbox")
|
||||
CreateConfig(nil, T["Use Raid Frames To Display Group Members"], C.unitframes, "raidforgroup", "checkbox")
|
||||
CreateConfig(nil, T["Always Show Self In Raid Frames"], C.unitframes, "selfinraid", "checkbox")
|
||||
CreateConfig(nil, T["Always Show Self In Group Frames"], C.unitframes, "selfingroup", "checkbox")
|
||||
CreateConfig(nil, T["Hide Group Frames While In Raid"], C.unitframes.group, "hide_in_raid", "checkbox")
|
||||
CreateConfig(nil, T["Show Hots as Buff Indicators"], C.unitframes, "show_hots", "checkbox")
|
||||
CreateConfig(nil, T["Show Hots of all Classes"], C.unitframes, "all_hots", "checkbox")
|
||||
CreateConfig(nil, T["Show Procs as Buff Indicators"], C.unitframes, "show_procs", "checkbox")
|
||||
|
||||
Reference in New Issue
Block a user