Open exochron opened 1 year ago
For my addon I got a little workaround. Feel free to use and tweak :)
local DoesItemExistInGame
if true == C_Item.DoesItemExistByID(1) then
DoesItemExistInGame = function(itemId)
return C_Item.GetItemIconByID(itemId) ~= 134400 -- question icon
end
else
DoesItemExistInGame = function(itemId)
return C_Item.DoesItemExistByID(itemId)
end
end
Related - I suspect the same thing causing this issue also applies to the GET_ITEM_INFO_RECEIVED
event fired after running GetItemInfo
. The event's payload is the itemID and a boolean indicating success. Expected behavior of that boolean value would be; true
for valid items, false
for blocked/forbidden items, and nil
for items that don't exist. Right now, all non-existent items return false, as if they exist and are blocked/forbidden.
This could be by design, but no way to know for sure.
This issue exists now on Cata Classic (beta)
And Classic Season of Discovery 1.15.2.54332
In Patch 10.1.0 the function C_Item.DoesItemExistByID() always returns true for any positive number. I don't know exactly when it stopped working. I guess it probably happened sometime during Dragonflight.
However it does still works properly in Classic and Wrath.