thirdparty: improve healcomm appearance

This commit is contained in:
shagu
2017-09-19 22:08:55 +02:00
parent a270bd4be1
commit 90f3ec7467
+5 -7
View File
@@ -615,9 +615,6 @@ pfUI:RegisterModule("thirdparty", function ()
local healed = HealComm:getHeal(UnitName(unit))
local health, maxHealth = UnitHealth(unit), UnitHealthMax(unit)
if strsub(unit,0,4) == "raid" and C.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()
@@ -627,14 +624,15 @@ pfUI:RegisterModule("thirdparty", function ()
if healthWidth + incWidth > width * (1+(OVERHEALPERCENT/100)) then
incWidth = width * (1+OVERHEALPERCENT/100) - healthWidth
end
frame.incHeal:SetWidth(incWidth)
frame.incHeal:ClearAllPoints()
frame.incHeal:SetPoint("TOPLEFT", frame.hp.bar, "TOPLEFT", 0, 0)
if strsub(unit,0,4) == "raid" and C.unitframes.raid.invert_healthbar == "1" then
frame.incHeal:SetPoint("TOPLEFT", frame.hp.bar, "TOPLEFT", 0, 0)
if frame.config.invert_healthbar == "1" then
frame.incHeal:SetWidth(incWidth)
frame.incHeal:SetFrameStrata("HIGH")
else
frame.incHeal:SetPoint("TOPLEFT", frame.hp.bar, "TOPLEFT", healthWidth, 0)
frame.incHeal:SetWidth(incWidth + healthWidth)
frame.incHeal:SetFrameStrata("BACKGROUND")
end
else
frame.incHeal:Hide()