From 9dcfe6b9b5906519bc488b46a83f6c6d78ab6685 Mon Sep 17 00:00:00 2001 From: torhal Date: Fri, 10 Jul 2009 08:30:00 +0000 Subject: [PATCH] In addon:ScanVendor(): Don't call addon:DisplayTextDump() unless something has actually been added to the output table. --- ARLDatamine.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ARLDatamine.lua b/ARLDatamine.lua index 5855668..af91538 100644 --- a/ARLDatamine.lua +++ b/ARLDatamine.lua @@ -970,6 +970,7 @@ function addon:ScanVendor() local targetID = tonumber(string.sub(UnitGUID("target"),-12,-7),16) -- Get the NPC ID local t = {} + local added = false -- Parse all the items on the merchant for i = 1,GetMerchantNumItems(),1 do @@ -977,6 +978,7 @@ function addon:ScanVendor() -- Get the name local name,_,_,_,numAvailable = GetMerchantItemInfo(i) if (name) then + added = true -- Get rid of the first part of the item local recipename = gsub(name,"%a+\: ","") -- Find out what spell ID we're using @@ -1003,7 +1005,10 @@ function addon:ScanVendor() end end end - self:DisplayTextDump(nil,nil,tconcat(t,"\n")) + + if added then + self:DisplayTextDump(nil,nil,tconcat(t,"\n")) + end ARLDatamineTT:Hide() else self:Print(L["DATAMINER_VENDOR_NOTTARGETTED"]) -- 1.7.9.5