[DiscordArchive] Hi guys, I am writing an addon that gets some item ID from the sever and then displays a frame based
[DiscordArchive] Hi guys, I am writing an addon that gets some item ID from the sever and then displays a frame based
Archived author: Fred • Posted: 2023-12-14T16:04:30.604000+00:00
Original source
Hi guys, I am writing an addon that gets some item ID from the sever and then displays a frame based on this information, but I get all nils before the item has been cached in the client.
How do I go about "caching" the item first before getting the item information? Any ideas? 3.3.5a AzerothCore w AIO
local name, link, rarity, itemLevel, minLevel, type, subType, stackCount, equipLoc, icon, sellPrice = GetItemInfo(itemId);
Are all nil the first time, second time around after relogging I have proper frames and values. Thanks.
Edit: any way to say like, query server for item X, wait until done, continue?
Archived author: stoneharry • Posted: 2023-12-14T16:19:33.956000+00:00
Original source
Maybe take a look at Atlas addon to see how to request the info. The client has to send a request to the server for the item information, and the server can throttle the requests.
Archived author: stoneharry • Posted: 2023-12-14T16:20:21.329000+00:00
Original source
I'm not sure if you get an event when the correct full item packet has been received
Archived author: Fred • Posted: 2023-12-14T16:20:56.585000+00:00
Original source
Gotcha, thanks; I ended up querying through request a tooltip with an item entry and then listening to when the first response from that "query" comes back - a bit hacky but does the job.
Archived author: Foe • Posted: 2023-12-14T18:04:39.575000+00:00
Original source
You do