From 2caefba5d169903d843fde49a6ae167793ffb1fa Mon Sep 17 00:00:00 2001 From: Adrian L Lange Date: Tue, 31 May 2011 19:07:23 +0200 Subject: [PATCH] Do the same to GOSSIP_SHOW --- Monomyth.lua | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/Monomyth.lua b/Monomyth.lua index 89ba26a..2b24411 100644 --- a/Monomyth.lua +++ b/Monomyth.lua @@ -37,17 +37,21 @@ addon:Register('QUEST_GREETING', function() end) addon:Register('GOSSIP_SHOW', function() - for index = 1, NUMGOSSIPBUTTONS do - local button = _G['GossipTitleButton' .. index] - - if(button and button:IsVisible()) then - if(button.type == 'Active' and _G['GossipTitleButton' .. index .. 'GossipIcon']:GetTexture() == COMPLETE) then - return button:Click() - elseif(button.type == 'Available') then - return button:Click() + local active = GetNumGossipActiveQuests() + if(active > 0) then + for index = 1, select('#', GetGossipActiveQuests()), 4 do + if(select(index + 3, GetGossipActiveQuests())) then + SelectGossipActiveQuest(index) end end end + + local available = GetNumGossipAvailableQuests() + if(available > 0) then + for index = 1, available do + SelectGossipAvailableQuest(index) + end + end end) QuestFrame:UnregisterEvent('QUEST_DETAIL') -- 1.7.9.5