Fix "==" operator broken in r1045.
Johnny C. Lam [11-06-13 - 18:52]
Fix "==" operator broken in r1045.
This fixes scripts that compare a condition's return value using equality,
e.g., pet.Health() == 0.
git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@1129 d5049fe3-3747-40f7-a4b5-f36d6801af5f
diff --git a/OvaleBestAction.lua b/OvaleBestAction.lua
index 60bf989..8ae3528 100644
--- a/OvaleBestAction.lua
+++ b/OvaleBestAction.lua
@@ -344,12 +344,13 @@ local function ComputeCompare(element)
or (c < z and operator == ">")
or (c < z and operator == ">=") then
IntersectInterval(scratch, 0, t, timeSpan)
- end
- if (c < z and operator == "<")
+ elseif (c < z and operator == "<")
or (c < z and operator == "<=")
or (c > z and operator == ">")
or (c > z and operator == ">=") then
IntersectInterval(scratch, t, math.huge, timeSpan)
+ else -- if c ~= z and operator == "==" then
+ timeSpan:Reset()
end
self_pool:Release(scratch)
end