option to invert raidframes and show missing hp

This commit is contained in:
shagu
2016-10-19 22:24:26 +02:00
parent 55db423606
commit 36bc7248bd
4 changed files with 30 additions and 2 deletions
+11 -1
View File
@@ -243,6 +243,10 @@ pfUI:RegisterModule("thirdparty", function ()
local healed = HealComm:getHeal(UnitName(unit))
local health, maxHealth = UnitHealth(unit), UnitHealthMax(unit)
if strsub(unit,0,4) == "raid" and pfUI_config.unitframes.raid.invert_healthbar == "1" then
health = maxHealth - health
end
if( healed > 0 and (health < maxHealth or OVERHEALPERCENT > 0 )) and frame:IsVisible() then
frame.incHeal:Show()
local healthWidth = frame:GetWidth() * (health / maxHealth)
@@ -252,7 +256,13 @@ pfUI:RegisterModule("thirdparty", function ()
end
frame.incHeal:SetWidth(incWidth)
frame.incHeal:ClearAllPoints()
frame.incHeal:SetPoint("TOPLEFT", frame, "TOPLEFT", healthWidth-3, -3)
if strsub(unit,0,4) == "raid" and pfUI_config.unitframes.raid.invert_healthbar == "1" then
frame.incHeal:SetPoint("TOPLEFT", frame, "TOPLEFT", 3, -3)
frame.incHeal:SetFrameStrata("HIGH")
else
frame.incHeal:SetPoint("TOPLEFT", frame, "TOPLEFT", healthWidth-3, -3)
end
else
frame.incHeal:Hide()
end