BetterBags icon indicating copy to clipboard operation
BetterBags copied to clipboard

Add support for a global function, BetterBagsSearch()

Open Protuhj opened this issue 1 year ago • 7 comments

Addon Version

v0.1.96

World of Warcraft Version

Retail

Describe the bug

Using the WoW API call C_Container.SetItemSearch("search string") BB doesn't filter.

This worked in AdiBags, and should work in BB too. It also works with the default bag.

Steps to reproduce

  1. Open the bag
  2. Run the command in chat: /run C_Container.SetItemSearch("soulbound") soulbound items should be highlighted.

Protuhj avatar Aug 16 '24 06:08 Protuhj

Thanks for the report.

Since we have our own comprehensive search engine, there is no way that I know of to get the parameter passed into SetItemSearch cleanly. The Blizzard event does not return the actual search term, unfortunately. If I discover a way to do this, I'll get it done, but it does seem unlikely right now. I'll ask around to make sure.

Cidan avatar Aug 16 '24 06:08 Cidan

I'd say supporting this is kinda fundamental to being a bag replacement addon.

Protuhj avatar Aug 16 '24 07:08 Protuhj

It's fundamentally impossible to support with custom search -- Blizzard does not expose a way to do it.

How about another custom function, like BetterBagsSearch("your string") as a global?

Cidan avatar Aug 16 '24 14:08 Cidan

A global would work.

Protuhj avatar Aug 16 '24 16:08 Protuhj

Awesome, I'll add that in soon as I need to do some other work around this anyway :)

Cidan avatar Aug 16 '24 17:08 Cidan

It looks like only adibags use the default search. I've tested it with arkinventory, sorted, baganator, bagnon and none works with /run C_Container.SetItemSearch("soulbound").

juntereiner avatar Aug 16 '24 17:08 juntereiner

It looks like only adibags use the default search. I've tested it with arkinventory, sorted, baganator, bagnon and none works with /run C_Container.SetItemSearch("soulbound").

Yeah that's right. Anything that implements any sort of improvement to the search engine will bypass the built in search constructs, as Blizzard doesn't allow for any sort of modification to their search logic.

Cidan avatar Aug 16 '24 21:08 Cidan