Fix trace when the best group element doesn't have params array.
Johnny C. Lam [10-11-12 - 01:21]
Fix trace when the best group element doesn't have params array.
git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@582 d5049fe3-3747-40f7-a4b5-f36d6801af5f
diff --git a/OvaleBestAction.lua b/OvaleBestAction.lua
index cbef0ab..4c0a018 100644
--- a/OvaleBestAction.lua
+++ b/OvaleBestAction.lua
@@ -723,7 +723,11 @@ function OvaleBestAction:Compute(element)
if (meilleurTempsFils) then
if (Ovale.trace) then
if bestElement then
- Ovale:Print("group best action "..bestElement.params[1].." remains "..meilleurTempsFils..","..nilstring(bestEnd).." ["..element.nodeId.."]")
+ local id = bestElement.value
+ if bestElement.params then
+ id = bestElement.params[1]
+ end
+ Ovale:Print("group best action "..tostring(id).." remains "..meilleurTempsFils..","..nilstring(bestEnd).." ["..element.nodeId.."]")
else
Ovale:Print("group no best action returns "..meilleurTempsFils..","..nilstring(bestEnd).." ["..element.nodeId.."]")
end