Quantcast

Add support for the quest greeting frame

p3lim [01-05-11 - 12:23]
Add support for the quest greeting frame
Filename
Monomyth.lua
diff --git a/Monomyth.lua b/Monomyth.lua
index 7456053..46bf018 100644
--- a/Monomyth.lua
+++ b/Monomyth.lua
@@ -16,6 +16,20 @@ function addon:Register(event, func)
 	end
 end

+addon:Register('QUEST_GREETING', function()
+	for index = 1, MAX_NUM_QUESTS do
+		local button = _G['QuestTitleButton' .. index]
+
+		if(button and button:IsVisible()) then
+			if(button.isActive == 1 and _G['QuestTitleButton' .. index .. 'QuestIcon']:GetTexture() == COMPLETE) then
+				return button:Click()
+			elseif(button.isActive == 0) then
+				return button:Click()
+			end
+		end
+	end
+end)
+
 addon:Register('GOSSIP_SHOW', function()
 	for index = 1, NUMGOSSIPBUTTONS do
 		local button = _G['GossipTitleButton' .. index]