Quantcast WoWInterface - View Single Post - GetLootSourceInfo() Partially Broken in 5.4.2?
View Single Post
01-10-14, 07:03 PM   #10
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 1,022
The unique ID field is mentioned on the itemString page on wowpedia with some theories about how it works and what it represents.

From my own observances it seems to be capable of identifying a particular stack of cloth in my inventory as it's moved around with a clearly distinct ID from other stacks. Splitting the stack results in 2 stacks with the same ID and dropping new items onto an existing stack kept the existing stack's ID.

As long as the containers aren't stackable I doubt any two will have the same ID, and I don't think any containers that produce a loot window can be stacked. Clams can be stacked but simply dump their contents into your inventory when clicked.

I have a feeling that containers will all have a unique ID because of their unique contents, but I really can't say definitively.

If all else fails, it should be possible to uniquely identify an item by its slot if you keep track of what's in every inventory slot and compare it to the previous entries every time it's updated.

For example, if I know which slots are containers and I loot a new container that's identical to an existing one, I can still tell the difference between them because the new one is in a different slot than the existing one.

When the bag update event fires I can check my table of known container slots to see if any are missing, then check the rest of the inventory slots to see if it's been moved (same container that's missing is in another slot) or destroyed (no other slots contain the missing container).

Last edited by semlar : 01-10-14 at 07:21 PM.
  Reply With Quote