diff --git a/Broker_Garbage-Config/Broker_Garbage-Config.toc b/Broker_Garbage-Config/Broker_Garbage-Config.toc index a0b233f..a1b56dc 100644 --- a/Broker_Garbage-Config/Broker_Garbage-Config.toc +++ b/Broker_Garbage-Config/Broker_Garbage-Config.toc @@ -4,7 +4,7 @@ ## Title: Broker_Garbage-Config ## Author: ckaotik -## Version: 4.0v10 +## Version: 4.0v11 ## LoadOnDemand: 1 ## LoadManagers: AddonLoader, Addon Control Panel diff --git a/Broker_Garbage-Config/locale/deDE.lua b/Broker_Garbage-Config/locale/deDE.lua index 536db7a..217dfd7 100644 --- a/Broker_Garbage-Config/locale/deDE.lua +++ b/Broker_Garbage-Config/locale/deDE.lua @@ -91,8 +91,7 @@ if GetLocale() == "deDE" then BGC.locale.showIconTitle = "Icon" BGC.locale.showIconText = "Auswählen um im Tooltip vor dem Itemlink das jeweilige Icon anzuzeigen" - - + BGC.locale.showEarnedTitle = "Gewinn" BGC.locale.showEarnedText = "Auswählen um im Tooltip die Zeile 'Verdientes Gold' anzuzeigen" @@ -120,14 +119,17 @@ if GetLocale() == "deDE" then BGC.locale.sellNotUsableTitle = "Ausrüstung verkaufen" BGC.locale.sellNotUsableText = "Auswählen um Broker_Garbage seelengebundene Ausrüstung, die du niemals tragen kannst, automatisch verkaufen zu lassen.\n(inaktiv bei Verzauberern)" + BGC.locale.TopFitOldItem = "Überholte Rüstung" + BGC.locale.TopFitOldItemText = "Wenn das Addon TopFit geladen ist, kann BG Items, die dir in keinem Rüstungsset Vorteile bringen, automatisch verkaufen." + BGC.locale.SNUMaxQualityTitle = "Höchstens verkaufen bis" - BGC.locale.SNUMaxQualityText = "Wähle die maximale Itemqualität, bei der unnütze Ausrüstung verkauft werden soll." + BGC.locale.SNUMaxQualityText = "Wähle die maximale Itemqualität, bei der unnütze/überholte Ausrüstung verkauft werden soll." BGC.locale.enchanterTitle = "Verzauberer" BGC.locale.enchanterTooltip = "Auswählen wenn du einen Verzauberer hast/kennst. Wenn aktiviert, wird Broker_Garbage Entzauberpreise verwenden, welche in der Regel höher sind als Händlerpreise." BGC.locale.DKTitle = "Temp. deaktivieren mit" - BGC.locale.DKTooltip = "Wähle die Taste, die die Aktionen von BGC temporär deaktiviert." + BGC.locale.DKTooltip = "Wähle die Taste, die Aktionen von Broker_Garbage temporär deaktiviert." BGC.locale.disableKeys = { ["None"] = "Kein", ["SHIFT"] = "SHIFT", diff --git a/Broker_Garbage-Config/locale/enUS.lua b/Broker_Garbage-Config/locale/enUS.lua index ee04420..819e05c 100644 --- a/Broker_Garbage-Config/locale/enUS.lua +++ b/Broker_Garbage-Config/locale/enUS.lua @@ -91,7 +91,7 @@ BGC.locale = { showIconTitle = "Icon", showIconText = "Check to show the item's icon in front of the item link on the tooltip.", - + showEarnedTitle = "Earned", showEarnedText = "Check to show the character's earned money (by selling junk items).", @@ -119,8 +119,11 @@ BGC.locale = { sellNotUsableTitle = "Sell Unusable Gear", sellNotUsableText = "Check this to have Broker_Garbage sell all soulbound gear you cannot wear.\n(Only applies if not an enchanter)", + TopFitOldItem = "Outdated Armor", + TopFitOldItemText = "If the addon TopFit is loaded, BG can ask for outdated gear and directly sell it.", + SNUMaxQualityTitle = "Sell Quality", - SNUMaxQualityText = "Select the maximum item quality to sell when 'Sell Unusable Gear' is checked.", + SNUMaxQualityText = "Select the maximum item quality to sell when 'Sell Unusable Gear' or 'Outdated Armor' is checked.", enchanterTitle = "Enchanter", enchanterTooltip = "Check this if you have/know an enchanter.\nWhen checked disenchant values are considered, which are higher than vendor prices.", diff --git a/Broker_Garbage-Config/options_lists.lua b/Broker_Garbage-Config/options_lists.lua index a24ea39..4f7116e 100644 --- a/Broker_Garbage-Config/options_lists.lua +++ b/Broker_Garbage-Config/options_lists.lua @@ -471,7 +471,7 @@ function BGC:ShowListOptions(frame) local setID = string.match(item, "^BEQ_(%d+)") setID = tonumber(setID) link = setID and GetEquipmentSetInfo(setID) or "Invalid Set" - else + else -- LPT category reset = true itemID = item diff --git a/Broker_Garbage-Config/options_main.lua b/Broker_Garbage-Config/options_main.lua index bdc74e3..b48bedb 100644 --- a/Broker_Garbage-Config/options_main.lua +++ b/Broker_Garbage-Config/options_main.lua @@ -53,7 +53,17 @@ local function Options_BasicOptions(pluginID) Broker_Garbage:ScanInventory() end) - local enchanter = BGC.CreateCheckBox(behavior, nil, BGC.locale.enchanterTitle, "TOPLEFT", sellGear, "BOTTOMLEFT", 0, 4) + local sellOutdatedGear = BGC.CreateCheckBox(behavior, nil, BGC.locale.TopFitOldItem, "TOPLEFT", sellGear, "BOTTOMLEFT", 0, 4) + sellOutdatedGear.tiptext = BGC.locale.TopFitOldItemText .. BGC.locale.GlobalSetting + sellOutdatedGear:SetChecked( Broker_Garbage:GetOption("sellOldGear", true) ) + local checksound = sellOutdatedGear:GetScript("OnClick") + sellOutdatedGear:SetScript("OnClick", function(sellOutdatedGear) + checksound(sellOutdatedGear) + Broker_Garbage:ToggleOption("sellOldGear", true) + Broker_Garbage:ScanInventory() + end) + + local enchanter = BGC.CreateCheckBox(behavior, nil, BGC.locale.enchanterTitle, "TOPLEFT", sellOutdatedGear, "BOTTOMLEFT", 0, 4) enchanter.tiptext = BGC.locale.enchanterTooltip .. BGC.locale.GlobalSetting enchanter:SetChecked( Broker_Garbage:GetOption("hasEnchanter", true) ) local checksound = enchanter:GetScript("OnClick") diff --git a/Broker_Garbage-Config/util.lua b/Broker_Garbage-Config/util.lua index b9942ee..6fb716a 100644 --- a/Broker_Garbage-Config/util.lua +++ b/Broker_Garbage-Config/util.lua @@ -65,7 +65,6 @@ function BGC.ShowTooltip(self) GameTooltip:ClearLines() GameTooltip:AddLine(BGC.locale.armorClass) GameTooltip:AddLine(self.tiptext or BGC.locale.unknown, 1, 1, 1, true) - elseif string.find(self.itemID, "^BEQ_") then -- Blizzard Equipment Manager item set GameTooltip:ClearLines() diff --git a/Broker_Garbage-LootManager/Broker_Garbage-LootManager.toc b/Broker_Garbage-LootManager/Broker_Garbage-LootManager.toc index 207279c..8f30d7d 100644 --- a/Broker_Garbage-LootManager/Broker_Garbage-LootManager.toc +++ b/Broker_Garbage-LootManager/Broker_Garbage-LootManager.toc @@ -5,7 +5,7 @@ ## Title: Broker_Garbage-LootManager ## Author: ckaotik -## Version: 4.0v10 +## Version: 4.0v11 ## Notes: Plugin for Broker_Garbage. Selective looting and more! ## Notes-deDE: Plugin für Broker_Garbage. Selektives Plündern und mehr! diff --git a/Broker_Garbage/Broker_Garbage.toc b/Broker_Garbage/Broker_Garbage.toc index 758acd5..9749a0c 100644 --- a/Broker_Garbage/Broker_Garbage.toc +++ b/Broker_Garbage/Broker_Garbage.toc @@ -6,7 +6,7 @@ ## Title: Broker_Garbage ## Author: ckaotik -## Version: 4.0v10 +## Version: 4.0v11 ## Notes: Full bags no more! Distinguish between junk and treasure, find items to drop quickly. ## Notes-deDE: Unterscheide Trödel von Schätzen und finde billigen Müll zum Platzschaffen. diff --git a/Broker_Garbage/constants.lua b/Broker_Garbage/constants.lua index 61e9158..357c383 100644 --- a/Broker_Garbage/constants.lua +++ b/Broker_Garbage/constants.lua @@ -91,6 +91,7 @@ BG.tag = { [BG.VENDOR] = "|cFFff9c5aV", -- orange [BG.SELL] = "|cFFff592dV", -- dark orange [BG.DISENCHANT] = "|cFFe052ffD", -- purple + [BG.OUTDATED] = "|cFF3c73abO", -- blue } BG.modules = {} -- plugins get saved in here diff --git a/Broker_Garbage/core.lua b/Broker_Garbage/core.lua index 74e5368..7236839 100644 --- a/Broker_Garbage/core.lua +++ b/Broker_Garbage/core.lua @@ -815,7 +815,9 @@ function BG.PrepareAutoSell() -- various cases that have us sell this item if item.classification == BG.UNUSABLE and BG_GlobalDB.sellNotWearable and item.quality <= BG_GlobalDB.sellNWQualityTreshold then - sell = true + sell = true + elseif item.classification == BG.OUTDATED and BG_GlobalDB.sellOldGear and item.quality <= BG_GlobalDB.sellNWQualityTreshold then + sell = true elseif item.classification == BG.INCLUDE and BG_GlobalDB.autoSellIncludeItems then sell = true elseif item.classification == BG.SELL then @@ -831,10 +833,10 @@ function BG.PrepareAutoSell() locked = true end - BG:Debug("Selling", data.item) + BG:Debug("Selling", item, container, slot) ClearCursor() - UseContainerItem(data.container, data.slot) + UseContainerItem(container, slot) table.insert(BG.sellLog, {container = container, slot = slot, item = itemLink, count = count, value = value}) end end diff --git a/Broker_Garbage/util.lua b/Broker_Garbage/util.lua index 66388ee..d3ee630 100644 --- a/Broker_Garbage/util.lua +++ b/Broker_Garbage/util.lua @@ -302,7 +302,7 @@ function BG:IsItemInList(itemID, itemList) itemList = GetEquipmentSetItemIDs(itemList) temp = BG:Find(itemList, itemID) end - elseif type(itemList) == "string" and string.match(itemList, "^AC_(%d+)") then + elseif type(itemList) == "string" and string.match(itemList, "^AC_(%d+)") then -- armor class local armorClass = string.match(itemList, "^AC_(%d+)") local index = tonumber(armorClass) @@ -370,13 +370,19 @@ 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 -- check if item is excluded by its category for setName,_ in pairs(BG:JoinTables(BG_GlobalDB.exclude, BG_LocalDB.exclude)) do if BG:IsItemInList(itemID, setName) then - BG:Debug("Item "..itemID.." is excluded via its category.") + BG:Debug("Item "..itemID.." is EXCLUDED via its category.") class = BG.EXCLUDE break end @@ -386,7 +392,7 @@ function BG:UpdateCache(itemID) if not class then for setName,_ in pairs(BG:JoinTables(BG_LocalDB.include, BG_GlobalDB.include)) do if BG:IsItemInList(itemID, setName) then - BG:Debug("Item "..itemID.." in included via its item category.") + BG:Debug("Item "..itemID.." in INCLUDED via its item category.") class = BG.INCLUDE break end