Quantcast

Use BAG_UPDATE, ITEM_PUSH is fired before the item is placed in the inventory

p3lim [01-03-11 - 16:04]
Use BAG_UPDATE, ITEM_PUSH is fired before the item is placed in the inventory
Filename
Monomyth.lua
diff --git a/Monomyth.lua b/Monomyth.lua
index a85909d..adb638d 100644
--- a/Monomyth.lua
+++ b/Monomyth.lua
@@ -70,11 +70,8 @@ addon:Register('QUEST_AUTOCOMPLETE', function()
 	end
 end)

-addon:Register('ITEM_PUSH', function(bag)
-	-- This is some weird shit
-	if(bag > 0) then
-		bag = bag - CharacterBag0Slot:GetID() + 1
-	end
+addon:Register('BAG_UPDATE', function(bag)
+	if(bag < 0) then return end

 	for slot = 1, GetContainerNumSlots(bag) do
 		local _, id, active = GetContainerItemQuestInfo(bag, slot)