From 048e5f1aa080f447cdf9222976137cc390033cdc Mon Sep 17 00:00:00 2001 From: p3lim Date: Mon, 3 Jan 2011 17:05:03 +0100 Subject: [PATCH] Some fixes to the value check --- Monomyth.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Monomyth.lua b/Monomyth.lua index adb638d..119fd9c 100644 --- a/Monomyth.lua +++ b/Monomyth.lua @@ -49,14 +49,16 @@ addon:Register('QUEST_COMPLETE', function() local bestValue, bestIndex = 0 for index = 1, GetNumQuestChoices() do - local item, _, _, _, _, _, _, _, _, _, value = GetItemInfo(GetQuestItemLink('choice', index)) + local _, _, _, _, _, _, _, _, _, _, value = GetItemInfo(GetQuestItemLink('choice', index)) if(value > bestValue) then bestValue, bestIndex = value, index end end - _G['QuestInfoItem' .. bestIndex]:Click() + if(bestIndex) then -- XXX: Debug this one + _G['QuestInfoItem' .. bestIndex]:Click() + end end end) -- 1.7.9.5