Mercurial > wow > inventory
view ContainerItem.class.lua @ 82:f885805da5d6
Added options to toggle the automatic refilling. This defaults to true.
Normalized property amount names; a move has a ?num? that must be moved and a location has a ?count? indicating the amount of items at that slot.
Target/source item verification should now be working properly for guilds.
When ?bank? is included in the local item count, we will skip trying to auto refill from this.
author | Zerotorescue |
---|---|
date | Thu, 06 Jan 2011 10:48:56 +0100 |
parents | 58617c7827fa |
children |
line wrap: on
line source
local addon = select(2, ...); -- Define the class addon.ContainerItem = {}; addon.ContainerItem.__index = addon.ContainerItem; -- Construct function addon.ContainerItem:New(id) local self = {}; setmetatable(self, addon.ContainerItem); -- Standard info everything needs self.id = id; self.totalCount = 0; self.locations = {}; return self; end function addon.ContainerItem:AddLocation(container, slot, count) table.insert(self.locations, { container = container, slot = slot, count = count, }); self.totalCount = (self.totalCount + count); return true; end