From 89054e75a40c68f85f6c0c4b6c9044a84c5818a0 Mon Sep 17 00:00:00 2001 From: Adrian L Lange Date: Sun, 5 Feb 2012 15:40:40 +0100 Subject: [PATCH] Use the provided argument to simplify the autocomplete feature --- Monomyth.lua | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/Monomyth.lua b/Monomyth.lua index b1a8182..80cb5ca 100644 --- a/Monomyth.lua +++ b/Monomyth.lua @@ -107,15 +107,11 @@ Monomyth:Register('QUEST_COMPLETE', function() end end) -Monomyth:Register('QUEST_AUTOCOMPLETE', function() - for index = 1, GetNumAutoQuestPopUps() do - local quest, type = GetAutoQuestPopUp(index) - - if(type == 'COMPLETE') then - -- The quest may not be considered complete by the server - -- We should check then queue and try again when it is - ShowQuestComplete(GetQuestLogIndexByID(quest)) - end +Monomyth:Register('QUEST_AUTOCOMPLETE', function(id) + local index = GetQuestLogIndexByID(id) + if(GetQuestLogIsAutoComplete(index)) then + -- The quest might not be considered complete, investigate later + ShowQuestComplete(index) end end) -- 1.7.9.5