Thread Tools Display Modes
07-17-20, 08:26 PM   #1
Spawnova
A Warpwood Thunder Caller
 
Spawnova's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2012
Posts: 96
How to set companion pet ability to tooltip

I'm trying to parse the data from the FloatingPetBattleAbilityTooltip however I don't actually know how to set the ability to the tooltip, and I can't find much information online.



Code:
local tip = FloatingPetBattleAbilityTooltip
local text = tip.Description:GetText()
print(text)
Works just fine for getting the text, but only if i manually click an ability.

Does anyone know how to do this, or is there a better way to get ability tooltip information on companion pet abilities?
  Reply With Quote
07-18-20, 11:28 AM   #2
Gello
A Molten Giant
AddOn Author - Click to view addons
Join Date: Jan 2005
Posts: 521
Code:
FloatingPetBattleAbility_Show(abilityID,maxHealth,power,speed)
local tip = FloatingPetBattleAbilityTooltip
local text = tip.Description:GetText()
print(text)
You probably want to tip:Hide() afterwards too if you just wanted to get the text.
  Reply With Quote
07-18-20, 07:15 PM   #3
Spawnova
A Warpwood Thunder Caller
 
Spawnova's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2012
Posts: 96
Thanks dude that was exactly what I was using for!
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » How to set companion pet ability to tooltip

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