From 09ada4544651a50174224852e415f936644eb8e6 Mon Sep 17 00:00:00 2001 From: Adrian L Lange Date: Sat, 11 Feb 2012 03:58:03 +0100 Subject: [PATCH] Use the var for bag check --- Monomyth.lua | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/Monomyth.lua b/Monomyth.lua index 094ec63..e49305b 100644 --- a/Monomyth.lua +++ b/Monomyth.lua @@ -159,28 +159,26 @@ Monomyth:Register('BANKFRAME_CLOSED', function() atBank = false end) -local completedQuests, queryQuests = {} +local completedQuests, query = {} Monomyth:Register('QUEST_QUERY_COMPLETE', function() - if(queryQuests) then - queryQuests = false + if(query) then + query = nil GetQuestsCompleted(completedQuests) - for index = 0, 4 do - Monomyth.BAG_UPDATE(index) - end + Monomyth.BAG_UPDATE(query) end end) Monomyth:Register('BAG_UPDATE', function(bag) if(bag < 0) then return end if(atBank) then return end - if(queryQuests) then return end + if(query) 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 + query = bag QueryQuestsCompleted() elseif(not completedQuests[id]) then UseContainerItem(bag, slot) -- 1.7.9.5