Fix ticket 307 - TimeToDie(comparison number) improperly returns true
Johnny C. Lam [10-31-13 - 19:06]
Fix ticket 307 - TimeToDie(comparison number) improperly returns true
Add some arguments for TestOvaleValue missing in r1114. This fixes
TimeToDie and TimeToHealthPercent.
git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@1116 d5049fe3-3747-40f7-a4b5-f36d6801af5f
diff --git a/OvaleCondition.lua b/OvaleCondition.lua
index 686cbec..cc1886b 100644
--- a/OvaleCondition.lua
+++ b/OvaleCondition.lua
@@ -3927,7 +3927,7 @@ OvaleCondition.conditions.timetodie = function(condition)
local timeToDie = TimeToDie(target)
local value, origin, rate = timeToDie, OvaleState.maintenant, -1
local start, ending = OvaleState.maintenant, OvaleState.maintenant + timeToDie
- return TestOvaleValue(start, ending, value, origin, rate)
+ return TestOvaleValue(start, ending, value, origin, rate, comparator, limit)
end
OvaleCondition.conditions.deadin = OvaleCondition.conditions.timetodie
@@ -3955,7 +3955,7 @@ OvaleCondition.conditions.timetohealthpercent = function(condition)
local t = timeToDie * (healthPercent - percent) / healthPercent
local value, origin, rate = t, OvaleState.maintenant, -1
local start, ending = OvaleState.maintenant, OvaleState.maintenant + t
- return TestOvaleValue(start, ending, value, origin, rate)
+ return TestOvaleValue(start, ending, value, origin, rate, comparator, limit)
end
return Compare(0, comparator, limit)
end