LiteBag

271k Downloads

Cata Classic: Bag Search Produces Guild Bank Error

Clamsoda opened this issue ยท 4 comments

commented

Once Blizzard_GuildBank is loaded, using the search in inventory/bank produces this error:

10x ...ns/Blizzard_GuildBankUI/TBC/Blizzard_GuildBankUI.lua:512: attempt to call method 'UpdateFiltered' (a nil value)
[string "@Blizzard_GuildBankUI/TBC/Blizzard_GuildBankUI.lua"]:512: in function <...ns/Blizzard_GuildBankUI/TBC/Blizzard_GuildBankUI.lua:510>
[string "=[C]"]: in function `SetItemSearch'
[string "@Blizzard_UIPanelTemplates/Classic/UIPanelTemplates.lua"]:32: in function <...izzard_UIPanelTemplates/Classic/UIPanelTemplates.lua:23>

LeatrixPlus uses this code to circumvent this issue it appears:

-- Function to unregister search event for guild bank since it isn't used
local function SetGuildBankFunc()
	for i = 1, 6 do
		_G["GuildBankTab" .. i].Button:UnregisterEvent("INVENTORY_SEARCH_UPDATE")
	end
end

-- Run search event function when Blizzard addon is loaded
if C_AddOns.IsAddOnLoaded("Blizzard_GuildBankUI") then
	SetGuildBankFunc()
else
	local waitFrame = CreateFrame("FRAME")
	waitFrame:RegisterEvent("ADDON_LOADED")
	waitFrame:SetScript("OnEvent", function(self, event, arg1)
		if arg1 == "Blizzard_GuildBankUI" then
			SetGuildBankFunc()
			waitFrame:UnregisterAllEvents()
		end
	end)
end
commented

How interesting! A Blizzard bug they never trigger because they never hit that code path.

commented

Try 4.4.0-4-cata see if that fixes it. Once again I can't test it (this time because my level 60 death knight is not in a guild).

commented

Works as expected.

Thanks!

commented

Terrific thanks for confirming.