Thread Tools Display Modes
02-06-07, 01:56 PM   #1
Ahm
A Fallenroot Satyr
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 20
How can I get the number of items in a stack under the cursor?

I'm trying to make an addon similar to SellValue that records the price of each item that you bring to a merchant so that you can view the price while on the field.

My problem at the moment is figuring out how many items are in the stack that your cursor is hovering over.



I thought of iterating through each slot of each bag til you come across an item with the same name.. but that would potentially fail if you have more than one stack of an item.

The only API I've found to return the stack count is GetContainerItemInfo, but that requires a bag and slot number... and I haven't found a cursor-oriented API that'd give that info.


So... does anyone else have any ideas?



Update
Cogwheel answered this for me on Blizzard's WoW Forums. You can find the answer here: http://forums.worldofwarcraft.com/th...picId=74318784

Last edited by Ahm : 02-06-07 at 04:02 PM.
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » How can I get the number of items in a stack under the cursor?

Thread Tools
Display Modes

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