From 29ad91c13781a7f6749af5aab79a8c6757441435 Mon Sep 17 00:00:00 2001 From: Adrian L Lange Date: Sat, 11 Feb 2012 03:54:55 +0100 Subject: [PATCH] Only accept trivial quests while tracking them --- Monomyth.lua | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/Monomyth.lua b/Monomyth.lua index e8abdfe..57929a1 100644 --- a/Monomyth.lua +++ b/Monomyth.lua @@ -14,6 +14,15 @@ function Monomyth:Register(event, func) end end +local function IsTrackingTrivial() + for index = 1, GetNumTrackingTypes() do + local name, _, active = GetTrackingInfo(index) + if(name == MINIMAP_TRACKING_TRIVIAL_QUESTS) then + return active + end + end +end + Monomyth:Register('QUEST_GREETING', function() local active = GetNumActiveQuests() if(active > 0) then @@ -28,7 +37,9 @@ Monomyth:Register('QUEST_GREETING', function() local available = GetNumAvailableQuests() if(available > 0) then for index = 1, available do - SelectAvailableQuest(index) + if(not IsAvailableQuestTrivial(index) or IsTrackingTrivial()) then + SelectAvailableQuest(index) + end end end end) @@ -38,6 +49,10 @@ local function IsQuestCompleted(index) return not not select(index * 4, GetGossipActiveQuests()) end +local function IsQuestTrivial(index) + return not not select(index * 3, GetGossipAvailableQuests()) +end + Monomyth:Register('GOSSIP_SHOW', function() local active = GetNumGossipActiveQuests() if(active > 0) then @@ -51,7 +66,9 @@ Monomyth:Register('GOSSIP_SHOW', function() local available = GetNumGossipAvailableQuests() if(available > 0) then for index = 1, available do - SelectGossipAvailableQuest(index) + if(not IsQuestTrivial(index) or IsTrackingTrivial()) then + SelectGossipAvailableQuest(index) + end end end -- 1.7.9.5