Mercurial > wow > inventory
comparison Queue.lua @ 23:7d7aaa3fbe94
If Auctioneer data can not be retrieved, it will now display as ?Error? rather than break the caching.
The premade group update check should now be fully functional.
You can now shift-click item links into other text fields and alt-click while the auction house window is open to search it.
Added an option to the config to select the data used for the local item data. This option currently does nothing and is just a placeholder (just like the ?alert when below threshold? option).
Removed useless pullout hiding code for the track at characters option.
Added an option to always show the auction value, even when the threshold is nil.
When overriding an option, the default value should now be copied into the group, even without you changing it back and forth (previously if you overridden an option and didn?t change the value, it would still use the default value).
The ?Stock settings? tab is now called the ?General? tab.
The ?Group Management? tab is now called ?Management? tab.
Added tooltip descriptions to the ?Add items? and ?Current items? tabs.
Added the option to override the preferred addons to individual groups.
No longer copying tables when making the groups list in the config. We can just reference it (saves quite some memory).
Bumped the interface version from 30300 to 40000.
Added slash command arguement ?reset? (or the short version ?r?) to reset the size of the summary frame (I messed mine up while making some screenshots /facepalm).
You can now close the summary frame with escape.
author | Zerotorescue |
---|---|
date | Thu, 28 Oct 2010 19:14:30 +0200 |
parents | 8f5c02113c5c |
children | e732843b16d2 |
comparison
equal
deleted
inserted
replaced
22:46815d4f69e8 | 23:7d7aaa3fbe94 |
---|---|
73 if temp then | 73 if temp then |
74 -- Remember which items have been processed | 74 -- Remember which items have been processed |
75 temp[itemId] = true; | 75 temp[itemId] = true; |
76 end | 76 end |
77 | 77 |
78 local currentStock = addon:GetItemCount(itemId); | 78 local currentStock = addon:GetItemCount(itemId, groupName); |
79 if currentStock >= 0 then | 79 if currentStock >= 0 then |
80 -- Current stock will be -1 when no itemcount addon was found | 80 -- Current stock will be -1 when no itemcount addon was found |
81 local restockTarget = addon:GetOptionByKey(groupName, "restockTarget"); | 81 local restockTarget = addon:GetOptionByKey(groupName, "restockTarget"); |
82 local bonusQueue = addon:GetOptionByKey(groupName, "bonusQueue"); | 82 local bonusQueue = addon:GetOptionByKey(groupName, "bonusQueue"); |
83 local minCraftingQueue = floor( addon:GetOptionByKey(groupName, "minCraftingQueue") * restockTarget ); | 83 local minCraftingQueue = floor( addon:GetOptionByKey(groupName, "minCraftingQueue") * restockTarget ); |
87 if currentStock == 0 and bonusQueue > 0 then | 87 if currentStock == 0 and bonusQueue > 0 then |
88 amount = floor( ( amount * ( bonusQueue + 1 ) ) + .5 ); -- round | 88 amount = floor( ( amount * ( bonusQueue + 1 ) ) + .5 ); -- round |
89 end | 89 end |
90 | 90 |
91 if amount > 0 and amount >= minCraftingQueue then | 91 if amount > 0 and amount >= minCraftingQueue then |
92 self:Queue(i, amount); | 92 self:Queue(i, amount, groupName); |
93 | 93 |
94 print("Queued " .. amount .. " of " .. itemLink); | 94 print("Queued " .. amount .. " of " .. itemLink); |
95 end | 95 end |
96 else | 96 else |
97 print("No usable itemcount addon found."); | 97 print("No usable itemcount addon found."); |
98 end | 98 end |
99 end | 99 end |
100 end | 100 end |
101 end | 101 end |
102 | 102 |
103 function mod:Queue(tradeSkillIndex, amount) | 103 function mod:Queue(tradeSkillIndex, amount, group) |
104 tradeSkillIndex = tonumber(tradeSkillIndex); | 104 tradeSkillIndex = tonumber(tradeSkillIndex); |
105 amount = tonumber(amount); | 105 amount = tonumber(amount); |
106 | 106 |
107 if not tradeSkillIndex or not amount then return; end | 107 if not tradeSkillIndex or not amount then return; end |
108 | 108 |
109 if addon.supportedAddons.crafting[addon.db.global.defaults.craftingAddon] then | 109 local selectedExternalAddon = addon:GetOptionByKey(group, "craftingAddon"); |
110 | |
111 if addon.supportedAddons.crafting[selectedExternalAddon] and addon.supportedAddons.crafting[selectedExternalAddon].IsEnabled() then | |
110 -- Try to use the default auction pricing addon | 112 -- Try to use the default auction pricing addon |
111 | 113 |
112 return addon.supportedAddons.crafting[addon.db.global.defaults.craftingAddon].Queue(tradeSkillIndex, amount); | 114 return addon.supportedAddons.crafting[selectedExternalAddon].Queue(tradeSkillIndex, amount); |
113 else | 115 else |
114 -- Default not available, get the first one then | 116 -- Default not available, get the first one then |
115 | 117 |
116 for name, value in pairs(addon.supportedAddons.crafting) do | 118 for name, value in pairs(addon.supportedAddons.crafting) do |
117 if value.IsEnabled() then | 119 if value.IsEnabled() then |