Commit e5d42ae4 authored by Blazeflack's avatar Blazeflack

Rearranged the new tags

parent aec0ce1c
......@@ -119,23 +119,23 @@ ElvUF.Tags.Methods["health: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:current:hidefull"] = "UNIT_HEALTH_FREQUENT UNIT_MAXHEALTH"
ElvUF.Tags.Methods["health:current:hidefull"] = 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 then
String = ""
else
String = GetFormattedText(min, max, "PERCENT", true)
String = GetFormattedText(min, max, "CURRENT", true)
end
return String
end
ElvUF.Tags.Events["health:current:hidefull"] = "UNIT_HEALTH_FREQUENT UNIT_MAXHEALTH"
ElvUF.Tags.Methods["health:current:hidefull"] = function(unit)
ElvUF.Tags.Events["health:current-percent:hidefull"] = "UNIT_HEALTH_FREQUENT UNIT_MAXHEALTH"
ElvUF.Tags.Methods["health:current-percent:hidefull"] = function(unit)
local min, max = UnitHealth(unit), UnitHealthMax(unit)
local deficit = max - min
local String
......@@ -143,14 +143,14 @@ ElvUF.Tags.Methods["health:current:hidefull"] = function(unit)
if deficit <= 0 then
String = ""
else
String = GetFormattedText(min, max, "CURRENT", true)
String = GetFormattedText(min, max, "CURRENT_PERCENT", true)
end
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:percent:hidefull:hidezero"] = "UNIT_HEALTH_FREQUENT UNIT_MAXHEALTH UNIT_CONNECTION"
ElvUF.Tags.Methods["health:percent:hidefull:hidezero"] = function(unit)
local min, max = UnitHealth(unit), UnitHealthMax(unit)
local deficit = max - min
local String
......@@ -158,22 +158,22 @@ ElvUF.Tags.Methods["health:current:hidefull:hidezero"] = function(unit)
if (deficit <= 0) or (min == 0) then
String = ""
else
String = GetFormattedText(min, max, "CURRENT", true)
String = GetFormattedText(min, max, "PERCENT", true)
end
return String
end
ElvUF.Tags.Events["health:current-percent:hidefull"] = "UNIT_HEALTH_FREQUENT UNIT_MAXHEALTH"
ElvUF.Tags.Methods["health:current-percent:hidefull"] = function(unit)
ElvUF.Tags.Events["health:current:hidefull:hidezero"] = "UNIT_HEALTH_FREQUENT UNIT_MAXHEALTH"
ElvUF.Tags.Methods["health:current:hidefull:hidezero"] = function(unit)
local min, max = UnitHealth(unit), UnitHealthMax(unit)
local deficit = max - min
local String
if deficit <= 0 then
if (deficit <= 0) or (min == 0) then
String = ""
else
String = GetFormattedText(min, max, "CURRENT_PERCENT", true)
String = GetFormattedText(min, max, "CURRENT", true)
end
return String
......
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