Mercurial > wow > inventory
comparison Modules/Mover.lua @ 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 |
comparison
equal
deleted
inserted
replaced
166:84e38318f569 | 167:678fded0b898 |
---|---|
33 end, | 33 end, |
34 PickupItem = SplitGuildBankItem, | 34 PickupItem = SplitGuildBankItem, |
35 IsLocked = function(sourceContainer, sourceSlot) | 35 IsLocked = function(sourceContainer, sourceSlot) |
36 return select(3, GetGuildBankItemInfo(sourceContainer, sourceSlot)); | 36 return select(3, GetGuildBankItemInfo(sourceContainer, sourceSlot)); |
37 end, | 37 end, |
38 Event = "BAG_UPDATE", | 38 Event = "ITEM_LOCK_CHANGED", |
39 }, | 39 }, |
40 [addon.Locations.Mailbox] = { | 40 [addon.Locations.Mailbox] = { |
41 GetItemId = function(mailIndex, attachmentId) | 41 GetItemId = function(mailIndex, attachmentId) |
42 return addon:GetItemId(GetInboxItemLink(mailIndex, attachmentId)); | 42 return addon:GetItemId(GetInboxItemLink(mailIndex, attachmentId)); |
43 end, | 43 end, |
281 -- make a new instance of the ItemMove class so any additional items with this id can be stacked on top of it | 281 -- make a new instance of the ItemMove class so any additional items with this id can be stacked on top of it |
282 local itemMove = addon.ContainerItem:New(); | 282 local itemMove = addon.ContainerItem:New(); |
283 itemMove:AddLocation(firstAvailableSlot.container, firstAvailableSlot.slot, outgoingMove.num); | 283 itemMove:AddLocation(firstAvailableSlot.container, firstAvailableSlot.slot, outgoingMove.num); |
284 targetContents[outgoingMove.itemId] = itemMove; | 284 targetContents[outgoingMove.itemId] = itemMove; |
285 | 285 |
286 tremove(emptySlots, 1); -- no longer empty | 286 -- Find the slot used and remove it from the empty slots table |
287 for index, emptySlot in pairs(emptySlots) do | |
288 if emptySlot == firstAvailableSlot then | |
289 tremove(emptySlots, index); | |
290 break; | |
291 end | |
292 end | |
287 | 293 |
288 outgoingMove.num = 0; -- nothing remaining - sanity check | 294 outgoingMove.num = 0; -- nothing remaining - sanity check |
289 outgoingMove.itemId = nil; -- remove this record from the outgoingMoves-table | 295 outgoingMove.itemId = nil; -- remove this record from the outgoingMoves-table |
290 end | 296 end |
291 else | 297 else |