diff --git a/Broker_Garbage.toc b/Broker_Garbage.toc
index d1aaa49..8e528e0 100644
--- a/Broker_Garbage.toc
+++ b/Broker_Garbage.toc
@@ -8,7 +8,7 @@
## Notes: Full bags no more! Find your least valuable item .. and destroy it!
## Notes-deDE: Endlich wieder Platz! Finde dein billigstes Item ... und zerstöre es.
## Author: ckaotik
-## Version: 3.3v13
+## Version: 3.3v14
## X-Embeds: LibPeriodicTable-3.1
## X-Category: Inventory
## X-Credits: GarbageFu, Tekkub
diff --git a/core.lua b/core.lua
index 9b48623..dc3bba6 100644
--- a/core.lua
+++ b/core.lua
@@ -8,11 +8,14 @@ _, BrokerGarbage = ...
local LibQTip = LibStub("LibQTip-1.0")
BrokerGarbage.PT = LibStub("LibPeriodicTable-3.1")
-local LDB = LibStub:GetLibrary("LibDataBroker-1.1"):NewDataObject("Garbage")
-LDB.type = "data source"
-LDB.icon = "Interface\\Icons\\achievement_bg_returnxflags_def_wsg"
-LDB.label = "Garbage"
-LDB.text = BrokerGarbage.locale.label
+-- notation mix-up for B2FB to work
+local LDB = LibStub:GetLibrary("LibDataBroker-1.1"):NewDataObject("Garbage", {
+ type = "data source",
+ icon = "Interface\\Icons\\achievement_bg_returnxflags_def_wsg",
+ label = "Garbage",
+ text = BrokerGarbage.locale.label
+})
+
LDB.OnClick = function(...) BrokerGarbage:OnClick(...) end
LDB.OnEnter = function(...) BrokerGarbage:Tooltip(...) end
LDB.OnMouseWheel = function(...) BrokerGarbage:OnScroll(...) end
@@ -781,7 +784,7 @@ end
-- special functionality
-- ---------------------------------------------------------
-- when at a merchant this will clear your bags of junk (gray quality) and items on your autoSellList
-function BrokerGarbage:AutoSell(self)
+function BrokerGarbage:AutoSell()
if BG_GlobalDB.autoSellToVendor or self == _G["BrokerGarbage_SellIcon"] then
local i = 1
sellValue = 0
@@ -793,6 +796,7 @@ function BrokerGarbage:AutoSell(self)
end
-- item is on save list, skip
if inCategory then
+ BrokerGarbage:Debug(itemTable.itemID,"in set", inCategory, "on exclude list")
skip = true
break
end
@@ -802,7 +806,7 @@ function BrokerGarbage:AutoSell(self)
if type(setName) == "string" then
_, inCategory = BrokerGarbage.PT:ItemInSet(itemTable.itemID, setName)
end
- if inCategory then break end
+ if inCategory then BrokerGarbage:Debug(itemTable.itemID,"in set", inCategory, "on autosell");break end
end
end
@@ -844,20 +848,12 @@ end
-- Wishlist
-- ---------------------------------------------------------
--- make "autosell" list - e.g. mages selling dropped water/food
--- include types on character specific settings
-- show lootable containers in your bag! make "open items" not as spammy
-- increase/decrease loot treshold with mousewheel on LDB
-- restack if necessary
--- force vendor price (food and stuff extremely overpriced in the AH) on some items
--- manually set item price
--- include list: set value / use value
-- ask before deleting / treshold
-- search list frames (similar to gnomishvendorshrinker)
-- fubar_garbagefu: Soulbound, Quest, Bind on Pickup, Bind on Equip/Use.
--- types: Normal Food, Bonus Food, Stat Food, Conjured Bread, Raw Food, Bread, Fish, percent food/water, combi food/drink....
-- ignore special bags
-- drop-beyond-treshold: only keep 5 soulshards
--- feature: selective looting (only crafting materials, greens+ , ...)
-
--- Spell_Shaman_SpiritLink
\ No newline at end of file
+-- feature: selective looting (only crafting materials, greens+ , ...)
\ No newline at end of file
diff --git a/options.lua b/options.lua
index f1cfb59..9369fd1 100644
--- a/options.lua
+++ b/options.lua
@@ -14,22 +14,35 @@ BrokerGarbage.quality = {
}
-- create drop down menu table for PT sets
-BrokerGarbage.PTSets = {}
+local interestingPTSets = {"Consumable", "Misc", "Tradeskill"}
+
+BrokerGarbage.PTSets = {}
for set, _ in pairs(BrokerGarbage.PT.sets) do
+ local interesting = false
local partials = { strsplit(".", set) }
local maxParts = #partials
- local pre = BrokerGarbage.PTSets
-
- for i = 1, maxParts do
- if i == maxParts then
- -- actual clickable entries
- pre[ partials[i] ] = set
- else
- -- all parts before that
- if not pre[ partials[i] ] then
- pre[ partials[i] ] = {}
+
+ for i=1,#interestingPTSets do
+ if strfind(partials[1], interestingPTSets[i]) then
+ interesting = true
+ break
+ end
+ end
+
+ if interesting then
+ local pre = BrokerGarbage.PTSets
+
+ for i = 1, maxParts do
+ if i == maxParts then
+ -- actual clickable entries
+ pre[ partials[i] ] = set
+ else
+ -- all parts before that
+ if not pre[ partials[i] ] then
+ pre[ partials[i] ] = {}
+ end
+ pre = pre[ partials[i] ]
end
- pre = pre[ partials[i] ]
end
end
end
diff --git a/readme.txt b/readme.txt
index efaf95f..659ecc6 100644
--- a/readme.txt
+++ b/readme.txt
@@ -1,7 +1,7 @@
Broker_Garbage
==============
Author: ckaotik
-Version: 3.3v13
+Version: 3.3v14
WoW Version: 3.3.2 (TOC 30300)
WoWInterface: http://www.wowinterface.com/downloads/info15531-Broker_Garbage.html