Mercurial > wow > inventory
diff Modules/Mover.lua @ 117:239e25a058c7
Implemented mail refilling support. Respecting the MailAddonBusy global when opening so addons like MailOpener shouldn?t interfere.
author | Zerotorescue |
---|---|
date | Sat, 15 Jan 2011 13:15:16 +0100 |
parents | 41f0689dfda1 |
children | dc6f405c1a5d |
line wrap: on
line diff
--- a/Modules/Mover.lua Fri Jan 14 23:46:05 2011 +0100 +++ b/Modules/Mover.lua Sat Jan 15 13:15:16 2011 +0100 @@ -371,6 +371,11 @@ if movesSource == addon.Locations.Mailbox then MailAddonBusy = addon:GetName(); + + -- Since mailbox indexes change as mail is emptied (emptied mail is automatically deleted, thus number 50 would become 49 when 1 disappears), we must start with the last mail first + table.sort(combinedMoves, function(a, b) + return a.sourceContainer < b.sourceContainer; + end); end self:RegisterEvent(ContainerFunctions[movesSource].Event, "SourceUpdated");