From 6ef613b1c94c452fa81ad6105981cb878bb32a52 Mon Sep 17 00:00:00 2001 From: Adrian L Lange Date: Sun, 5 Feb 2012 15:44:19 +0100 Subject: [PATCH] Use a local instead --- Monomyth.lua | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Monomyth.lua b/Monomyth.lua index 9e2beba..302bb58 100644 --- a/Monomyth.lua +++ b/Monomyth.lua @@ -93,12 +93,13 @@ Monomyth:Register('QUEST_ITEM_UPDATE', function(...) end) Monomyth:Register('QUEST_COMPLETE', function() - if(GetNumQuestChoices() <= 1) then + local choices = GetNumQuestChoices() + if(choices <= 1) then GetQuestReward(QuestFrameRewardPanel.itemChoice) - elseif(GetNumQuestChoices() > 1) then + elseif(choices > 1) then local bestValue, bestIndex = 0 - for index = 1, GetNumQuestChoices() do + for index = 1, choices do local link = GetQuestItemLink('choice', index) if(link) then local _, _, _, _, _, _, _, _, _, _, value = GetItemInfo(link) -- 1.7.9.5