Quantcast

fixed wrong values being assigned to forced/listed items. fixed enUS localization. fixed error created by slash-adding limited items that the server does not know

ckaotik [08-15-10 - 20:59]
fixed wrong values being assigned to forced/listed items. fixed enUS localization. fixed error created by slash-adding limited items that the server does not know
Filename
core.lua
locale/deDE.lua
locale/enUS.lua
options.lua
diff --git a/core.lua b/core.lua
index 1a63c88..a55c871 100644
--- a/core.lua
+++ b/core.lua
@@ -702,6 +702,7 @@ function BrokerGarbage:GetCheapest(number)

                     insert = true
                     local value = count * item.value
+                    local vendorValue = select(11, GetItemInfo(itemID)) * count
                     local classification = item.classification

                     -- remember lootable items
@@ -747,7 +748,7 @@ function BrokerGarbage:GetCheapest(number)
                         -- check if item is really soulbound
                         if BrokerGarbage:IsItemSoulbound(itemID, container, slot) then
                             -- use vendor price instead
-                            value = select(11, GetItemInfo(itemID))
+                            value = vendorValue
                             classification = BrokerGarbage.VENDOR
                         end

@@ -760,7 +761,7 @@ function BrokerGarbage:GetCheapest(number)
                         value = 0

                     elseif item.classification == BrokerGarbage.VENDORLIST or item.classification == BrokerGarbage.VENDOR then
-                        value = select(11, GetItemInfo(itemID))
+                        value = vendorValue
                     end

                     if item.quality > BG_GlobalDB.dropQuality and
diff --git a/locale/deDE.lua b/locale/deDE.lua
index 0215235..fd66ed5 100644
--- a/locale/deDE.lua
+++ b/locale/deDE.lua
@@ -215,4 +215,4 @@ Unterhalb dieses Fensters siehst du 5 Buttons und eine Suchleiste.
 	BrokerGarbage.locale.PTCategoryTestExplanation = "Wähle einfach unten eine Kategorie aus und es wird dir alle Gegenstände aus deinem Inventar anzeigen, die dazuzählen.\nKategoriedaten kommen von LPT und nicht Broker_Garbage."
 	BrokerGarbage.locale.PTCategoryTestDropdownTitle = "Kategorie, die getestet werden soll"
 	BrokerGarbage.locale.PTCategoryTestDropdownText = "Wähle eine Kategorie"
-end
+end
\ No newline at end of file
diff --git a/locale/enUS.lua b/locale/enUS.lua
index 51966d0..f9b584b 100644
--- a/locale/enUS.lua
+++ b/locale/enUS.lua
@@ -39,7 +39,6 @@ BrokerGarbage.locale = {
 	increaseTreshold = "Increase quality treshold",

 	categoriesHeading = "Categories",
-	unknownAuctionAddon = "Unknown/None",
 	LPTNotLoaded = "LibPeriodicTable not loaded",

 	autoSellTooltip = "Sell Items for %s",
@@ -79,12 +78,12 @@ BrokerGarbage.locale = {
 	ResetLocalDataTooltip = "Click here to reset all local statistics.",

 	AuctionAddon = "Auction addon",
-	AuctionAddonUnknown = "Unknown/None",
+	unknown = "Unbekannt",	-- refers to auction addon
+	na = "Nicht vorhanden",

 	-- Basic Options Frame
 	BasicOptionsTitle = "Basic Options",
-	BasicOptionsText = "Don't want to auto-sell/repair? "..
-		"Hold Shift (depending on your settings) when adressing the merchant!",
+	BasicOptionsText = "Don't want to auto-sell/repair? Hold Shift (depending on your settings) when adressing the merchant!",
 	autoSellTitle = "Auto Sell",
 	autoSellText = "Toggles whether to automatically sell your gray items when at a vendor.",

diff --git a/options.lua b/options.lua
index 28a7da7..bab94db 100644
--- a/options.lua
+++ b/options.lua
@@ -63,13 +63,13 @@ BrokerGarbage.listButtons = {}
 -- button tooltip infos
 local function ShowTooltip(self)
 	GameTooltip:SetOwner(self, "ANCHOR_RIGHT")
-	if self.tiptext and self.itemID and self.tiptext ~= "ID: "..self.itemID then
+	if self.tiptext and not self.itemID then
 		local text = string.gsub(self.tiptext, "%.", " |cffffd200>|r ")

 		GameTooltip:ClearLines()
 		GameTooltip:AddLine("LibPeriodicTable")
 		GameTooltip:AddLine(text, 1, 1, 1, true)
-	elseif self.tiptext then
+	elseif self.tiptext and self.itemID then
 		GameTooltip:SetText(self.tiptext, nil, nil, nil, nil, true)
 	elseif self.itemLink then
 		GameTooltip:SetHyperlink(self.itemLink)
@@ -1380,7 +1380,7 @@ function SlashCmdList.BROKERGARBAGE(msg, editbox)
 		else
 			BG_LocalDB.include[itemID] = count
 		end
-		local itemLink = select(2,GetItemInfo(itemID))
+		local itemLink = select(2,GetItemInfo(itemID)) or BrokerGarbage.locale.unknown
 		BrokerGarbage:Print(format(BrokerGarbage.locale.limitSet, itemLink, count))
 		BrokerGarbage:ListOptionsUpdate("include")