Originally Posted by loff93
Awesome, wasn't sure how to write
Code:
local name, _, _, _, _, _, _, _, _, texture = GetItemInfo(itemID)
without storing everything etc. Works really well , but only if the character has already cached the texture.
How do I solve this issue:
When character has already "GET_ITEM_INFO_RECEIVE" the item ID but still needs the texture?
|
Just call
GetItemInfo again:
Lua Code:
cache_writer:SetScript('OnEvent', function(self, event, ...)
if event == 'GET_ITEM_INFO_RECEIVED' then
local itemID = ...
if wait[itemID] then
local _, _, _, _, _, _, _, _, _, texture = GetItemInfo(itemID)
print(texture)
wait[itemID] = nil
end
end
end)
-- edit #1
But if you need only icon textures, you're better off using
GetItemInfoInstant instead. This way you can avoid this cache voodoo.