-
-
Notifications
You must be signed in to change notification settings - Fork 13
HOWTO Search
plusmouse edited this page May 6, 2024
·
9 revisions
First call, itemData should be in the format described here.
local resultingItem = Syndicator.Search.GetBaseInfo(
itemData
)This returns the minimal data needed to do a search based off of the item. Item data input:
{
["itemCount"] = 11,
["itemID"] = 168645,
["isBound"] = false,
["quality"] = 1,
["itemLink"] = "|cffffffff|Hitem:168645::::::::70:259:::::::::|h[Moist Fillet]|h|r",
["iconTexture"] = 3007464,
}resultingItem output:
{
itemCount=11,
itemID=168645,
isBound=false,
tooltipGetter=<function>,
itemLink="|cffffffff|Hitem:168645::::::::70:259:::::::::|h[Moist Fillet]|h|r",
quality=1,
} Now call Syndicator.Search.CheckItem
local searchTerm = -- some string
local checkResult = Syndicator.Search.CheckItem(resultingItem, searchTerm)checkResult may be nil in which case you need to call the Syndicator.Search.CheckItem function again on the next frame until it returns either true or false to indicate that the item matches searchTerm