Fix the return value of TimeInCombat() script condition.
Johnny C. Lam [10-19-13 - 07:53]
Fix the return value of TimeInCombat() script condition.
git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@1077 d5049fe3-3747-40f7-a4b5-f36d6801af5f
diff --git a/OvaleCondition.lua b/OvaleCondition.lua
index a8071fa..4acb61a 100644
--- a/OvaleCondition.lua
+++ b/OvaleCondition.lua
@@ -3843,7 +3843,11 @@ end
OvaleCondition.conditions.timeincombat = function(condition)
local comparator, limit = condition[1], condition[2]
- return TestValue(comparator, limit, 0, Ovale.combatStartTime, 1)
+ if Ovale.enCombat then
+ return TestOvaleValue(Ovale.combatStartTime, math.huge, 0, Ovale.combatStartTime, 1, comparator, limit)
+ else
+ return Compare(0, comparator, limit)
+ end
end
--- Get the estimated number of seconds remaining before the target is dead.