diff --git a/Broker_Garbage-Config/options_main.lua b/Broker_Garbage-Config/options_main.lua index b48bedb..27e8d9c 100644 --- a/Broker_Garbage-Config/options_main.lua +++ b/Broker_Garbage-Config/options_main.lua @@ -4,7 +4,7 @@ local function Options_BasicOptions(pluginID) local panel, tab = BGC:CreateOptionsTab(pluginID) local behavior = LibStub("tekKonfig-Group").new(panel, BGC.locale.GroupBehavior, "TOPLEFT", 21, -16) - behavior:SetHeight(190); behavior:SetWidth(180) + behavior:SetHeight(304); behavior:SetWidth(180) -- former height: 190 behavior:SetBackdropColor(0.1, 0.1, 0.1, 0.4) local sell = BGC.CreateCheckBox(behavior, nil, BGC.locale.autoSellTitle, "TOPLEFT", behavior, "TOPLEFT", 4, -2) @@ -107,13 +107,13 @@ local function Options_BasicOptions(pluginID) end end) - local treshold = LibStub("tekKonfig-Group").new(panel, BGC.locale.GroupTresholds, "TOPLEFT", behavior, "BOTTOMLEFT", 0, -14) - treshold:SetHeight(100); treshold:SetWidth(180) - treshold:SetBackdropColor(0.1, 0.1, 0.1, 0.4) + -- local treshold = LibStub("tekKonfig-Group").new(panel, BGC.locale.GroupTresholds, "TOPLEFT", behavior, "BOTTOMLEFT", 0, -14) + -- treshold:SetHeight(100); treshold:SetWidth(180) + -- treshold:SetBackdropColor(0.1, 0.1, 0.1, 0.4) - local qualityTreshold = CreateFrame("Frame", "BG_DropQualityDropDown", treshold, "UIDropDownMenuTemplate") + local qualityTreshold = CreateFrame("Frame", "BG_DropQualityDropDown", behavior, "UIDropDownMenuTemplate") qualityTreshold.displayMode = "MENU" - qualityTreshold:SetPoint("TOPLEFT", treshold, -4, -20) + qualityTreshold:SetPoint("TOPLEFT", disableKey, "BOTTOMLEFT", 0, -12) _G[qualityTreshold:GetName() .. "Button"]:SetPoint("LEFT", _G[qualityTreshold:GetName().."Middle"]) _G[qualityTreshold:GetName() .. "Button"].tiptext = BGC.locale.dropQualityText .. BGC.locale.GlobalSetting _G[qualityTreshold:GetName() .. "Button"]:SetScript("OnEnter", BGC.ShowTooltip) @@ -141,9 +141,9 @@ local function Options_BasicOptions(pluginID) end) - local sellGearTeshold = CreateFrame("Frame", "BG_SellQualityDropDown", treshold, "UIDropDownMenuTemplate") + local sellGearTeshold = CreateFrame("Frame", "BG_SellQualityDropDown", behavior, "UIDropDownMenuTemplate") sellGearTeshold.displayMode = "MENU" - sellGearTeshold:SetPoint("TOPLEFT", qualityTreshold, "BOTTOMLEFT", 0, -15) + sellGearTeshold:SetPoint("TOPLEFT", qualityTreshold, "BOTTOMLEFT", 0, -12) _G[sellGearTeshold:GetName() .. "Button"]:SetPoint("LEFT", _G[sellGearTeshold:GetName().."Middle"]) _G[sellGearTeshold:GetName() .. "Button"].tiptext = BGC.locale.SNUMaxQualityText .. BGC.locale.GlobalSetting _G[sellGearTeshold:GetName() .. "Button"]:SetScript("OnEnter", BGC.ShowTooltip) diff --git a/Broker_Garbage/core.lua b/Broker_Garbage/core.lua index 7236839..8d1394b 100644 --- a/Broker_Garbage/core.lua +++ b/Broker_Garbage/core.lua @@ -813,7 +813,9 @@ function BG.PrepareAutoSell() sell = false -- various cases that have us sell this item - if item.classification == BG.UNUSABLE + if item.classification == BG.EXCLUDE then + sell = false + elseif item.classification == BG.UNUSABLE and BG_GlobalDB.sellNotWearable and item.quality <= BG_GlobalDB.sellNWQualityTreshold then sell = true elseif item.classification == BG.OUTDATED and BG_GlobalDB.sellOldGear and item.quality <= BG_GlobalDB.sellNWQualityTreshold then @@ -824,6 +826,8 @@ function BG.PrepareAutoSell() sell = true elseif item.classification ~= BG.EXCLUDE and item.quality == 0 then sell = true + else -- whatever this case may be + sell = false end -- mark item for selling diff --git a/Broker_Garbage/util.lua b/Broker_Garbage/util.lua index d3ee630..9136d37 100644 --- a/Broker_Garbage/util.lua +++ b/Broker_Garbage/util.lua @@ -370,12 +370,6 @@ function BG:UpdateCache(itemID) BG:Debug("Item "..itemID.." should be sold as we can't ever wear it.") class = BG.UNUSABLE - - elseif quality -- and BG_GlobalDB.sellOldGear - and string.find(invType, "INVTYPE") and not string.find(invType, "BAG") - and IsAddOnLoaded("TopFit") and TopFit.IsInterestingItem and not TopFit:IsInterestingItem(itemID) then - BG:Debug("Item "..itemID.." is classified OUTDATED by TopFit.", invType) - class = BG.OUTDATED -- check if the item is classified by its category else @@ -421,6 +415,14 @@ function BG:UpdateCache(itemID) end end end + + if not class and quality + and string.find(invType, "INVTYPE") and not string.find(invType, "BAG") and not string.find(invType, "TRINKET") + and BG:IsItemSoulbound(itemLink) + and IsAddOnLoaded("TopFit") and TopFit.IsInterestingItem and not TopFit:IsInterestingItem(itemID) then + BG:Debug("Item "..itemID.." is classified OUTDATED by TopFit.", invType) + class = BG.OUTDATED + end end local tvalue, tclass = BG:GetSingleItemValue(itemID)