From 05ccf5652b54f7a256ff97c37f7bc387929d81ef Mon Sep 17 00:00:00 2001 From: shagu Date: Sat, 22 Apr 2017 10:30:41 +0200 Subject: [PATCH] unitframes: only hide units if not unlocked --- api/unitframes.lua | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/api/unitframes.lua b/api/unitframes.lua index a11de539..253420f9 100644 --- a/api/unitframes.lua +++ b/api/unitframes.lua @@ -555,16 +555,18 @@ function pfUI.uf:RefreshUnit(unit, component) unit.lastUnit = UnitName(unit.label .. unit.id) end - if UnitName(unit.label .. unit.id) or (pfUI.gitter and pfUI.gitter:IsShown()) or unit.unitname then - if pfUI_config["unitframes"]["group"]["hide_in_raid"] == "1" and strsub(unit.label,0,5) == "party" and UnitInRaid("player") then - unit:Hide() - elseif strsub(unit.label,0,8) == "partypet" and not UnitIsVisible(unit.label .. unit.id) then - unit:Hide() + if not ( pfUI.gitter and pfUI.gitter:IsShown() ) then + if UnitName(unit.label .. unit.id) or unit.unitname then + if pfUI_config["unitframes"]["group"]["hide_in_raid"] == "1" and strsub(unit.label,0,5) == "party" and UnitInRaid("player") then + unit:Hide() + elseif strsub(unit.label,0,8) == "partypet" and not UnitIsVisible(unit.label .. unit.id) then + unit:Hide() + else + unit:Show() + end else - unit:Show() + unit:Hide() end - else - unit:Hide() end if not unit.cache then unit.cache = {} end