annotate ItemData.class.lua @ 75:2127ab01ed4a

Overriding toggle boxes should no longer give errors. Adding / removing items from config groups works again. Fixed full support for the Cauldron crafting addon. No longer trying to queue crafting items when no tradeskill window is open. This would cause errors.
author Zerotorescue
date Sat, 25 Dec 2010 15:33:40 +0100
parents 8d11fc88ecab
children 958aba5f3297
rev   line source
Zerotorescue@74 1 local addon = select(2, ...);
Zerotorescue@74 2
Zerotorescue@74 3 -- Define the class
Zerotorescue@74 4
Zerotorescue@74 5 addon.ItemData = {};
Zerotorescue@74 6 addon.ItemData.__index = addon.ItemData;
Zerotorescue@74 7
Zerotorescue@74 8 -- Construct
Zerotorescue@74 9 function addon.ItemData:New(itemId)
Zerotorescue@74 10 local self = {};
Zerotorescue@74 11
Zerotorescue@74 12 setmetatable(self, addon.ItemData);
Zerotorescue@74 13
Zerotorescue@74 14 local itemName, itemLink, itemRarity, _, _, _, _, _, _, itemTexture = GetItemInfo(itemId);
Zerotorescue@74 15
Zerotorescue@74 16 -- Standard info everything needs
Zerotorescue@74 17 self.id = itemId;
Zerotorescue@74 18 self.name = itemName;
Zerotorescue@74 19 self.link = itemLink;
Zerotorescue@74 20 self.rarity = itemRarity;
Zerotorescue@74 21 self.icon = itemTexture;
Zerotorescue@74 22
Zerotorescue@74 23 -- Detailed stuff
Zerotorescue@74 24 self.value = -3;
Zerotorescue@74 25 self.globalCount = -3;
Zerotorescue@74 26 self.localCount = -3;
Zerotorescue@74 27 self.set = {};
Zerotorescue@74 28
Zerotorescue@74 29 return self;
Zerotorescue@74 30 end