Quantcast How to know if Druid is in cat form? (Classic) - WoWInterface
Thread Tools Display Modes
09-05-19, 12:59 AM   #1
Zam89
A Deviate Faerie Dragon
Join Date: Mar 2019
Posts: 18
How to know if Druid is in cat form? (Classic)

Hi,

hope someone can help me.

How can I get the Info the the Druid is in cat Form or not in classic?

In retail I used for this GetShapeshiftFormId() but this ruction does not exist in classic.
  Reply With Quote
09-05-19, 02:43 AM   #2
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,739
Have you tried GetShapeshiftForm?
https://wow.gamepedia.com/API_GetShapeshiftForm
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW) | TDMOG

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)
  Reply With Quote
09-05-19, 08:22 AM   #3
Zam89
A Deviate Faerie Dragon
Join Date: Mar 2019
Posts: 18
Thanks, I will try this.

At the Moment I use this:
Code:
 local s = nil
        for i = 1, GetNumShapeshiftForms() do
            if select(3, GetShapeshiftFormInfo(i)) then
                s = i
            end
        end
And check if i is 3 because on the site https://wowwiki.fandom.com/wiki/API_...eshiftFormInfo it Said that CAT is 3 and on your Site it should be 2.

Any ideas?
  Reply With Quote
09-05-19, 03:08 PM   #4
Thrumbar
A Flamescale Wyrmkin
Join Date: Jan 2005
Posts: 147
You should note that Wiki is out of date info. Nane was removed for GetShapshifeFormInfo. It is currently

icon, isActive, isCastable, sID = GetShapeshiftFormInfo...

You would need to change the 3 to 2 to detect the active form of the player..


API GetShapeshiftFormInfo

Retrieves information about an available shapeshift form or similar ability.
icon, active, castable, spellID = GetShapeshiftFormInfo(index);


Arguments

index
Number - index, ascending from 1 to GetNumShapeshiftForms()


Returns

icon
String - Path to icon texture

active
Flag - 1 if this shapeshift is currently active, nil otherwise

castable
Flag - 1 if this shapeshift form may be entered, nil otherwise

spellID
Number - ID of the spell that activates this ability

Notes

As well as druid shapeshifting, warrior stances, paladin auras, hunter aspects, death knight presences, and shadowform use this API.


Originally Posted by Zam89 View Post
Thanks, I will try this.

At the Moment I use this:
Code:
 local s = nil
        for i = 1, GetNumShapeshiftForms() do
            if select(3, GetShapeshiftFormInfo(i)) then
                s = i
            end
        end
And check if i is 3 because on the site https://wowwiki.fandom.com/wiki/API_...eshiftFormInfo it Said that CAT is 3 and on your Site it should be 2.

Any ideas?
  Reply With Quote
09-05-19, 03:36 PM   #5
Zam89
A Deviate Faerie Dragon
Join Date: Mar 2019
Posts: 18
Thanks that was it
  Reply With Quote
09-05-19, 11:11 PM   #6
myrroddin
A Pyroguard Emberseer
 
myrroddin's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 1,074
Originally Posted by Thrumbar View Post

Returns

icon
String - Path to icon texture
That will need to be updated, assuming you got that from Wowpedia.org's Interface documentation. Icon should be a fileID, which is a number, not a string.

Better double-check.

FYI, instead of WowWiki, please use this instead: https://wow.gamepedia.com/Wowpedia:I..._customization at least for retail.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » How to know if Druid is in cat form? (Classic)

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