Quantcast

added lifePercent function

Sidoine De Wispelaere [03-27-11 - 21:52]
added lifePercent function

git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@390 d5049fe3-3747-40f7-a4b5-f36d6801af5f
Filename
Condition.lua
diff --git a/Condition.lua b/Condition.lua
index 52432e8..f88f72a 100644
--- a/Condition.lua
+++ b/Condition.lua
@@ -694,6 +694,10 @@ Ovale.conditions=
 		local target = getTarget(condition.target)
 		return compare(UnitHealth(target)/UnitHealthMax(target), condition[1], condition[2]/100)
 	end,
+	lifePercent = function(condition)
+		local target = getTarget(condition.target)
+		return 100 * UnitHealth(target)/UnitHealthMax(target), 0, 0
+	end
 	-- Test if a list item is selected
 	-- 1 : the list name
 	-- 2 : the item name