# HG changeset patch # User Zerotorescue # Date 1293287620 -3600 # Node ID 2127ab01ed4a71822127b97ea9c1a9fca0a94cc8 # Parent 8d11fc88ecab6f6222e6912c25359daee9bc5e5e 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. diff -r 8d11fc88ecab -r 2127ab01ed4a Config.lua --- a/Config.lua Fri Dec 24 21:55:11 2010 +0100 +++ b/Config.lua Sat Dec 25 15:33:40 2010 +0100 @@ -24,7 +24,7 @@ local inheritedValue = addon:GetOptionByKey(groupName, info.arg); - addon.db.profile.groups[groupName][info.arg] = (type(inheritedValue) ~= "table" and inheritedValue) or CopyTable(inheritedValue); -- copying defaults by reference would let one (unintendedly) change the defaults + addon.db.profile.groups[groupName][info.arg] = (type(inheritedValue) == "table" and CopyTable(inheritedValue)) or inheritedValue; -- copying defaults by reference would let one (unintendedly) change the defaults end end @@ -95,14 +95,14 @@ get = function(info) return tostring(info[#info]); -- Ace is going to be anal about this if it's a numeric value, so we transmute it into a string here then back to a number on the other side end, - set = function(groupId, itemId) + set = function(groupId, itemData) -- This is NOT a real "set", we pass the widget reference to this function which contains similar, but not the same, info. - if itemId then + if itemData and itemData.id then local groupName = groupIdToName[groupId]; - if not mod:AddItemToGroup(groupName, itemId) then - print("|cffff0000Couldn't add the item with itemId (" .. itemId .. ") because it is already in a group.|r"); + if not mod:AddItemToGroup(groupName, itemData.id) then + print("|cffff0000Couldn't add the item with itemId (" .. itemData.id .. ") because it is already in a group.|r"); end end end, @@ -120,13 +120,13 @@ get = function(info) return tostring(info[#info]); -- Ace is going to be anal about this if it's a numeric value, so we transmute it into a string here then back to a number on the other side end, - set = function(groupId, itemId) + set = function(groupId, itemData) -- This is NOT a real "set", we pass the widget reference to this function which contains similar, but not the same, info. - if itemId then + if itemData and itemData.id then local groupName = groupIdToName[groupId]; - mod:RemoveItemFromGroup(groupName, itemId); + mod:RemoveItemFromGroup(groupName, itemData.id); -- Now rebuild the list AceConfigRegistry:NotifyChange("InventoriumOptions"); diff -r 8d11fc88ecab -r 2127ab01ed4a CraftingAddons/Cauldron.lua --- a/CraftingAddons/Cauldron.lua Fri Dec 24 21:55:11 2010 +0100 +++ b/CraftingAddons/Cauldron.lua Sat Dec 25 15:33:40 2010 +0100 @@ -1,6 +1,17 @@ do local function Queue(tradeSkillIndex, amount) + local tradeskillName, currentLevel, maxLevel = GetTradeSkillLine(); + + local link = GetTradeSkillItemLink(tradeSkillIndex); + local itemName = link and link:match("%[([^%[%]]*)%]"); + + if not itemName then + return; + end + + local skillInfo = Cauldron:GetSkillInfo(tradeskillName, itemName); + CauldronQueue:AddItem(Cauldron.db.realm.userdata[Cauldron.vars.playername].queue, skillInfo, amount); Cauldron:UpdateQueue(); @@ -8,6 +19,8 @@ -- update the shopping list Cauldron:UpdateShoppingListFromQueue(); + Cauldron:UpdateButtons(); + return; end diff -r 8d11fc88ecab -r 2127ab01ed4a Queue.lua --- a/Queue.lua Fri Dec 24 21:55:11 2010 +0100 +++ b/Queue.lua Sat Dec 25 15:33:40 2010 +0100 @@ -43,10 +43,14 @@ local temp = {}; - -- Go through all trade skills for the profession - for i = 1, GetNumTradeSkills() do - -- Process every single tradeskill - self:ProcessTradeSkill(i, groupName, temp); + local tradeskillName, currentLevel, maxLevel = GetTradeSkillLine(); + + if tradeskillName ~= "UNKNOWN" then + -- Go through all trade skills for the profession + for i = 1, GetNumTradeSkills() do + -- Process every single tradeskill + self:ProcessTradeSkill(i, groupName, temp); + end end if addon.db.profile.groups[groupName].items then