Survival of the Fittest - WoWInterface
Thread Tools Display Modes
12-20-20, 02:50 AM   #1
A Flamescale Wyrmkin
Join Date: Feb 2018
Posts: 149
Survival of the Fittest

I use the function IsUsableSpell() and GetSpellCooldown() to examine whether/when "Survival of the Fittest" becomes available.

This spell is only available if there is a Tenacity pet out.

If I am freshy logged in and there is no pet, or if I am freshly logged in with a non-tenacity pet, both the above functions return the true state of the spell, ie not available.

Once I summon a tenacity pet however, both the above functions behave as if the spell is available, regardless if the pet has been dismissed, or the pet is now a non-tenacity one.

The WoW client however correctly highlights the spell, so it knows. How does it do it ?
  Reply With Quote
12-20-20, 05:41 AM   #2
A Frostmaul Preserver
LudiusMaximus's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2018
Posts: 283
That's really strange. It makes you wonder what IsUsableSpell() is good for regarding pet abilities.

A workaround could be this:

Lua Code:
  1. local _, id = GetSpellBookItemName(14, BOOKTYPE_PET)
  2. if id == 264735 then
  3.   -- Survival of the fittest is available.
  4. end
~ Be the change you want to see in the world... of warcraft interface! ~
  Reply With Quote
12-20-20, 01:09 PM   #3
Fishing Trainer
Seerah's Avatar
WoWInterface Super Mod
Join Date: Oct 2006
Posts: 10,848
Perhaps it also checks to see if you actually have a pet summoned.
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Survival of the Fittest

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