Quantcast

typo fixed in deDE locale, fixed different handling of junk items vs. sell items (no more statistics inflation on this part), fixed possible error when not supplying any parameter to LDB's OnClick function

ckaotik [08-31-10 - 14:56]
typo fixed in deDE locale, fixed different handling of junk items vs. sell items (no more statistics inflation on this part), fixed possible error when not supplying any parameter to LDB's OnClick function
Filename
core.lua
helper.lua
locale/deDE.lua
options.lua
diff --git a/core.lua b/core.lua
index 9be5db7..7020a04 100644
--- a/core.lua
+++ b/core.lua
@@ -294,7 +294,7 @@ end
 function BrokerGarbage:OnClick(itemTable, button)
     -- handle LDB clicks seperately
     local LDBclick = false
-    if not itemTable.itemID or type(itemTable.itemID) ~= "number" then
+    if not itemTable or not itemTable.itemID or type(itemTable.itemID) ~= "number" then
         BrokerGarbage:Debug("Click on LDB")
         itemTable = BrokerGarbage.cheapestItems[1]
         LDBclick = true
@@ -623,6 +623,9 @@ function BrokerGarbage:ScanInventory()
     for container = 0,4 do
         BrokerGarbage:ScanInventoryContainer(container)
     end
+    if BrokerGarbage.isAtVendor then
+        BrokerGarbage:UpdateRepairButton()
+    end
 end

 -- scans your inventory bags for possible junk items and updates LDB display
diff --git a/helper.lua b/helper.lua
index ddbf2b9..0a8aad3 100644
--- a/helper.lua
+++ b/helper.lua
@@ -522,7 +522,10 @@ function BrokerGarbage:UpdateCache(itemID)

 	local tvalue, tclass = BrokerGarbage:GetSingleItemValue(itemID)
 	if not class then class = tclass end
-	if not (class == BrokerGarbage.VENDOR or class == BrokerGarbage.VENDORLIST) then value = tvalue end
+	if not (class == BrokerGarbage.VENDOR or class == BrokerGarbage.VENDORLIST or
+		(class == BrokerGarbage.INCLUDE and BG_GlobalDB.autoSellIncludeItems)) then
+		value = tvalue
+	end

 	-- save to items cache
 	if not class or not quality then
diff --git a/locale/deDE.lua b/locale/deDE.lua
index fd66ed5..7e0184b 100644
--- a/locale/deDE.lua
+++ b/locale/deDE.lua
@@ -159,7 +159,7 @@ if GetLocale() == "deDE" then
 	BrokerGarbage.locale.LOTitle = "Listen"
 	BrokerGarbage.locale.LOSubTitle = [[Wenn du Hilfe brauchst, klicke das "?"-Tab an.

-|cffffd200Müll|r: Diese Liste beinhaltet Items, die  weggeworfen werden können.
+|cffffd200Müll|r: Diese Liste beinhaltet Items, die weggeworfen werden können.
 |cffffd200Behalten|r: Items auf dieser Liste werden nie weggeworfen.
 |cffffd200Händlerpreis|r: Items nutzen keine Auktionspreise. (immer global!)
 |cffffd200Verkaufen|r: Diese Items werden bei Händlern automatisch verkauft.]]
diff --git a/options.lua b/options.lua
index 6578ee9..ae6bc1e 100644
--- a/options.lua
+++ b/options.lua
@@ -691,6 +691,8 @@ local function ShowListOptions(frame)
 	autoSellIncludeItems:SetScript("OnClick", function(autoSellIncludeItems)
 		checksound(autoSellIncludeItems)
 		BG_GlobalDB.autoSellIncludeItems = not BG_GlobalDB.autoSellIncludeItems
+		BrokerGarbage.itemsCache = {}
+		BrokerGarbage:ScanInventory()
 	end)

 	local topTab = LibStub("tekKonfig-TopTab")