Only show threat if there are any
Adrian L Lange [09-20-09 - 23:33]
Only show threat if there are any
diff --git a/tags.lua b/tags.lua
index 9a4b71d..0e0feba 100644
--- a/tags.lua
+++ b/tags.lua
@@ -36,7 +36,7 @@ end
oUF.TagEvents['[pthreat]'] = 'UNIT_THREAT_LIST_UPDATE'
oUF.Tags['[pthreat]'] = function()
local _, _, perc = UnitDetailedThreatSituation('player', 'target')
- return perc and ('%s%d%%|r'):format(hex(GetThreatStatusColor(UnitThreatSituation('player', 'target'))), perc)
+ return perc and perc > 0 ('%s%d%%|r'):format(hex(GetThreatStatusColor(UnitThreatSituation('player', 'target'))), perc)
end
oUF.Tags['[phealth]'] = function(unit)