WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   General Authoring Discussion (https://www.wowinterface.com/forums/forumdisplay.php?f=20)
-   -   How can I get the number of items in a stack under the cursor? (https://www.wowinterface.com/forums/showthread.php?t=8402)

Ahm 02-06-07 01:56 PM

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


All times are GMT -6. The time now is 08:53 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI