Mercurial > wow > inventory
diff ItemMove.class.lua @ 80:c0bf2ddb5288
Added initial item refilling from the bank/guild. Not yet fully functional.
author | Zerotorescue |
---|---|
date | Wed, 05 Jan 2011 13:05:15 +0100 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ItemMove.class.lua Wed Jan 05 13:05:15 2011 +0100 @@ -0,0 +1,37 @@ +local addon = select(2, ...); + +-- Define the class + +addon.ItemMove = {}; +addon.ItemMove.__index = addon.ItemMove; + +-- Construct +function addon.ItemMove:New(id) + local self = {}; + + setmetatable(self, addon.ItemMove); + + -- Standard info everything needs + self.id = id; + self.totalCount = 0; + self.locations = {}; + + return self; +end + +function addon.ItemMove:AddLocation(container, slot, count) + table.insert(self.locations, { + container = container, + slot = slot, + count = count, + }); + + self.totalCount = (self.totalCount + count); + + return true; +end + +function addon.ItemMove:Move(location, targetBag, targetSlot) + -- move location (container, slot, count) to targetBag, targetSlot + return true; +end