mirror of
https://github.com/brues-code/pfUI.git
synced 2026-09-27 18:06:02 +00:00
unitframes: add option to always show self in raid
This commit is contained in:
+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
|
||||
|
||||
Reference in New Issue
Block a user