When I call GetGuildBankItemLink() the returned link is just [Pet Cage]. If the cage is in my bag when I call GetContainerItemLink() I get a link that I can phrase out the pet name etc. Is there a different function or any way to get pet detail from cages in the guild bank?
something like this - dry coded, not tested
it needs a tooltip. the one i use is created in XML but you should be able to google how to create one in Lua
local h = GetGuildBankItemLink( tab, slot )
local texture, count = GetGuildBankItemInfo( tab, slot )
if texture then
yourcustomtooltip:ClearLines( )
local speciesID, level, breedQuality, maxHealth, power, speed, name = yourcustomtooltip:SetGuildBankItem( tab, slot )
if speciesID then
h = string.format( "battlepet:%s:%s:%s:%s:%s:%s:%s:%s", speciesID or 0, level or 0, breedQuality or 0, maxHealth or 0, power or 0, speed or 0, name or "", "" )
end
end
Thank you Arkayenro,
I never thought of the tooltip, that was all I needed to get me going. Everything I need is in the default Tooltip so GameTooltip:SetGuildBankItem( tab, slot ) will do it.