From 5345157a4c06eb71205ab3fe61b34ccf162d5586 Mon Sep 17 00:00:00 2001 From: Adrian L Lange Date: Sat, 11 Feb 2012 03:56:17 +0100 Subject: [PATCH] Don't attempt while queueing --- Monomyth.lua | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/Monomyth.lua b/Monomyth.lua index 57929a1..094ec63 100644 --- a/Monomyth.lua +++ b/Monomyth.lua @@ -159,23 +159,28 @@ Monomyth:Register('BANKFRAME_CLOSED', function() atBank = false end) -local completedQuests = {} +local completedQuests, queryQuests = {} Monomyth:Register('QUEST_QUERY_COMPLETE', function() - GetQuestsCompleted(completedQuests) + if(queryQuests) then + queryQuests = false + GetQuestsCompleted(completedQuests) - for index = 0, 4 do - Monomyth.BAG_UPDATE(index) + for index = 0, 4 do + Monomyth.BAG_UPDATE(index) + end end end) Monomyth:Register('BAG_UPDATE', function(bag) if(bag < 0) then return end if(atBank) then return end + if(queryQuests) then return end for slot = 1, GetContainerNumSlots(bag) do local _, id, active = GetContainerItemQuestInfo(bag, slot) if(id and not active) then if(not next(completedQuests)) then + queryQuests = true QueryQuestsCompleted() elseif(not completedQuests[id]) then UseContainerItem(bag, slot) -- 1.7.9.5