changeset 167:678fded0b898

Now using ITEM_LOCK_CHANGED again when moving out of the guild bank. Fixed a bug when refilling from storage into an empty slot of your local profession bags.
author Zerotorescue
date Tue, 25 Jan 2011 09:51:19 +0100
parents 84e38318f569
children 6065f48e4e47
files Modules/Mover.lua
diffstat 1 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/Modules/Mover.lua	Tue Jan 25 08:47:47 2011 +0100
+++ b/Modules/Mover.lua	Tue Jan 25 09:51:19 2011 +0100
@@ -35,7 +35,7 @@
 		IsLocked = function(sourceContainer, sourceSlot)
 			return select(3, GetGuildBankItemInfo(sourceContainer, sourceSlot));
 		end,
-		Event = "BAG_UPDATE",
+		Event = "ITEM_LOCK_CHANGED",
 	},
 	[addon.Locations.Mailbox] = {
 		GetItemId = function(mailIndex, attachmentId)
@@ -283,7 +283,13 @@
 						itemMove:AddLocation(firstAvailableSlot.container, firstAvailableSlot.slot, outgoingMove.num);
 						targetContents[outgoingMove.itemId] = itemMove;
 						
-						tremove(emptySlots, 1); -- no longer empty
+						-- Find the slot used and remove it from the empty slots table
+						for index, emptySlot in pairs(emptySlots) do
+							if emptySlot == firstAvailableSlot then
+								tremove(emptySlots, index);
+								break;
+							end
+						end
 						
 						outgoingMove.num = 0; -- nothing remaining - sanity check
 						outgoingMove.itemId = nil; -- remove this record from the outgoingMoves-table