From 9df39c642aa550c71c94fb2b11d82d7de5d7d6f4 Mon Sep 17 00:00:00 2001 From: ckaotik Date: Tue, 11 May 2010 17:31:16 +0200 Subject: [PATCH] Fixed BG not showing up in LDB displays. Hopefully fixed AutoSell screw-up. Added option to use include list as autosell list as well (you guys sure are lazy ;) ) --- Broker_Garbage.toc | 4 +- Libs/LibDataBroker-1.1.lua | 98 ++++++++++++++++++++++++++++++------------- Locale/deDE.lua | 7 +++- Locale/enUS.lua | 4 ++ category_test.lua | 4 -- constants.lua | 1 + core.lua | 99 ++++++++++++++++++++++++++++++++------------ helper.lua | 6 ++- options.lua | 12 +++++- 9 files changed, 169 insertions(+), 66 deletions(-) diff --git a/Broker_Garbage.toc b/Broker_Garbage.toc index 34f8b89..92d9652 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.3v25 +## Version: 3.3v27 ## X-Website: http://www.wowinterface.com/downloads/info15531-Broker_Garbage.html ## X-RelSite-WoWI: 15531 ## X-Embeds: LibPeriodicTable-3.1 @@ -19,9 +19,9 @@ # libraries Libs\LibStub.lua -Libs\LibQTip-1.0.lua Libs\CallbackHandler-1.0.lua Libs\LibDataBroker-1.1.lua +Libs\LibQTip-1.0.lua Libs\tekKonfig\tekKonfig.xml Libs\LibPeriodicTable-3.1\LibPeriodicTable-3.1.lua Libs\LibPeriodicTable-3.1-Consumable\LibPeriodicTable-3.1-Consumable.lua diff --git a/Libs/LibDataBroker-1.1.lua b/Libs/LibDataBroker-1.1.lua index 7382a8d..f47c0cd 100644 --- a/Libs/LibDataBroker-1.1.lua +++ b/Libs/LibDataBroker-1.1.lua @@ -1,50 +1,90 @@ - + assert(LibStub, "LibDataBroker-1.1 requires LibStub") assert(LibStub:GetLibrary("CallbackHandler-1.0", true), "LibDataBroker-1.1 requires CallbackHandler-1.0") -local lib = LibStub:NewLibrary("LibDataBroker-1.1", 1) +local lib, oldminor = LibStub:NewLibrary("LibDataBroker-1.1", 4) if not lib then return end +oldminor = oldminor or 0 lib.callbacks = lib.callbacks or LibStub:GetLibrary("CallbackHandler-1.0"):New(lib) lib.attributestorage, lib.namestorage, lib.proxystorage = lib.attributestorage or {}, lib.namestorage or {}, lib.proxystorage or {} -local attributestorage, namestorage, proxystorage = lib.attributestorage, lib.namestorage, lib.proxystorage +local attributestorage, namestorage, callbacks = lib.attributestorage, lib.namestorage, lib.callbacks + +if oldminor < 2 then + lib.domt = { + __metatable = "access denied", + __index = function(self, key) return attributestorage[self] and attributestorage[self][key] end, + } +end -local domt = { - __metatable = "access denied", - __newindex = function(self, key, value) +if oldminor < 3 then + lib.domt.__newindex = function(self, key, value) if not attributestorage[self] then attributestorage[self] = {} end if attributestorage[self][key] == value then return end attributestorage[self][key] = value local name = namestorage[self] if not name then return end - lib.callbacks:Fire("LibDataBroker_AttributeChanged", name, key, value) - lib.callbacks:Fire("LibDataBroker_AttributeChanged_"..name, name, key, value) - lib.callbacks:Fire("LibDataBroker_AttributeChanged_"..name.."_"..key, name, key, value) - lib.callbacks:Fire("LibDataBroker_AttributeChanged__"..key, name, key, value) - end, - __index = function(self, key) - return attributestorage[self] and attributestorage[self][key] - end, -} - -function lib:NewDataObject(name) - if proxystorage[name] then return end - - local dataobj = setmetatable({}, domt) - proxystorage[name], namestorage[dataobj] = dataobj, name - lib.callbacks:Fire("LibDataBroker_DataObjectCreated", name, dataobj) - return dataobj + callbacks:Fire("LibDataBroker_AttributeChanged", name, key, value, self) + callbacks:Fire("LibDataBroker_AttributeChanged_"..name, name, key, value, self) + callbacks:Fire("LibDataBroker_AttributeChanged_"..name.."_"..key, name, key, value, self) + callbacks:Fire("LibDataBroker_AttributeChanged__"..key, name, key, value, self) + end end -function lib:DataObjectIterator() - return pairs(proxystorage) +if oldminor < 2 then + function lib:NewDataObject(name, dataobj) + if self.proxystorage[name] then return end + + if dataobj then + assert(type(dataobj) == "table", "Invalid dataobj, must be nil or a table") + self.attributestorage[dataobj] = {} + for i,v in pairs(dataobj) do + self.attributestorage[dataobj][i] = v + dataobj[i] = nil + end + end + dataobj = setmetatable(dataobj or {}, self.domt) + self.proxystorage[name], self.namestorage[dataobj] = dataobj, name + self.callbacks:Fire("LibDataBroker_DataObjectCreated", name, dataobj) + return dataobj + end end -function lib:GetDataObjectByName(dataobjectname) - return proxystorage[dataobjectname] +if oldminor < 1 then + function lib:DataObjectIterator() + return pairs(self.proxystorage) + end + + function lib:GetDataObjectByName(dataobjectname) + return self.proxystorage[dataobjectname] + end + + function lib:GetNameByDataObject(dataobject) + return self.namestorage[dataobject] + end end -function lib:GetNameByDataObject(dataobject) - return namestorage[dataobject] +if oldminor < 4 then + local next = pairs(attributestorage) + function lib:pairs(dataobject_or_name) + local t = type(dataobject_or_name) + assert(t == "string" or t == "table", "Usage: ldb:pairs('dataobjectname') or ldb:pairs(dataobject)") + + local dataobj = self.proxystorage[dataobject_or_name] or dataobject_or_name + assert(attributestorage[dataobj], "Data object not found") + + return next, attributestorage[dataobj], nil + end + + local ipairs_iter = ipairs(attributestorage) + function lib:ipairs(dataobject_or_name) + local t = type(dataobject_or_name) + assert(t == "string" or t == "table", "Usage: ldb:ipairs('dataobjectname') or ldb:ipairs(dataobject)") + + local dataobj = self.proxystorage[dataobject_or_name] or dataobject_or_name + assert(attributestorage[dataobj], "Data object not found") + + return ipairs_iter, attributestorage[dataobj], 0 + end end diff --git a/Locale/deDE.lua b/Locale/deDE.lua index a59ec78..cf957fe 100644 --- a/Locale/deDE.lua +++ b/Locale/deDE.lua @@ -2,7 +2,6 @@ _, BrokerGarbage = ... if GetLocale() == "deDE" then - BrokerGarbage.locale.label = "Kein Müll" -- Chat Messages @@ -72,6 +71,7 @@ if GetLocale() == "deDE" then BrokerGarbage.locale.ResetLocalDataTooltip = "Klicke um alle charakterspezifischen Statistiken zurückzusetzen." BrokerGarbage.locale.AuctionAddon = "Auktionsaddon" + BrokerGarbage.locale.AuctionAddonUnknown = "Unbekannt/Keins" -- Basic Options Frame BrokerGarbage.locale.BasicOptionsTitle = "Grundeinstellungen" @@ -175,13 +175,16 @@ if GetLocale() == "deDE" then BrokerGarbage.locale.LONSubTitle = "Analog zu den Positiv-Listen. Um eine maximale Anzahl für ein bestimmtes Item festzulegen, nutze das Mausrad über dem Item-Icon." -- Include List - BrokerGarbage.locale.LONIncludeHeader = "Einschlussliste - Items werden zuerst angezeigt und vom LM nicht geplündert." + BrokerGarbage.locale.LONIncludeHeader = "Einschlussliste - Items werden zuerst angezeigt und vom LM ignoriert." BrokerGarbage.locale.LONIncludePlusTT = "Items hinzufügen, indem du sie hierher ziehst/hier ablegst. Rechtsklick, um Kategorien hinzuzufügen!" BrokerGarbage.locale.LONIncludeMinusTT = "Wähle Items, die du entfernen willst. Dann klicke hier." BrokerGarbage.locale.LONIncludePromoteTT = "Klicke, um alle markierten Items in die globale Einschlussliste zu übernehmen." BrokerGarbage.locale.LONIncludeEmptyTT = "|cffff0000Achtung! Klicke, um die lokale Einschlussliste zu leeren.\n".. "Shift-Klicke, um die globale Einschlussliste zu leeren" + BrokerGarbage.locale.LONIncludeAutoSellText = "Automatisch Items der Einschlussliste verkaufen" + BrokerGarbage.locale.LONIncludeAutoSellTooltip = "Aktivieren, um Items von deiner Einschlussliste beim Händler zu verkaufen; wenn aktiv hat die Verkaufsliste keinerlei Einfluss.\nItems ohne Wert werden ignoriert." + -- Auto Sell List BrokerGarbage.locale.LONAutoSellHeader = "Verkaufsliste - Items hier werden bei Händlern automatisch verkauft." BrokerGarbage.locale.LONAutoSellPlusTT = "Items hinzufügen, indem du sie hierher ziehst/hier ablegst. Rechtsklick, um Kategorien hinzuzufügen!" diff --git a/Locale/enUS.lua b/Locale/enUS.lua index d10057a..28c9eb1 100644 --- a/Locale/enUS.lua +++ b/Locale/enUS.lua @@ -73,6 +73,7 @@ BrokerGarbage.locale = { ResetLocalDataTooltip = "Click here to reset all local statistics.", AuctionAddon = "Auction addon", + AuctionAddonUnknown = "Unknown/None", -- Basic Options Frame BasicOptionsTitle = "Basic Options", @@ -182,6 +183,9 @@ BrokerGarbage.locale = { LONIncludePromoteTT = "Selected items will be written onto your global Include List, as seen by every character.", LONIncludeEmptyTT = "|cffff0000Caution! Click to empty your local Include List.\n".. "SHIFT-Click to empty your global Include List.", + + LONIncludeAutoSellText = "Automatically sell include list items", + LONIncludeAutoSellTooltip = "Check this to sell items on your include list when at a merchant; using the AutoSell list has no effect then.\nItems without a value will be ignored.", -- Auto Sell List LONAutoSellHeader = "Sell List - These items will be sold automatically when at a vendor.", diff --git a/category_test.lua b/category_test.lua index fbc1d95..87bf3f7 100644 --- a/category_test.lua +++ b/category_test.lua @@ -130,7 +130,6 @@ local function ShowOptions() local function OnClick() UIDropDownMenu_SetSelectedValue(categoryString, this.category) category = this.category - BrokerGarbage.debug = this categoryText:SetText(category) BrokerGarbage:UpdatePreviewBox() end @@ -152,7 +151,6 @@ local function ShowOptions() info.func = function() category = key UIDropDownMenu_SetSelectedValue(categoryString, category) - BrokerGarbage.debug = this categoryText:SetText(category) BrokerGarbage:UpdatePreviewBox() end @@ -188,7 +186,6 @@ local function ShowOptions() info.func = function() category = valueString UIDropDownMenu_SetSelectedValue(categoryString, category) - BrokerGarbage.debug = this categoryText:SetText(category) BrokerGarbage:UpdatePreviewBox() end @@ -198,7 +195,6 @@ local function ShowOptions() info.func = function() category = valueString UIDropDownMenu_SetSelectedValue(categoryString, category) - BrokerGarbage.debug = this categoryText:SetText(category) BrokerGarbage:UpdatePreviewBox() end diff --git a/constants.lua b/constants.lua index ba8f109..8399a41 100644 --- a/constants.lua +++ b/constants.lua @@ -14,6 +14,7 @@ BrokerGarbage.defaultGlobalSettings = { disableKey = "SHIFT", sellNotWearable = false, sellNWQualityTreshold = 4, + autoSellIncludeItems = false, -- default values tooltipMaxHeight = 220, diff --git a/core.lua b/core.lua index ae06359..96f2109 100644 --- a/core.lua +++ b/core.lua @@ -6,19 +6,21 @@ _, BrokerGarbage = ... -- Libraries & setting up the LDB -- --------------------------------------------------------- -local LibQTip = LibStub("LibQTip-1.0") BrokerGarbage.PT = LibStub("LibPeriodicTable-3.1") -- notation mix-up for Broker2FuBar to work -local LDB = LibStub:GetLibrary("LibDataBroker-1.1"):NewDataObject("Broker_Garbage", { +local LDB = LibStub("LibDataBroker-1.1"):NewDataObject("Broker_Garbage", { type = "data source", icon = "Interface\\Icons\\achievement_bg_returnxflags_def_wsg", label = "Garbage", - text = BrokerGarbage.locale.label, -- this is a placeholder until the first scan + text = "Text", -- this is a placeholder until the first scan BrokerGarbage.locale.label + + OnClick = function(...) BrokerGarbage:OnClick(...) end, + OnEnter = function(...) BrokerGarbage:Tooltip(...) end, }) -LDB.OnClick = function(...) BrokerGarbage:OnClick(...) end -LDB.OnEnter = function(...) BrokerGarbage:Tooltip(...) end +--LDB.OnClick = function(...) BrokerGarbage:OnClick(...) end +--LDB.OnEnter = function(...) BrokerGarbage:Tooltip(...) end -- internal locals local locked = false @@ -59,6 +61,8 @@ local function eventHandler(self, event, ...) BrokerGarbage.isAtVendor = false locked = false BrokerGarbage:Debug("lock released") + + BrokerGarbage:ScanInventory() elseif (locked or cost ~=0) and event == "PLAYER_MONEY" then -- regular unlock @@ -92,6 +96,8 @@ local function eventHandler(self, event, ...) cost = 0 locked = false BrokerGarbage:Debug("lock released") + + BrokerGarbage:ScanInventory() end end @@ -175,9 +181,9 @@ hooksecurefunc("MerchantFrame_UpdateRepairButtons", BrokerGarbage.UpdateRepairBu -- --------------------------------------------------------- function BrokerGarbage:Tooltip(self) if BG_GlobalDB.showSource then - BrokerGarbage.tt = LibQTip:Acquire("BrokerGarbage_TT", 4, "LEFT", "RIGHT", "RIGHT", "CENTER") + BrokerGarbage.tt = LibStub("LibQTip-1.0"):Acquire("BrokerGarbage_TT", 4, "LEFT", "RIGHT", "RIGHT", "CENTER") else - BrokerGarbage.tt = LibQTip:Acquire("BrokerGarbage_TT", 3, "LEFT", "RIGHT", "RIGHT") + BrokerGarbage.tt = LibStub("LibQTip-1.0"):Acquire("BrokerGarbage_TT", 3, "LEFT", "RIGHT", "RIGHT") end BrokerGarbage.tt:Clear() @@ -241,7 +247,7 @@ end function BrokerGarbage:OnClick(itemTable, button) -- handle LDB clicks seperately if not itemTable.itemID or type(itemTable.itemID) ~= "number" then - BrokerGarbage:Debug("No valid itemTable for OnClick") + BrokerGarbage:Debug("No itemTable for OnClick, using cheapest item") itemTable = BrokerGarbage.cheapestItem end @@ -500,6 +506,7 @@ end -- scans your inventory for possible junk items and updates LDB display function BrokerGarbage:ScanInventory() BrokerGarbage.inventory = {} + BrokerGarbage.sellGear = {} BrokerGarbage.unopened = {} local limitedItemsChecked = {} @@ -655,8 +662,7 @@ function BrokerGarbage:ScanInventory() if value then value = value * count end source = BrokerGarbage.tagVendorList - elseif quality and quality <= BG_GlobalDB.dropQuality - and not IsUsableSpell(BrokerGarbage.enchanting) and BrokerGarbage:IsItemSoulbound(itemLink) + elseif not IsUsableSpell(BrokerGarbage.enchanting) and BrokerGarbage:IsItemSoulbound(itemLink) and BG_GlobalDB.sellNotWearable and quality <= BG_GlobalDB.sellNWQualityTreshold and string.find(invType, "INVTYPE") and not string.find(invType, "BAG") and not BrokerGarbage.usableByClass[BrokerGarbage.playerClass][subClass] @@ -667,7 +673,7 @@ function BrokerGarbage:ScanInventory() value = vendorPrice source = BrokerGarbage.tagUnusableGear - + elseif isExclude or (quality and quality > BG_GlobalDB.dropQuality) or not quality then -- setting the value to nil will prevent the item being inserted to our inventory table value = nil @@ -683,8 +689,10 @@ function BrokerGarbage:ScanInventory() end -- insert into BrokerGarbage.inventory - if (quality and quality <= BG_GlobalDB.dropQuality) or isSell or isInclude or isVendor then - local currentItem = { + if (quality and quality <= BG_GlobalDB.dropQuality) + or (isSell and not source == BrokerGarbage.tagUnusableGear) or isInclude or isVendor then + + tinsert(BrokerGarbage.inventory, { bag = container, slot = slot, itemID = itemID, @@ -693,9 +701,19 @@ function BrokerGarbage:ScanInventory() value = value, source = source, force = force, - } - - tinsert(BrokerGarbage.inventory, currentItem) + }) + + elseif quality > BG_GlobalDB.dropQuality and source == BrokerGarbage.tagUnusableGear then + tinsert(BrokerGarbage.sellGear, { + bag = container, + slot = slot, + itemID = itemID, + quality = quality, + count = count, + value = value, + source = source, + force = force, + }) end end end @@ -784,27 +802,43 @@ function BrokerGarbage:AutoSell() local i = 1 local skip sellValue = 0 - for _, itemTable in pairs(BrokerGarbage.inventory) do - local sellByString = false - local excludeByString = false + for _, itemTable in pairs(BrokerGarbage:JoinTables(BrokerGarbage.inventory, BrokerGarbage.sellGear)) do + local sellByString, excludeByString = false, false + local temp, checkTable + -- check if item should be saved: exclude/whitelist for setName,_ in pairs(BrokerGarbage:JoinTables(BG_GlobalDB.exclude, BG_LocalDB.exclude)) do if type(setName) == "string" then - _, sellByString = BrokerGarbage.PT:ItemInSet(itemTable.itemID, setName) + _, temp = BrokerGarbage.PT:ItemInSet(itemTable.itemID, setName) end - -- item is on save list, skip - if sellByString then - BrokerGarbage:Debug(itemTable.itemID,"in set", sellByString, "on exclude list") + if temp then + BrokerGarbage:Debug(itemTable.itemID, "is in set", temp, "on exclude list") excludeByString = true break end end - for setName,_ in pairs(BrokerGarbage:JoinTables(BG_LocalDB.autoSellList, BG_GlobalDB.autoSellList)) do + + temp = nil + -- check if item should be sold: auto sell list + if BG_GlobalDB.autoSellIncludeItems then + checkTable = BrokerGarbage:JoinTables(BG_LocalDB.include, BG_GlobalDB.include) + else + checkTable = BrokerGarbage:JoinTables(BG_LocalDB.autoSellList, BG_GlobalDB.autoSellList) + end + for setName,_ in pairs(checkTable) do if type(setName) == "string" then - _, sellByString = BrokerGarbage.PT:ItemInSet(itemTable.itemID, setName) + _, temp = BrokerGarbage.PT:ItemInSet(itemTable.itemID, setName) + end + if temp then + -- this only prints the first match + BrokerGarbage:Debug(itemTable.itemID, "is in set", temp, "on auto sell list") + sellByString = true + break end end + + -- ==== Sell Gear ==== -- -- check if this item is equippable for us local _, itemLink, quality, _, _, _, subClass, _, invType = GetItemInfo(itemTable.itemID) local sellGear = quality @@ -814,16 +848,27 @@ function BrokerGarbage:AutoSell() and not BrokerGarbage.usableByClass[BrokerGarbage.playerClass][subClass] and not BrokerGarbage.usableByAll[invType] + if sellGear then + BrokerGarbage:Debug("Item should be sold (as we cannot wear it):" .. itemLink) + end + -- shorten our literals local excludeByID = BG_GlobalDB.exclude[itemTable.itemID] or BG_LocalDB.exclude[itemTable.itemID] + if excludeByID then + BrokerGarbage:Debug(itemTable.itemID, "is excluded via its itemID") + end local autoSellByID = BG_GlobalDB.autoSellList[itemTable.itemID] or BG_LocalDB.autoSellList[itemTable.itemID] + if autoSellByID then + BrokerGarbage:Debug(itemTable.itemID, "is to be sold via its itemID") + end + -- === Actuall Selling === --- -- do the priorities right! if itemTable.value ~= 0 and not excludeByID and (autoSellByID or (not excludeByString and (sellByString or itemTable.quality == 0 or sellGear))) then if i == 1 then - BrokerGarbage:Debug("locked") + BrokerGarbage:Debug("Inventory scans locked") locked = true end @@ -839,7 +884,7 @@ function BrokerGarbage:AutoSell() end if self == _G["BrokerGarbage_SellIcon"] then - BrokerGarbage:Debug("AutoSell on Sell Icon.", BrokerGarbage:FormatMoney(sellValue), BrokerGarbage:FormatMoney(sellValue)) + BrokerGarbage:Debug("AutoSell was triggered by a click on Sell Icon.", BrokerGarbage:FormatMoney(sellValue), BrokerGarbage:FormatMoney(toSellValue)) if sellValue == 0 and BG_GlobalDB.reportNothingToSell then BrokerGarbage:Print(BrokerGarbage.locale.reportNothingToSell) diff --git a/helper.lua b/helper.lua index d6578d8..7da63b3 100644 --- a/helper.lua +++ b/helper.lua @@ -55,6 +55,10 @@ function BrokerGarbage:Count(table) return i end +function BrokerGarbage:ErrorReport() + -- TODO +end + -- Saved Variables Management / API -- --------------------------------------------------------- function BrokerGarbage:CheckSettings() @@ -141,7 +145,7 @@ end -- returns an item's itemID function BrokerGarbage:GetItemID(itemLink) if not itemLink then return end - local itemID = string.gsub(itemLink, ".*|Hitem:([0-9]*):.*", "%1") + local itemID = string.gsub(itemLink, ".-Hitem:([0-9]*):.*", "%1") return tonumber(itemID) end diff --git a/options.lua b/options.lua index 8c5a68a..dd73139 100644 --- a/options.lua +++ b/options.lua @@ -517,6 +517,7 @@ local function ShowOptions(frame) local enchanter = LibStub("tekKonfig-Checkbox").new(BrokerGarbage.basicOptions, nil, BrokerGarbage.locale.enchanterTitle, "LEFT", sellNotUsable, "LEFT", 200, 0) enchanter.tiptext = BrokerGarbage.locale.enchanterTooltip enchanter:SetChecked(BG_GlobalDB.hasEnchanter) + local checksound = enchanter:GetScript("OnClick") enchanter:SetScript("OnClick", function(enchanter) checksound(enchanter) BG_GlobalDB.hasEnchanter = not BG_GlobalDB.hasEnchanter @@ -838,9 +839,18 @@ local function ShowListOptions(frame) emptyIncludeList.tiptext = BrokerGarbage.locale.LONIncludeEmptyTT -- list frame: auto sell + local autoSellIncludeItems = LibStub("tekKonfig-Checkbox").new(BrokerGarbage.listOptionsNegative, nil, BrokerGarbage.locale.LONIncludeAutoSellText, "TOPLEFT", includeBox, "BOTTOMLEFT", 0, 6) + autoSellIncludeItems.tiptext = BrokerGarbage.locale.LONIncludeAutoSellTooltip + autoSellIncludeItems:SetChecked(BG_GlobalDB.autoSellIncludeItems) + local checksound = autoSellIncludeItems:GetScript("OnClick") + autoSellIncludeItems:SetScript("OnClick", function(autoSellIncludeItems) + checksound(autoSellIncludeItems) + BG_GlobalDB.autoSellIncludeItems = not BG_GlobalDB.autoSellIncludeItems + end) + local autosellListHeader = BrokerGarbage.listOptionsNegative:CreateFontString(nil, "ARTWORK", "GameFontHighlightSmall") autosellListHeader:SetHeight(32) - autosellListHeader:SetPoint("TOPLEFT", includeBox, "BOTTOMLEFT", 0, -8) + autosellListHeader:SetPoint("TOPLEFT", autoSellIncludeItems, "BOTTOMLEFT", 0, 12) autosellListHeader:SetText(BrokerGarbage.locale.LONAutoSellHeader) local autosellBox = CreateFrame("ScrollFrame", "BG_AutosellListBox", BrokerGarbage.listOptionsNegative, "UIPanelScrollFrameTemplate") -- 1.7.9.5