Add quests completing to the tracked list aswell
Adrian L Lange [03-23-12 - 13:50]
Add quests completing to the tracked list aswell
diff --git a/Monomyth.lua b/Monomyth.lua
index 98d2361..1da4e8f 100644
--- a/Monomyth.lua
+++ b/Monomyth.lua
@@ -109,6 +109,7 @@ Monomyth:Register('QUEST_ITEM_UPDATE', function(...)
end
end)
+local completing
Monomyth:Register('QUEST_COMPLETE', function()
local choices = GetNumQuestChoices()
if(choices <= 1) then
@@ -134,12 +135,20 @@ Monomyth:Register('QUEST_COMPLETE', function()
_G['QuestInfoItem' .. bestIndex]:Click()
end
end
+
+ completing = true
end)
+local completedQuests = {}
Monomyth:Register('QUEST_FINISHED', function()
if(choiceFinished) then
choiceQueue = false
end
+
+ if(completing) then
+ completing = false
+ completedQuests[GetQuestID()] = true
+ end
end)
Monomyth:Register('QUEST_AUTOCOMPLETE', function(id)
@@ -167,7 +176,7 @@ Monomyth:Register('GUILDBANKFRAME_CLOSED', function()
atBank = false
end)
-local completedQuests, query = {}
+local query
Monomyth:Register('QUEST_QUERY_COMPLETE', function()
if(query) then
local bag = query