Quantcast

Automaticly finish the quests in watchframe

p3lim [12-28-10 - 01:19]
Automaticly finish the quests in watchframe
Filename
Automate.lua
diff --git a/Automate.lua b/Automate.lua
index d1268e8..11b235d 100644
--- a/Automate.lua
+++ b/Automate.lua
@@ -49,6 +49,16 @@ addon:Register('QUEST_COMPLETE', function(...)
 	end
 end)

+addon:Register('QUEST_AUTOCOMPLETE', function()
+	for index = 1, GetNumAutoQuestPopUps() do
+		local quest, type = GetAutoQuestPopUp(index)
+
+		if(type == 'COMPLETE') then
+			ShowQuestComplete(GetQuestLogIndexByID(quest))
+		end
+	end
+end)
+
 addon:Register('UNIT_INVENTORY_CHANGED', function(unit)
 	if(unit ~= 'player') then return end