Quantcast

Revert a5a6b84ecb10f0dfc1481e1d97d89ea05c9d0a04

Adrian L Lange [05-31-11 - 17:12]
Revert a5a6b84ecb10f0dfc1481e1d97d89ea05c9d0a04
Filename
Monomyth.lua
diff --git a/Monomyth.lua b/Monomyth.lua
index c81a439..59caa70 100644
--- a/Monomyth.lua
+++ b/Monomyth.lua
@@ -1,7 +1,6 @@
 local addon = CreateFrame('Frame')
 addon:SetScript('OnEvent', function(self, event, ...) self[event](...) end)

-local CURRENT
 local COMPLETE = [=[Interface\GossipFrame\ActiveQuestIcon]=]

 function addon:Register(event, func)
@@ -68,10 +67,6 @@ addon:Register('QUEST_DETAIL', function()
 	else
 		QuestFrame_OnEvent(nil, 'QUEST_DETAIL')
 		AcceptQuest()
-
-		if(GetQuestID() == CURRENT) then
-			addon:RegisterEvent('BAG_UPDATE')
-		end
 	end
 end)

@@ -127,9 +122,9 @@ addon:Register('BAG_UPDATE', function(bag)
 	for slot = 1, GetContainerNumSlots(bag) do
 		local _, id, active = GetContainerItemQuestInfo(bag, slot)
 		if(id and not active) then
-			CURRENT = id
+			-- We should check if the item is cached yet
+			-- The negative result of this is a disconnect
 			UseContainerItem(bag, slot)
-			addon:UnregisterEvent('BAG_UPDATE')
 		end
 	end
 end)