Mercurial > wow > inventory
diff Core.lua @ 69:6329ee822172
Group functions moved to the config module, this should fix an issue with the item list not updating when adding items.
author | Zerotorescue |
---|---|
date | Thu, 23 Dec 2010 14:02:04 +0100 |
parents | 057f6661ad9d |
children | 8d11fc88ecab |
line wrap: on
line diff
--- a/Core.lua Thu Dec 23 13:57:48 2010 +0100 +++ b/Core.lua Thu Dec 23 14:02:04 2010 +0100 @@ -332,54 +332,6 @@ --- Group functions - -function addon:InGroup(itemId) - -- Go through all groups to see if this item is already somewhere - for groupName, values in pairs(addon.db.profile.groups) do - if values.items and values.items[itemId] then - return groupName; - end - end - - return; -end - -function addon:AddItemToGroup(groupName, itemId) - if self:InGroup(itemId) then - return false; - end - - if not addon.db.profile.groups[groupName].items then - addon.db.profile.groups[groupName].items = {}; - end - - -- Set this item - addon.db.profile.groups[groupName].items[itemId] = true; - - if AceConfigRegistry then - -- Now rebuild the list - AceConfigRegistry:NotifyChange("InventoriumOptions"); - end - - return true; -end - -function addon:RemoveItemFromGroup(groupName, itemId) - if self:InGroup(itemId) ~= groupName then - return false; - end - - -- Unset this item - addon.db.profile.groups[groupName].items[itemId] = nil; - - return true; -end - - - - - -- Readable money local goldText = "%s%d|cffffd700g|r ";