Uniquely Identifying Items
Hey all,
I'm making an addon for Classic and need a way to uniquely identify soul shards Warlocks create in their bags. I've read through the API and couldn't really find anything. The best solution I came up with was using the bag number and slot number to map to corresponding soul shards. This approach however ran into its own issue. I would like to use the tooltip widget to hover over a soul shard and display information unique to that specific soul shard. The problem is the tooltip functions provide no way of getting the bag index/slot index of the item you're hovering over. I could get this information if the user selects (locks) a soul shard from the inventory, but that's not the solution I'm looking for. Thanks! |
If the GameTooltip is showing for an item then the mouse is still over that item so you can use GetMouseFocus:
Code:
local focus = GetMouseFocus() |
Awesome, thank you so much!
|
Sounds like a fun personal project I made a while ago that tracks who's soul a shard is created from.
It even shows the origin of the shard used to create healthstones, soulstones, and even summoned demons. It also works on generic item tooltips, meaning ActionButton tooltips work. |
classic has the item api retail uses, at least according to the code extract. Here's what I use in a retail weakaura to track and loot openable looted items:
Lua Code:
The bag update event opens the specific openable I'm tracking while saving that bag's GUID, then the loot opened event checks the loot source and if it's a guid I saved, autoloot it all. |
Quote:
|
Quote:
|
Quote:
|
Sure. It's just prototype code atm. I'll get it uploaded once I get it into a more polished state.
|
All times are GMT -6. The time now is 11:13 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI