Commit 7001a4df authored by Blazeflack's avatar Blazeflack

Fixed the 3 new health tags so they properly hide when unit is a ghost....

Fixed the 3 new health tags so they properly hide when unit is a ghost. Renamed from "hidezero" to "hidedead"
parent e5d42ae4
......@@ -149,13 +149,13 @@ ElvUF.Tags.Methods["health:current-percent:hidefull"] = function(unit)
return String
end
ElvUF.Tags.Events["health:percent:hidefull:hidezero"] = "UNIT_HEALTH_FREQUENT UNIT_MAXHEALTH UNIT_CONNECTION"
ElvUF.Tags.Methods["health:percent:hidefull:hidezero"] = function(unit)
ElvUF.Tags.Events["health:percent:hidefull:hidedead"] = "UNIT_HEALTH_FREQUENT UNIT_MAXHEALTH UNIT_CONNECTION"
ElvUF.Tags.Methods["health:percent:hidefull:hidedead"] = function(unit)
local min, max = UnitHealth(unit), UnitHealthMax(unit)
local deficit = max - min
local String
if (deficit <= 0) or (min == 0) then
if (deficit <= 0) or (min == 0) or (UnitIsGhost(unit)) then
String = ""
else
String = GetFormattedText(min, max, "PERCENT", true)
......@@ -164,13 +164,13 @@ ElvUF.Tags.Methods["health:percent:hidefull:hidezero"] = function(unit)
return String
end
ElvUF.Tags.Events["health:current:hidefull:hidezero"] = "UNIT_HEALTH_FREQUENT UNIT_MAXHEALTH"
ElvUF.Tags.Methods["health:current:hidefull:hidezero"] = function(unit)
ElvUF.Tags.Events["health:current:hidefull:hidedead"] = "UNIT_HEALTH_FREQUENT UNIT_MAXHEALTH"
ElvUF.Tags.Methods["health:current:hidefull:hidedead"] = function(unit)
local min, max = UnitHealth(unit), UnitHealthMax(unit)
local deficit = max - min
local String
if (deficit <= 0) or (min == 0) then
if (deficit <= 0) or (min == 0) or (UnitIsGhost(unit)) then
String = ""
else
String = GetFormattedText(min, max, "CURRENT", true)
......@@ -179,13 +179,13 @@ ElvUF.Tags.Methods["health:current:hidefull:hidezero"] = function(unit)
return String
end
ElvUF.Tags.Events["health:current-percent:hidefull:hidezero"] = "UNIT_HEALTH_FREQUENT UNIT_MAXHEALTH"
ElvUF.Tags.Methods["health:current-percent:hidefull:hidezero"] = function(unit)
ElvUF.Tags.Events["health:current-percent:hidefull:hidedead"] = "UNIT_HEALTH_FREQUENT UNIT_MAXHEALTH"
ElvUF.Tags.Methods["health:current-percent:hidefull:hidedead"] = function(unit)
local min, max = UnitHealth(unit), UnitHealthMax(unit)
local deficit = max - min
local String
if (deficit <= 0) or (min == 0) then
if (deficit <= 0) or (min == 0) or (UnitIsGhost(unit)) then
String = ""
else
String = GetFormattedText(min, max, "CURRENT_PERCENT", true)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment