From e2d246c4ea109e61be3ad6c56997611b51f81558 Mon Sep 17 00:00:00 2001 From: Xruptor Date: Mon, 1 Mar 2010 17:45:31 -0500 Subject: [PATCH] Another darn fix for the IsTabViewable function. --- BagSync.lua | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/BagSync.lua b/BagSync.lua index d85e19c..9cd959b 100644 --- a/BagSync.lua +++ b/BagSync.lua @@ -544,25 +544,23 @@ function BagSync:ScanGuildBank() local numTabs = GetNumGuildBankTabs() for tab = 1, numTabs do - if IsTabViewable(tab) then - for slot = 1, MAX_GUILDBANK_SLOTS_PER_TAB do + for slot = 1, MAX_GUILDBANK_SLOTS_PER_TAB do + + local link = GetGuildBankItemLink(tab, slot) + local index = GetTag('guild', tab, slot) - local link = GetGuildBankItemLink(tab, slot) - local index = GetTag('guild', tab, slot) + if link then + local linkItem = ToShortLink(link) + local _, count = GetGuildBankItemInfo(tab, slot); + count = count > 1 and count or nil - if link then - local linkItem = ToShortLink(link) - local _, count = GetGuildBankItemInfo(tab, slot); - count = count > 1 and count or nil - - if (linkItem and count) then - BS_GD[BS_DB.guild][index] = format('%s,%d', linkItem, count) - else - BS_GD[BS_DB.guild][index] = linkItem - end + if (linkItem and count) then + BS_GD[BS_DB.guild][index] = format('%s,%d', linkItem, count) else - BS_GD[BS_DB.guild][index] = nil + BS_GD[BS_DB.guild][index] = linkItem end + else + BS_GD[BS_DB.guild][index] = nil end end end -- 1.7.9.5