Quantcast

more robust against scripts

Sidoine De Wispelaere [10-13-10 - 17:41]
more robust against scripts

git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@270 d5049fe3-3747-40f7-a4b5-f36d6801af5f
Filename
Condition.lua
Ovale.lua
diff --git a/Condition.lua b/Condition.lua
index 89f3fd8..44cc282 100644
--- a/Condition.lua
+++ b/Condition.lua
@@ -308,8 +308,9 @@ local function GetTargetAura(condition, filter, target)
 			end
 		end
 	else
-		Ovale:Print("unknown buff "..spellId)
+		Ovale:Print("ERROR: unknown buff "..spellId)
 		Ovale.bug = true
+		return 0,0
 	end

 	if Ovale.trace then
diff --git a/Ovale.lua b/Ovale.lua
index cf71228..d81bc22 100644
--- a/Ovale.lua
+++ b/Ovale.lua
@@ -1563,7 +1563,7 @@ function Ovale:CalculerMeilleureAction(element)
 				for k,v in pairs(element.params) do
 					parameterList = parameterList..k.."="..v..","
 				end
-				self:Print("Function "..parameterList.." returned "..nilstring(start)..","..nilstring(ending))
+				self:Print("Function "..parameterList..") returned "..nilstring(start)..","..nilstring(ending))
 			end

 			return start, ending
@@ -1572,7 +1572,7 @@ function Ovale:CalculerMeilleureAction(element)
 		return element.value
 	elseif (element.type == "before") then
 		if (Ovale.trace) then
-			self:Print(element.time.."s before ["..element.nodeId.."]")
+			--self:Print(nilstring(element.time).."s before ["..element.nodeId.."]")
 		end
 		local timeA = Ovale:CalculerMeilleureAction(element.time)
 		local startA, endA = Ovale:CalculerMeilleureAction(element.a)
@@ -1616,7 +1616,7 @@ function Ovale:CalculerMeilleureAction(element)
 		self:Log("compare "..element.comparison)
 		local tempsA = Ovale:CalculerMeilleureAction(element.a)
 		local timeB = Ovale:CalculerMeilleureAction(element.time)
-		self:Log(tempsA.." "..element.comparison.." "..timeB)
+		self:Log(nilstring(tempsA).." "..element.comparison.." "..nilstring(timeB))
 		if element.comparison == "more" and (not tempsA or tempsA>timeB) then
 			if Ovale.trace then Ovale:Print(element.type.." return 0") end
 			return 0