Mercurial > wow > inventory
comparison 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 |
comparison
equal
deleted
inserted
replaced
79:b89b6981783f | 80:c0bf2ddb5288 |
---|---|
1 local addon = select(2, ...); | |
2 | |
3 -- Define the class | |
4 | |
5 addon.ItemMove = {}; | |
6 addon.ItemMove.__index = addon.ItemMove; | |
7 | |
8 -- Construct | |
9 function addon.ItemMove:New(id) | |
10 local self = {}; | |
11 | |
12 setmetatable(self, addon.ItemMove); | |
13 | |
14 -- Standard info everything needs | |
15 self.id = id; | |
16 self.totalCount = 0; | |
17 self.locations = {}; | |
18 | |
19 return self; | |
20 end | |
21 | |
22 function addon.ItemMove:AddLocation(container, slot, count) | |
23 table.insert(self.locations, { | |
24 container = container, | |
25 slot = slot, | |
26 count = count, | |
27 }); | |
28 | |
29 self.totalCount = (self.totalCount + count); | |
30 | |
31 return true; | |
32 end | |
33 | |
34 function addon.ItemMove:Move(location, targetBag, targetSlot) | |
35 -- move location (container, slot, count) to targetBag, targetSlot | |
36 return true; | |
37 end |