Thread Tools Display Modes
11-18-14, 08:46 AM   #1
hellfreeze
A Defias Bandit
Join Date: Nov 2014
Posts: 3
Equpped Item stat change

I would like to extract the compared item stats that appear in the tooltip when holding shift and hovering over an item in your bag (either through macro or addon). Is there an easy way to get these?
  Reply With Quote
11-18-14, 01:20 PM   #2
hellfreeze
A Defias Bandit
Join Date: Nov 2014
Posts: 3
After doing some digging it looks like the only event that comes remotely close to firing is the:

MODIFIER_STATE_CHANGED

Unfortunately this happens everytime the shift key is pressed and has nothing to do with mousing over items. I don't know yet how to hook functions to grab when the equipped item compare window is shown and I can't seem to find anything in the API reference associated with it (admittedly I'm quite novice at this).

Is there some global variable that stores this comparison info? can I use the GetItemInfo() function somehow?

Any/all help is greatly appreciated, I will continue to dig...but it is going painfully slow. Even some example code that does something similar might give me a good jump start on this.
  Reply With Quote
11-18-14, 05:16 PM   #3
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,315
You need to look into the OnEnter handler for the button you're hovering over.
I think the tooltip population is all done in C code though. Most of the stock text in tooltips are.
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)
  Reply With Quote
11-18-14, 06:13 PM   #4
hellfreeze
A Defias Bandit
Join Date: Nov 2014
Posts: 3
Thanks, I found the ACE libraries and life is easy again.
  Reply With Quote
11-18-14, 10:14 PM   #5
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
I have no idea how any Ace3 libraries have anything to do with extracting stats from tooltips.

I'd suggest hooking the OnShow script for the compare tooltips instead of listening for the modifier change event:
  • ShoppingTooltip1
  • ShoppingTooltip2
  • ItemRefShoppingTooltip1
  • ItemRefShoppingTooltip2
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » Macro Help » Equpped Item stat change

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