From 8a516df3fd06f82e71932c293c400a5ab163365d Mon Sep 17 00:00:00 2001 From: "Johnny C. Lam" Date: Tue, 15 Oct 2013 01:25:10 +0000 Subject: [PATCH] Clarify comment on the return value of a node evaluated as a boolean. git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@1049 d5049fe3-3747-40f7-a4b5-f36d6801af5f --- OvaleBestAction.lua | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/OvaleBestAction.lua b/OvaleBestAction.lua index 06b1fde..371d1cf 100644 --- a/OvaleBestAction.lua +++ b/OvaleBestAction.lua @@ -667,9 +667,10 @@ function OvaleBestAction:Compute(element, atTime) end function OvaleBestAction:ComputeBool(element, atTime) - local start, ending, priority, element = self:Compute(element, atTime) - --Special case of a value element: it must not be 0 - if element and element.type == "value" and element.value == 0 and element.rate == 0 then + local start, ending, _, newElement = self:Compute(element, atTime) + -- Match SimC:0 is false, non-zero is true. + -- (https://code.google.com/p/simulationcraft/wiki/ActionLists#Logical_operators) + if newElement and newElement.type == "value" and newElement.value == 0 and newElement.rate == 0 then return nil else return start, ending -- 1.7.9.5