LibItemSearch-1.3

LibItemSearch-1.3

1.2k Downloads

BCC Error with LibItemSearch.

Xruptor opened this issue ยท 0 comments

commented

LibItemSearch-1.2-22.lua:252: attempt to call field 'GetAzeriteCurrencyID' (a nil value)

Solution check for Azerite before adding the filter.

if C_AzeriteItem and C_CurrencyInfo.GetAzeriteCurrencyID then
	Lib.Filters.azerite = {
		keyword = C_CurrencyInfo.GetBasicCurrencyInfo(C_CurrencyInfo.GetAzeriteCurrencyID()).name:lower(),

		canSearch = function(self, operator, search)
			return not operator and self.keyword:find(search)
		end,

		match = function(self, link)
			return C_AzeriteItem.IsAzeriteItemByID(link) or C_AzeriteEmpoweredItem.IsAzeriteEmpoweredItemByID(link)
		end
	}
end