diff --git a/Broker_Garbage.toc b/Broker_Garbage.toc
index 2826168..60b9e85 100644
--- a/Broker_Garbage.toc
+++ b/Broker_Garbage.toc
@@ -1,4 +1,4 @@
-## Interface: 30300
+## Interface: 40000
## Dependencies:
## OptionalDeps: LibPeriodicTable-3.1, Auctionator, AuctionLite, Auc-Advanced, Enchantrix, WOWEcon_PriceMod
## SavedVariables: BG_GlobalDB
@@ -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.3v29
+## Version: 3.3v30
## X-Website: http://www.wowinterface.com/downloads/info15531-Broker_Garbage.html
## X-RelSite-WoWI: 15531
## X-Category: Inventory
diff --git a/category_test.lua b/category_test.lua
index feb5249..a3a5fb8 100644
--- a/category_test.lua
+++ b/category_test.lua
@@ -12,8 +12,8 @@ if BrokerGarbage.PT then
GameTooltip:SetOwner(self, "ANCHOR_RIGHT")
if self.tiptext then
GameTooltip:SetText(self.tiptext, nil, nil, nil, nil, true)
- elseif self.itemLink then
- GameTooltip:SetHyperlink(self.itemLink)
+ elseif self.link then
+ GameTooltip:SetHyperlink(self.link)
end
GameTooltip:Show()
end
@@ -29,92 +29,12 @@ if BrokerGarbage.PT then
edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border", edgeSize = 16
}
- function BrokerGarbage:UpdatePreviewBox(finish)
- if category == nil or category == "" then return end
- if not BrokerGarbage.listButtons.preview then BrokerGarbage.listButtons.preview = {} end
- local buttonList = BrokerGarbage.listButtons.preview
- local itemList = {}
-
- local index = 1
- for itemID, value, set in BrokerGarbage.PT:IterateSet(category) do
- if buttonList[index] then
- -- use available button
- local button = buttonList[index]
- local itemLink, texture
- _, itemLink, _, _, _, _, _, _, _, texture, _ = GetItemInfo(itemID)
- button.itemID = itemID
- button.itemLink = itemLink
- button:SetNormalTexture(texture)
- button:SetChecked(false)
- button:Show()
-
- else
- -- create another button
- local iconbutton = CreateFrame("CheckButton", "BG_PreviewIconButton"..index, _G["BG_PreviewBoxContent"])
- iconbutton:Hide()
- iconbutton:SetWidth(36)
- iconbutton:SetHeight(36)
-
- iconbutton:SetNormalTexture("Interface\\Icons\\Inv_misc_questionmark")
- iconbutton:SetHighlightTexture("Interface\\Buttons\\ButtonHilight-Square")
- iconbutton:SetCheckedTexture("Interface\\Buttons\\UI-Button-Outline")
- iconbutton:SetChecked(false)
- local tex = iconbutton:GetCheckedTexture()
- tex:ClearAllPoints()
- tex:SetPoint("CENTER")
- tex:SetWidth(36/37*66) tex:SetHeight(36/37*66)
-
- iconbutton:SetScript("OnClick", function(self)
- local check = self:GetChecked()
- BrokerGarbage:Debug("OnClick", check)
-
- if IsModifiedClick("CHATLINK") and ChatFrameEditBox:IsVisible() then
- -- post item link
- ChatFrameEditBox:Insert(self.itemLink)
- self:SetChecked(not check)
- else
- self:SetChecked(not check)
- end
- end)
- iconbutton:SetScript("OnEnter", ShowTooltip)
- iconbutton:SetScript("OnLeave", HideTooltip)
-
- if index == 1 then
- -- place first icon
- iconbutton:SetPoint("TOPLEFT", "BG_PreviewBoxContent", "TOPLEFT", 6, -6)
- elseif mod(index, numCols) == 1 then
- -- new row
- iconbutton:SetPoint("TOPLEFT", buttonList[index-numCols], "BOTTOMLEFT", 0, -6)
- else
- -- new button next to the old one
- iconbutton:SetPoint("LEFT", buttonList[index-1], "RIGHT", 4, 0)
- end
- buttonList[index] = iconbutton
- end
-
- if GetItemCount(itemID) ~= 0 and not itemList[itemID] then
- itemList[itemID] = true
- index = index + 1
- end
- end
-
- -- hide unnessessary buttons
- while buttonList[index] do
- buttonList[index]:Hide()
- index = index + 1
- end
-
- if not finish then
- BrokerGarbage:UpdatePreviewBox(true)
- end
- end
-
local function ShowOptions()
local title, subtitle = LibStub("tekKonfig-Heading").new(BrokerGarbage.categoryTest, BrokerGarbage.locale.PTCategoryTestTitle, BrokerGarbage.locale.PTCategoryTestSubTitle)
local explainText = BrokerGarbage.categoryTest:CreateFontString(nil, "ARTWORK", "GameFontHighlightSmall")
explainText:SetPoint("TOPLEFT", subtitle, "BOTTOMLEFT", 0, 0)
- explainText:SetPoint("RIGHT", BrokerGarbage.categoryTest, -32, 0)
+ explainText:SetPoint("RIGHT", BrokerGarbage.categoryTest, -16, 0)
explainText:SetHeight(40)
explainText:SetNonSpaceWrap(true)
explainText:SetJustifyH("LEFT")
@@ -122,87 +42,92 @@ if BrokerGarbage.PT then
explainText:SetText(BrokerGarbage.locale.PTCategoryTestExplanation)
-- dropdown menu for choosing the LPT string to view
- local categoryString, categoryText, categoryContainer = LibStub("tekKonfig-Dropdown").new(BrokerGarbage.categoryTest, BrokerGarbage.locale.PTCategoryTestDropdownTitle, "TOPLEFT", explainText, "BOTTOMLEFT", 0, -10)
+ local categoryString, categoryText, categoryContainer = LibStub("tekKonfig-Dropdown").new(BrokerGarbage.categoryTest, BrokerGarbage.locale.PTCategoryTestDropdownTitle, "TOPLEFT", explainText, "BOTTOMLEFT")
categoryText:SetText(BrokerGarbage.locale.PTCategoryTestDropdownText)
categoryString:SetWidth(400)
- local function OnClick()
- UIDropDownMenu_SetSelectedValue(categoryString, this.category)
- category = this.category
- categoryText:SetText(category)
- BrokerGarbage:UpdatePreviewBox()
+ local function UpdatePreviewBox()
+ local category = UIDropDownMenu_GetSelectedValue(categoryString)
+ if not category or category == "" then return end
+
+ local index, itemList = 0, {}
+ for itemID, value in BrokerGarbage.PT:IterateSet(category) do
+ local show = false
+ if GetItemCount(itemID) ~= 0 and not itemList[itemID] then
+ itemList[itemID] = true
+ index = index + 1
+ show = true
+ end
+
+ if show then
+ local button = _G["BG_PreviewIconButton"..index]
+ if not button then
+ -- create another button
+ button = CreateFrame("Button", "BG_PreviewIconButton"..index, _G["BG_PreviewBoxContent"], "ItemButtonTemplate")
+
+ button:SetScript("OnClick", function(self)
+ HandleModifiedItemClick(self.link)
+ end)
+ button:SetScript("OnEnter", ShowTooltip)
+ button:SetScript("OnLeave", HideTooltip)
+
+ if index == 1 then -- place first icon
+ button:SetPoint("TOPLEFT", "BG_PreviewBoxContent", "TOPLEFT", 6, -6)
+ elseif mod(index, numCols) == 1 then -- new row
+ button:SetPoint("TOPLEFT", _G["BG_PreviewIconButton"..index-numCols], "BOTTOMLEFT", 0, -6)
+ else -- new button next to the old one
+ button:SetPoint("LEFT", _G["BG_PreviewIconButton"..index-1], "RIGHT", 4, 0)
+ end
+ end
+ local _, itemLink, _, _, _, _, _, _, _, texture = GetItemInfo(itemID)
+ button.itemID = itemID
+ button.link = itemLink
+ SetItemButtonTexture(button, texture or "Interface\\Icons\\Inv_misc_questionmark")
+ button:Show()
+ end
+ end
+
+ -- hide unnessessary buttons
+ index = index + 1
+ while _G["BG_PreviewIconButton"..index] do
+ _G["BG_PreviewIconButton"..index]:Hide()
+ index = index + 1
+ end
+ end
+
+ local function OnDropDownClick(self)
+ UIDropDownMenu_SetSelectedValue(categoryString, self.value)
+ categoryText:SetText(self.value)
+ UpdatePreviewBox()
end
- UIDropDownMenu_Initialize(categoryString, function(self,level)
+ UIDropDownMenu_Initialize(categoryString, function(self, level)
local selected = UIDropDownMenu_GetSelectedValue(categoryString)
- level = level or 1
- if level == 1 then
- for key, subarray in pairs(BrokerGarbage.PTSets) do
- -- submenus
- local info = UIDropDownMenu_CreateInfo()
- info.hasArrow = true
- info.text = key
- info.category = key
- info.checked = key == selected
- info.value = {
- [1] = key
- }
- info.func = function()
- category = key
- UIDropDownMenu_SetSelectedValue(categoryString, category)
- categoryText:SetText(category)
- BrokerGarbage:UpdatePreviewBox()
- end
- UIDropDownMenu_AddButton(info, level)
+
+ local dataTable = BrokerGarbage.PTSets
+ if UIDROPDOWNMENU_MENU_VALUE and string.find(UIDROPDOWNMENU_MENU_VALUE, ".") then
+ local parts = { strsplit(".", UIDROPDOWNMENU_MENU_VALUE) } or {}
+ for k = 1, #parts do
+ dataTable = dataTable[ parts[k] ]
end
+ elseif UIDROPDOWNMENU_MENU_VALUE then
+ dataTable = dataTable[ UIDROPDOWNMENU_MENU_VALUE ] or {}
+ end
- else
- -- getting values of first menu
- local parentValue = UIDROPDOWNMENU_MENU_VALUE
- local PTSets = BrokerGarbage.PTSets
- for i = 1, level - 1 do
- PTSets = PTSets[ parentValue[i] ]
+ for key, value in pairs(dataTable) do
+ local info = UIDropDownMenu_CreateInfo()
+ local prefix = ""
+ if UIDROPDOWNMENU_MENU_VALUE then
+ prefix = UIDROPDOWNMENU_MENU_VALUE .. "."
end
- for key, value in pairs(PTSets) do
- local newValue = {}
- for i = 1, level - 1 do
- newValue[i] = parentValue[i]
- end
- newValue[level] = key
- -- calculate category string
- local valueString = newValue[1]
- for i = 2, level do
- valueString = valueString.."."..newValue[i]
- end
-
- local info = UIDropDownMenu_CreateInfo();
- if type(value) == "table" then
- -- submenu
- info.hasArrow = true
- info.category = valueString
- info.value = newValue
- info.func = function()
- category = valueString
- UIDropDownMenu_SetSelectedValue(categoryString, category)
- categoryText:SetText(category)
- BrokerGarbage:UpdatePreviewBox()
- end
- else
- -- end node
- info.hasArrow = false
- info.func = function()
- category = valueString
- UIDropDownMenu_SetSelectedValue(categoryString, category)
- categoryText:SetText(category)
- BrokerGarbage:UpdatePreviewBox()
- end
- end
- info.checked = valueString == selected
- info.text = key
-
- UIDropDownMenu_AddButton(info, level);
- end
+ info.text = key
+ info.value = prefix .. key
+ info.hasArrow = type(value) == "table" and true or false
+ info.checked = info.value == selected
+ info.func = OnDropDownClick
+
+ UIDropDownMenu_AddButton(info, level);
end
end)
@@ -222,11 +147,10 @@ if BrokerGarbage.PT then
previewBox:SetScrollChild(group_preview)
-- now do the update & reset functions
- BrokerGarbage:UpdatePreviewBox()
- BrokerGarbage.categoryTest:SetScript("OnShow", BrokerGarbage.UpdatePreviewBox)
+ UpdatePreviewBox()
+ BrokerGarbage.categoryTest:SetScript("OnShow", UpdatePreviewBox)
end
- --BrokerGarbage.categoryTest:SetScript("OnShow", ShowOptions)
table.insert(BrokerGarbage.optionsModules, BrokerGarbage.categoryTest)
BrokerGarbage.optionsModules[#BrokerGarbage.optionsModules].OnShow = ShowOptions
end
\ No newline at end of file
diff --git a/constants.lua b/constants.lua
index 071eaad..49422c9 100644
--- a/constants.lua
+++ b/constants.lua
@@ -82,7 +82,7 @@ BrokerGarbage.tag = {
BrokerGarbage.clams = {15874, 5523, 5524, 7973, 24476, 36781, 45909}
BrokerGarbage.playerClass = select(2,UnitClass("player"))
-BrokerGarbage.enchanting = select(1,GetSpellInfo(7411))
+BrokerGarbage.enchanting = GetSpellInfo(7411)
BrokerGarbage.disableKey = {
["None"] = function() return false end,
diff --git a/core.lua b/core.lua
index 7020a04..eea34d3 100644
--- a/core.lua
+++ b/core.lua
@@ -44,7 +44,7 @@ local cost = 0 -- the amount of money that we repaired for
-- Event Handler
-- ---------------------------------------------------------
local frame = CreateFrame("frame")
-local function eventHandler(self, event, ...)
+local function eventHandler(self, event, arg1, ...)
if event == "PLAYER_ENTERING_WORLD" then
BrokerGarbage:CheckSettings()
@@ -63,7 +63,7 @@ local function eventHandler(self, event, ...)
frame:UnregisterEvent("PLAYER_ENTERING_WORLD")
elseif event == "BAG_UPDATE" then
- if arg1 < 0 or arg1 > 4 then return end
+ if not arg1 or arg1 < 0 or arg1 > 4 then BrokerGarbage:Debug("Unknown bag id") return end
BrokerGarbage:ScanInventoryContainer(arg1) -- partial inventory scan on the relevant container
@@ -639,7 +639,7 @@ function BrokerGarbage:ScanInventoryContainer(container)
for slot = 1, numSlots do
local itemID = GetContainerItemID(container,slot)
local item = BrokerGarbage:GetCached(itemID)
-
+ BrokerGarbage:Debug("checking", itemID, item)
if itemID and item then
-- update toSellValue
if item.classification == BrokerGarbage.VENDORLIST or
diff --git a/helper.lua b/helper.lua
index 0a8aad3..741d28a 100644
--- a/helper.lua
+++ b/helper.lua
@@ -119,19 +119,25 @@ function BrokerGarbage:CreateDefaultLists(global)
end
-- tradeskills
- local tradeSkills = BrokerGarbage:CheckSkills() or {}
- local numSkills = #tradeSkills
- for i = 1, numSkills do
- local englishSkill = BrokerGarbage:UnLocalize(tradeSkills[i][1])
+ local tradeSkills, limit
+ if GetProfessions then
+ tradeSkills = { GetProfessions() }
+ limit = 6 -- GetProfessions() returns 6 indices
+ else
+ tradeSkills = BrokerGarbage:CheckSkills() or {}
+ limit = #tradeSkills
+ end
+ for i = 1, limit do
+ local englishSkill, isGather = BrokerGarbage:UnLocalize(tradeSkills[i])
if englishSkill then
- if tradeSkills[i][2] then
- BG_LocalDB.exclude["Tradeskill.Gather."..englishSkill] = true
+ if isGather then
+ BG_LocalDB.exclude["Tradeskill.Gather." .. englishSkill] = true
if englishSkill ~= "Herbalism" then
- BG_LocalDB.exclude["Tradeskill.Tool."..englishSkill] = true
+ BG_LocalDB.exclude["Tradeskill.Tool." .. englishSkill] = true
end
else
- BG_LocalDB.exclude["Tradeskill.Mat.ByProfession."..englishSkill] = true
- BG_LocalDB.exclude["Tradeskill.Tool."..englishSkill] = true
+ BG_LocalDB.exclude["Tradeskill.Mat.ByProfession." .. englishSkill] = true
+ BG_LocalDB.exclude["Tradeskill.Tool." .. englishSkill] = true
end
end
end
@@ -175,16 +181,22 @@ function BrokerGarbage:GetItemID(itemLink)
end
-- returns original English names for non-English locales
-function BrokerGarbage:UnLocalize(skillName)
- if not skillName then return nil end
+function BrokerGarbage:UnLocalize(skillIndex)
+ if not skillIndex then return nil, nil end
+ local skillName
+ if type(skillIndex) == "number" then
+ skillName = GetProfessionInfo(skillIndex)
+ else
+ skillName = skillIndex
+ end
if string.find(GetLocale(), "en") then return skillName end
-- crafting skills
local searchString = ""
- for i=2,12 do
+ for i = 2,12 do
searchString = select(i, GetAuctionItemSubClasses(9))
if string.find(skillName, searchString) then
- return BrokerGarbage.tradeSkills[i]
+ return BrokerGarbage.tradeSkills[i], false
end
end
@@ -202,7 +214,7 @@ function BrokerGarbage:UnLocalize(skillName)
end
end
- return skill
+ return skill, skill and true or nil
end
-- easier syntax for LDB display strings
@@ -309,6 +321,7 @@ function BrokerGarbage:GetTradeSkill(skillName)
return nil
end
+-- BEGIN :: REMOVE IN CATACLYSM
-- returns all tradeskills found
function BrokerGarbage:CheckSkills()
local result = {}
@@ -325,6 +338,7 @@ function BrokerGarbage:CheckSkills()
end
if result == {} then return nil else return result end
end
+-- END :: REMOVE IN CATACLYSM
local scanTooltip = CreateFrame('GameTooltip', 'BGItemScanTooltip', UIParent, 'GameTooltipTemplate')
-- misc: either "true" to check only for the current character, or a table {container, slot} for reference
@@ -338,15 +352,21 @@ function BrokerGarbage:CanDisenchant(itemLink, misc)
and (not count or count == 1) then
-- can we DE ourself?
+ -- name, icon, rank, maxrank, numspells, spelloffset, skillline = GetProfessionInfo(index)
+
if IsUsableSpell(BrokerGarbage.enchanting) then
- local skill = BrokerGarbage:GetTradeSkill(BrokerGarbage.enchanting) or 0
+ local prof1, prof2 = GetProfessions()
+ local name, _, rank, maxRank = GetProfessionInfo(prof1)
+ if name ~= BrokerGarbage.enchanting then
+ name, _, rank, maxRank = GetProfessionInfo(prof2)
+ end
local requiredSkill = 0
if level <= 20 then
requiredSkill = 1
elseif level <= 60 then
requiredSkill = 5*5*math.ceil(level/5)-100
- elseif level < 100 then -- BC starts here
+ elseif level < 100 then -- BC starts here
requiredSkill = 225
elseif level <= 115 then
requiredSkill = 275
@@ -358,10 +378,10 @@ function BrokerGarbage:CanDisenchant(itemLink, misc)
requiredSkill = 375
end
- if skill >= requiredSkill then
+ if rank >= requiredSkill then
return true
end
- -- if skill is too low, still check if we can send it
+ -- if skill rank is too low, still check if we can send it
end
-- misc = "true" => we only care if we ourselves can DE. no twink mail etc.
if misc and type(misc) == "boolean" then return false end
@@ -411,7 +431,7 @@ function BrokerGarbage:UpdateCache(itemID)
local class, temp, limit
local _, itemLink, quality, _, _, _, subClass, stackSize, invType, _, value = GetItemInfo(itemID)
-
+ BrokerGarbage:Debug("updating cache", itemID)
-- weird ...
if not quality then
BrokerGarbage:Debug("Could not retrieve quality information for "..(itemID or "<none>").." ("..(itemLink or "")..")")
diff --git a/locale/deDE.lua b/locale/deDE.lua
index 7e0184b..56c0ba2 100644
--- a/locale/deDE.lua
+++ b/locale/deDE.lua
@@ -28,6 +28,7 @@ if GetLocale() == "deDE" then
BrokerGarbage.locale.minValueSet = "Mindestwert für items wurde auf %s gesetzt."
BrokerGarbage.locale.warningMessagePrefit = "Warnung"
+ BrokerGarbage.locale.GlobalSetting = "\n|cffffff9aDiese Einstellung ist global."
-- Tooltip
BrokerGarbage.locale.headerRightClick = "Rechts-Klick: Optionen"
diff --git a/locale/enUS.lua b/locale/enUS.lua
index 34da1ff..9a3fc9f 100644
--- a/locale/enUS.lua
+++ b/locale/enUS.lua
@@ -28,6 +28,7 @@ BrokerGarbage.locale = {
minValueSet = "Items with a value less than %s will not be looted anymore.",
warningMessagePrefit = "Warning",
+ GlobalSetting = "\n|cffffff9aThis setting is global.",
-- Tooltip
headerRightClick = "Right-Click for options",
diff --git a/options.lua b/options.lua
index ae6bc1e..3a3137e 100644
--- a/options.lua
+++ b/options.lua
@@ -346,7 +346,7 @@ local function ShowBasicOptions()
local title0, subtitle0 = LibStub("tekKonfig-Heading").new(BrokerGarbage.basicOptions, "Broker_Garbage - "..BrokerGarbage.locale.BasicOptionsTitle, BrokerGarbage.locale.BasicOptionsText)
local autosell = LibStub("tekKonfig-Checkbox").new(BrokerGarbage.basicOptions, nil, BrokerGarbage.locale.autoSellTitle, "TOPLEFT", subtitle0, "BOTTOMLEFT", -2, -4)
- autosell.tiptext = BrokerGarbage.locale.autoSellText
+ autosell.tiptext = BrokerGarbage.locale.autoSellText .. BrokerGarbage.locale.GlobalSetting
autosell:SetChecked(BG_GlobalDB.autoSellToVendor)
local checksound = autosell:GetScript("OnClick")
autosell:SetScript("OnClick", function(autosell)
@@ -355,7 +355,7 @@ local function ShowBasicOptions()
end)
local autosellicon = LibStub("tekKonfig-Checkbox").new(BrokerGarbage.basicOptions, nil, BrokerGarbage.locale.showAutoSellIconTitle, "TOPLEFT", autosell, "BOTTOMLEFT", 14, 0)
- autosellicon.tiptext = BrokerGarbage.locale.showAutoSellIconText
+ autosellicon.tiptext = BrokerGarbage.locale.showAutoSellIconText .. BrokerGarbage.locale.GlobalSetting
autosellicon:SetChecked(BG_GlobalDB.showAutoSellIcon)
local checksound = autosellicon:GetScript("OnClick")
autosellicon:SetScript("OnClick", function(autosellicon)
@@ -365,7 +365,7 @@ local function ShowBasicOptions()
end)
local nothingtext = LibStub("tekKonfig-Checkbox").new(BrokerGarbage.basicOptions, nil, BrokerGarbage.locale.showNothingToSellTitle, "TOPLEFT", autosellicon, "BOTTOMLEFT", 0, 0)
- nothingtext.tiptext = BrokerGarbage.locale.showNothingToSellText
+ nothingtext.tiptext = BrokerGarbage.locale.showNothingToSellText .. BrokerGarbage.locale.GlobalSetting
nothingtext:SetChecked(BG_GlobalDB.reportNothingToSell)
local checksound = nothingtext:GetScript("OnClick")
nothingtext:SetScript("OnClick", function(nothingtext)
@@ -374,7 +374,7 @@ local function ShowBasicOptions()
end)
local autorepair = LibStub("tekKonfig-Checkbox").new(BrokerGarbage.basicOptions, nil, BrokerGarbage.locale.autoRepairTitle, "LEFT", autosell, "LEFT", 200, 0)
- autorepair.tiptext = BrokerGarbage.locale.autoRepairText
+ autorepair.tiptext = BrokerGarbage.locale.autoRepairText .. BrokerGarbage.locale.GlobalSetting
autorepair:SetChecked(BG_GlobalDB.autoRepairAtVendor)
local checksound = autorepair:GetScript("OnClick")
autorepair:SetScript("OnClick", function(autorepair)
@@ -392,7 +392,7 @@ local function ShowBasicOptions()
end)
local showsource = LibStub("tekKonfig-Checkbox").new(BrokerGarbage.basicOptions, nil, BrokerGarbage.locale.showSourceTitle, "TOPLEFT", guildrepair, "BOTTOMLEFT", -14, 0)
- showsource.tiptext = BrokerGarbage.locale.showSourceText
+ showsource.tiptext = BrokerGarbage.locale.showSourceText .. BrokerGarbage.locale.GlobalSetting
showsource:SetChecked(BG_GlobalDB.showSource)
local checksound = showsource:GetScript("OnClick")
showsource:SetScript("OnClick", function(showsource)
@@ -401,7 +401,7 @@ local function ShowBasicOptions()
end)
local showlost = LibStub("tekKonfig-Checkbox").new(BrokerGarbage.basicOptions, nil, BrokerGarbage.locale.showLostTitle, "TOPLEFT", nothingtext, "BOTTOMLEFT", -14, 0)
- showlost.tiptext = BrokerGarbage.locale.showLostText
+ showlost.tiptext = BrokerGarbage.locale.showLostText .. BrokerGarbage.locale.GlobalSetting
showlost:SetChecked(BG_GlobalDB.showLost)
local checksound = showlost:GetScript("OnClick")
showlost:SetScript("OnClick", function(showlost)
@@ -410,7 +410,7 @@ local function ShowBasicOptions()
end)
local showearned = LibStub("tekKonfig-Checkbox").new(BrokerGarbage.basicOptions, nil, BrokerGarbage.locale.showEarnedTitle, "LEFT", showlost, "LEFT", 200, 0)
- showearned.tiptext = BrokerGarbage.locale.showEarnedText
+ showearned.tiptext = BrokerGarbage.locale.showEarnedText .. BrokerGarbage.locale.GlobalSetting
showearned:SetChecked(BG_GlobalDB.showEarned)
local checksound = showearned:GetScript("OnClick")
showearned:SetScript("OnClick", function(showearned)
@@ -419,7 +419,7 @@ local function ShowBasicOptions()
end)
local quality = LibStub("tekKonfig-Slider").new(BrokerGarbage.basicOptions, BrokerGarbage.locale.dropQualityTitle, 0, 7, "TOPLEFT", showlost, "BOTTOMLEFT", 5, -10)
- quality.tiptext = BrokerGarbage.locale.dropQualityText
+ quality.tiptext = BrokerGarbage.locale.dropQualityText .. BrokerGarbage.locale.GlobalSetting
quality:SetWidth(200)
quality:SetValueStep(1)
quality:SetValue(BG_GlobalDB.dropQuality)
@@ -434,7 +434,7 @@ local function ShowBasicOptions()
local testValue = 130007
local moneyFormat = LibStub("tekKonfig-Slider").new(BrokerGarbage.basicOptions, BrokerGarbage.locale.moneyFormatTitle, 0, 4, "LEFT", quality, "LEFT", 200, 0)
- moneyFormat.tiptext = BrokerGarbage.locale.moneyFormatText
+ moneyFormat.tiptext = BrokerGarbage.locale.moneyFormatText .. BrokerGarbage.locale.GlobalSetting
moneyFormat:SetWidth(200)
moneyFormat:SetValueStep(1);
moneyFormat:SetValue(BG_GlobalDB.showMoney)
@@ -447,7 +447,7 @@ local function ShowBasicOptions()
end)
local ttMaxItems = LibStub("tekKonfig-Slider").new(BrokerGarbage.basicOptions, BrokerGarbage.locale.maxItemsTitle, 0, 50, "TOPLEFT", quality, "BOTTOMLEFT", 0, -15)
- ttMaxItems.tiptext = BrokerGarbage.locale.maxItemsText
+ ttMaxItems.tiptext = BrokerGarbage.locale.maxItemsText .. BrokerGarbage.locale.GlobalSetting
ttMaxItems:SetWidth(200)
ttMaxItems:SetValueStep(1);
ttMaxItems:SetValue(BG_GlobalDB.tooltipNumItems)
@@ -460,7 +460,7 @@ local function ShowBasicOptions()
end)
local ttMaxHeight = LibStub("tekKonfig-Slider").new(BrokerGarbage.basicOptions, BrokerGarbage.locale.maxHeightTitle, 0, 400, "LEFT", ttMaxItems, "LEFT", 200, 0)
- ttMaxHeight.tiptext = BrokerGarbage.locale.maxHeightText
+ ttMaxHeight.tiptext = BrokerGarbage.locale.maxHeightText .. BrokerGarbage.locale.GlobalSetting
ttMaxHeight:SetWidth(200)
ttMaxHeight:SetValueStep(10);
ttMaxHeight:SetValue(BG_GlobalDB.tooltipMaxHeight)
@@ -473,7 +473,7 @@ local function ShowBasicOptions()
end)
local sellNotUsable = LibStub("tekKonfig-Checkbox").new(BrokerGarbage.basicOptions, nil, BrokerGarbage.locale.sellNotUsableTitle, "TOPLEFT", ttMaxItems, "BOTTOMLEFT", 0, -10)
- sellNotUsable.tiptext = BrokerGarbage.locale.sellNotUsableText
+ sellNotUsable.tiptext = BrokerGarbage.locale.sellNotUsableText .. BrokerGarbage.locale.GlobalSetting
sellNotUsable:SetChecked(BG_GlobalDB.sellNotWearable)
local checksound = sellNotUsable:GetScript("OnClick")
sellNotUsable:SetScript("OnClick", function(sellNotUsable)
@@ -482,7 +482,7 @@ local function ShowBasicOptions()
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
+ sellNUQuality.tiptext = BrokerGarbage.locale.SNUMaxQualityText .. BrokerGarbage.locale.GlobalSetting
sellNUQuality:SetWidth(200)
sellNUQuality:SetValueStep(1);
sellNUQuality:SetValue(BG_GlobalDB.sellNWQualityTreshold)
@@ -497,12 +497,12 @@ local function ShowBasicOptions()
local disableKey, disableKeytext, disableKeycontainer = LibStub("tekKonfig-Dropdown").new(BrokerGarbage.basicOptions, BrokerGarbage.locale.DKTitle, "TOPLEFT", sellNUQuality, "BOTTOMLEFT", -25, -16)
disableKeytext:SetText(BrokerGarbage.locale.disableKeys[BG_GlobalDB.disableKey])
- disableKey.tiptext = BrokerGarbage.locale.DKTooltip
+ disableKey.tiptext = BrokerGarbage.locale.DKTooltip .. BrokerGarbage.locale.GlobalSetting
- local function OnClick()
- UIDropDownMenu_SetSelectedValue(disableKey, this.value)
- disableKeytext:SetText(BrokerGarbage.locale.disableKeys[this.value])
- BG_GlobalDB.disableKey = this.value
+ local function OnClick(self)
+ UIDropDownMenu_SetSelectedValue(disableKey, self.value)
+ disableKeytext:SetText(BrokerGarbage.locale.disableKeys[self.value])
+ BG_GlobalDB.disableKey = self.value
end
UIDropDownMenu_Initialize(disableKey, function()
local selected, info = UIDropDownMenu_GetSelectedValue(disableKey), UIDropDownMenu_CreateInfo()
@@ -517,7 +517,7 @@ local function ShowBasicOptions()
end)
local enchanter = LibStub("tekKonfig-Checkbox").new(BrokerGarbage.basicOptions, nil, BrokerGarbage.locale.enchanterTitle, "LEFT", sellNotUsable, "LEFT", 200, 0)
- enchanter.tiptext = BrokerGarbage.locale.enchanterTooltip
+ enchanter.tiptext = BrokerGarbage.locale.enchanterTooltip .. BrokerGarbage.locale.GlobalSetting
enchanter:SetChecked(BG_GlobalDB.hasEnchanter)
local checksound = enchanter:GetScript("OnClick")
enchanter:SetScript("OnClick", function(enchanter)
@@ -531,7 +531,7 @@ local function ShowBasicOptions()
editbox:SetWidth(150); editbox:SetHeight(32)
editbox:SetFontObject("GameFontHighlightSmall")
editbox:SetText(BG_GlobalDB.LDBformat)
- editbox.tiptext = BrokerGarbage.locale.LDBDisplayTextTooltip
+ editbox.tiptext = BrokerGarbage.locale.LDBDisplayTextTooltip .. BrokerGarbage.locale.GlobalSetting
local left = editbox:CreateTexture(nil, "BACKGROUND")
left:SetWidth(8) left:SetHeight(20)
@@ -598,7 +598,7 @@ local function ShowBasicOptions()
editbox2:SetWidth(150); editbox2:SetHeight(32)
editbox2:SetFontObject("GameFontHighlightSmall")
editbox2:SetText(BG_GlobalDB.LDBNoJunk)
- editbox2.tiptext = BrokerGarbage.locale.LDBNoJunkTextTooltip
+ editbox2.tiptext = BrokerGarbage.locale.LDBNoJunkTextTooltip .. BrokerGarbage.locale.GlobalSetting
local left2 = editbox2:CreateTexture(nil, "BACKGROUND")
left2:SetWidth(8) left2:SetHeight(20)
@@ -685,7 +685,7 @@ local function ShowListOptions(frame)
end)
local autoSellIncludeItems = LibStub("tekKonfig-Checkbox").new(frame, nil, BrokerGarbage.locale.LOIncludeAutoSellText, "LEFT", default, "RIGHT", 10, 0)
- autoSellIncludeItems.tiptext = BrokerGarbage.locale.LOIncludeAutoSellTooltip
+ autoSellIncludeItems.tiptext = BrokerGarbage.locale.LOIncludeAutoSellTooltip .. BrokerGarbage.locale.GlobalSetting
autoSellIncludeItems:SetChecked(BG_GlobalDB.autoSellIncludeItems)
local checksound = autoSellIncludeItems:GetScript("OnClick")
autoSellIncludeItems:SetScript("OnClick", function(autoSellIncludeItems)
diff --git a/readme.txt b/readme.txt
index c32f99c..8ee0301 100644
--- a/readme.txt
+++ b/readme.txt
@@ -1,7 +1,7 @@
Broker_Garbage
==============
Author: ckaotik
-Version: 3.3v29
+Version: 3.3v30
WoW Version: 3.3.5 (TOC 30300)
WoWInterface: http://www.wowinterface.com/downloads/info15531-Broker_Garbage.html