WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   How to set companion pet ability to tooltip (https://www.wowinterface.com/forums/showthread.php?t=58106)

Spawnova 07-17-20 08:26 PM

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?

Gello 07-18-20 11:28 AM

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.

Spawnova 07-18-20 07:15 PM

Thanks dude that was exactly what I was using for!


All times are GMT -6. The time now is 04:19 AM.

vBulletin © 2020, Jelsoft Enterprises Ltd
© 2004 - 2020 MMOUI