From 41d0df9ec273bcb43263988150ce20813bc98ecc Mon Sep 17 00:00:00 2001 From: Adrian L Lange Date: Sat, 2 Jul 2011 23:15:12 +0200 Subject: [PATCH] Add a temporary solution to item quest starters --- Monomyth.lua | 9 ++++++--- Monomyth.toc | 1 + 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Monomyth.lua b/Monomyth.lua index 1f05588..b1a8182 100644 --- a/Monomyth.lua +++ b/Monomyth.lua @@ -122,12 +122,15 @@ end) Monomyth:Register('BAG_UPDATE', function(bag) if(bag < 0) then return end + QuestCompletedDB = QuestCompletedDB or {} + for slot = 1, GetContainerNumSlots(bag) do local _, id, active = GetContainerItemQuestInfo(bag, slot) - if(id and not active) then - -- We should check if the item is cached yet - -- The negative result of this is a disconnect + if(id and not active and not QuestCompletedDB[id]) then UseContainerItem(bag, slot) + + -- This is a temporary solution to the spam and bugs with some items + QuestCompletedDB[id] = true end end end) diff --git a/Monomyth.toc b/Monomyth.toc index d6b69a6..994f7cc 100644 --- a/Monomyth.toc +++ b/Monomyth.toc @@ -3,5 +3,6 @@ ## Version: Alpha ## Title: Monomyth ## Notes: Questing enhancements +## SavedVariablesPerCharacter: QuestCompletedDB Monomyth.lua -- 1.7.9.5