Thread Tools Display Modes
11-25-10, 12:53 PM   #1
jaliborc
A Chromatic Dragonspawn
 
jaliborc's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2007
Posts: 196
Client Item Query Changes

I've been hearing a lot about changes brought by the Cataclysm client to the item query system, but I was not able to find any actual information about it anywhere.
Can anyone point me the way/tell me what changed?

Thank you in advance.
  Reply With Quote
11-25-10, 01:55 PM   #2
Xinhuan
A Chromatic Dragonspawn
 
Xinhuan's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 174
Old behavior:

GetItemInfo() returns one of:

A) Returns a lot of stuff. Means the item is in the local cache.

B) Returns nil. Means the item is not in the local cache. You will need to tooltip:SetHyperlink(link) in order to query the server for the item which will be returned asynchronously.

This means if you run a 1-55000 loop and GetItemInfo() every one of them, you will at most get a split second freeze and determine what's in your cache and what's not.


Current behavior:

GetItemInfo() returns one of:

A) Returns a lot of stuff. Means the item is in the local cache.

B) Returns nil. Means the item is not in the local cache AND the wow client will query the server for the item asynchronously.

This means if you run a 1-55000 loop and GetItemInfo() every one of them, you will hang your WoW client as it queries the 50 thousand+ items that aren't in your local cache for about 30 seconds to 2 minutes (depending on your computer and Internet speed), and then the WoW server will disconnect you (if you haven't task-killed WoW yet) for spamming it and/or for timing out.

If by some miracle you didn't get disconnected (it has happened before) at the end of the loop, you will then have every item in your cache (with about 40000 holes between 1-55000 which aren't valid items), until you exit WoW fully where it clears your item cache.

Since patch 4.0.1, WoW no longer maintains an itemcache file and will query the server for every item you own and those of people within visible range of you every login. It maintains this cache in memory only, and only until you exit WoW.

Essentially, the new behavior breaks addons that rely on searching the itemcache to provide whatever it is the addon needs.
__________________
Author of Postal, Omen3, GemHelper, BankItems, WoWEquip, GatherMate, GatherMate2, Routes and Cartographer_Routes

Last edited by Xinhuan : 11-25-10 at 01:59 PM.
  Reply With Quote
11-25-10, 02:53 PM   #3
Dridzt
A Pyroguard Emberseer
 
Dridzt's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2005
Posts: 1,360
Nice info and nicely structured Xinhuan
  Reply With Quote
11-26-10, 06:27 PM   #4
jaliborc
A Chromatic Dragonspawn
 
jaliborc's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2007
Posts: 196
Thanks Xinhuan, that was helpful.
  Reply With Quote
12-31-10, 01:32 PM   #5
Szyarah
A Defias Bandit
Join Date: Nov 2009
Posts: 2
On another subject but since you're here, Xin...

Would cheerfully do a lot of things I wouldn't ordinarily do for an update of Gem Helper, possibly the most ingenious skill UI ever devised!

cheers Xinhuan...

Thanks for all your wonderful addons and sharing your knowledge with us. Happy New Year!
  Reply With Quote
01-02-11, 12:14 PM   #6
jaliborc
A Chromatic Dragonspawn
 
jaliborc's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2007
Posts: 196
I have one more question tough: if we have a list of itemID's (lets say, 50 different ones) we want to get the information from, is it still possible to do?
For example, asking 1 by 1 in intervals? Or are we always subject to a possible disconnect?
  Reply With Quote
01-05-11, 08:30 AM   #7
Xinhuan
A Chromatic Dragonspawn
 
Xinhuan's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 174
Originally Posted by Szyarah View Post
Would cheerfully do a lot of things I wouldn't ordinarily do for an update of Gem Helper, possibly the most ingenious skill UI ever devised!

cheers Xinhuan...

Thanks for all your wonderful addons and sharing your knowledge with us. Happy New Year!
Believe me, I want to update GemHelper too. But it also happens to be almost the least popular (in terms of downloads) of all my addons, and some of the other addons I have are still broken.
__________________
Author of Postal, Omen3, GemHelper, BankItems, WoWEquip, GatherMate, GatherMate2, Routes and Cartographer_Routes
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » Client Item Query Changes


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off