From 91e444cca786014ced599c2edc3e88d4a98e1198 Mon Sep 17 00:00:00 2001 From: ckaotik Date: Sat, 22 May 2010 02:02:43 +0200 Subject: [PATCH] auto sell only if allowed to --- core.lua | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/core.lua b/core.lua index 079bfd7..69eace3 100644 --- a/core.lua +++ b/core.lua @@ -757,6 +757,10 @@ function BrokerGarbage:AutoSell() if self == _G["BrokerGarbage_SellIcon"] then BrokerGarbage:Debug("AutoSell was triggered by a click on Sell Icon.") + + elseif not BG_GlobalDB.autoSellToVendor then + -- we're not supposed to sell. jump out + return end local sell, classification local item, itemID, value, count, numSlots @@ -775,8 +779,7 @@ function BrokerGarbage:AutoSell() sell = false -- various cases that have us sell this item if item.classification == BrokerGarbage.UNUSABLE then - local quality = select(3, GetItemInfo(itemID)) - if BG_GlobalDB.sellNotWearable and quality <= BG_GlobalDB.sellNWQualityTreshold then + if BG_GlobalDB.sellNotWearable and item.quality <= BG_GlobalDB.sellNWQualityTreshold then sell = true end @@ -788,7 +791,6 @@ function BrokerGarbage:AutoSell() elseif item.classification ~= BrokerGarbage.EXCLUDE and item.quality == 0 then sell = true - end -- Actual Selling -- 1.7.9.5