Quantcast

sell gear, again

ckaotik [04-08-10 - 14:35]
sell gear, again
Filename
core.lua
options.lua
diff --git a/core.lua b/core.lua
index b1eb7d3..242bc45 100644
--- a/core.lua
+++ b/core.lua
@@ -823,7 +823,7 @@ function BrokerGarbage:AutoSell()
 			end

 			-- check if this item is equippable for us
-			local _, itemLink, _, _, _, _, subClass, _, invType = GetItemInfo(itemTable.itemID)
+			local _, itemLink, quality, _, _, _, subClass, _, invType = GetItemInfo(itemTable.itemID)
 			local sellGear = quality
 				and not IsUsableSpell(BrokerGarbage.enchanting)	and BrokerGarbage:IsItemSoulbound(itemLink)
 				and BG_GlobalDB.sellNotWearable and quality <= BG_GlobalDB.sellNWQualityTreshold
diff --git a/options.lua b/options.lua
index cd51d6e..ec95f76 100644
--- a/options.lua
+++ b/options.lua
@@ -466,6 +466,7 @@ local function ShowOptions(frame)
 	sellNotUsable:SetScript("OnClick", function(sellNotUsable)
 		checksound(sellNotUsable)
 		BG_GlobalDB.sellNotWearable = not BG_GlobalDB.sellNotWearable
+		BrokerGarbage:ScanInventory()
 	end)
 	local sellNUQuality = LibStub("tekKonfig-Slider").new(BrokerGarbage.basicOptions, BrokerGarbage.locale.SNUMaxQualityTitle, 0, 6, "TOPLEFT", sellNotUsable, "BOTTOMLEFT", 25, -4)
 	sellNUQuality.tiptext = BrokerGarbage.locale.SNUMaxQualityText
@@ -478,6 +479,7 @@ local function ShowOptions(frame)
 	sellNUQuality:SetScript("OnValueChanged", function(sellNUQuality)
 		BG_GlobalDB.sellNWQualityTreshold = sellNUQuality:GetValue()
 		sellNUQuality.text:SetText(BrokerGarbage.quality[sellNUQuality:GetValue()])
+		BrokerGarbage:ScanInventory()
 	end)

 	local disableKey, disableKeytext, disableKeycontainer = LibStub("tekKonfig-Dropdown").new(BrokerGarbage.basicOptions, BrokerGarbage.locale.DKTitle, "TOPLEFT", sellNUQuality, "BOTTOMLEFT", -25, -16)