Forums WoW Modding Support Archives WoWModding Support Archives [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

[DiscordArchive] Hi guys, I am writing an addon that gets some item ID from the sever and then displays a frame based

rektbyfaith
Administrator
0
12-14-2023, 04:04 PM
#1
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?
rektbyfaith
12-14-2023, 04:04 PM #1

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?

rektbyfaith
Administrator
0
12-14-2023, 04:19 PM
#2
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.
rektbyfaith
12-14-2023, 04:19 PM #2

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.

rektbyfaith
Administrator
0
12-14-2023, 04:20 PM
#3
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
rektbyfaith
12-14-2023, 04:20 PM #3

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

rektbyfaith
Administrator
0
12-14-2023, 04:20 PM
#4
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.
rektbyfaith
12-14-2023, 04:20 PM #4

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.

rektbyfaith
Administrator
0
12-14-2023, 06:04 PM
#5
Archived author: Foe • Posted: 2023-12-14T18:04:39.575000+00:00
Original source

You do
rektbyfaith
12-14-2023, 06:04 PM #5

Archived author: Foe • Posted: 2023-12-14T18:04:39.575000+00:00
Original source

You do

Recently Browsing
 1 Guest(s)
Recently Browsing
 1 Guest(s)