My addon checks for items in inventory.
If nil, set an event frame, the addon returns many items that were not cached, except my item.
local cache_writer = CreateFrame('Frame')
cache_writer:RegisterEvent('GET_ITEM_INFO_RECEIVED')
cache_writer:SetScript('OnEvent', function(self, event, ...)
if event == 'GET_ITEM_INFO_RECEIVED' then
-- the info is now downloaded and cached
local itemID = ...
print("cache_writer: ", itemID, itemID==30817)
getIIR(itemID)
end
end)
I am seeing items in the print statement that my character does not even own or spell, like Soul Shard. The toon I am testing with is a warrior.
Or my main, Prot Paladin as in the screen capture.
What is even more strange to me is when I reload, the item info is returned properly because of the cache, but the item shows in the GET_ITEM_INFO_RECEIVED event.
Why if it is cached? I am wasting way too much time on this. Obviously I am doing something wrong, but I don’t know what.
Code that is called initially to either get the item info or trigger the GIIR event...
else
local icount = GetItemCount(item:GetItemID())
--Info: false 30817 nil 985 1 30817
print("Info: ", iname==nil, iname, " ", icount, k, v)
end
And why would item 6265 be in the GIIR even multiple times ?
Thank you,
Mike