GetShapeshiftForm

From Wowpedia
Jump to: navigation, search
index = GetShapeshiftForm(flag)

Arguments

flag
Boolean (Optional) - True if return value is to be compared to a macro's conditional statement. This makes it always return zero for Presences and Auras. False or nil returns an index based on which button to highlight on the shapeshift/stance bar left to right starting at 1.

Returns

index 
Number - one of following:
All
  • 0 = humanoid form
Druid
  • 1 = Bear Form
  • 2 = Cat Form
  • 3 = Travel Form / Aquatic Form / Flight Form (all 3 location-dependent versions of Travel Form count as Form 3)
  • 4 = The first known of: Moonkin Form, Treant Form, Stag Form (in order)
  • 5 = The second known of: Moonkin Form, Treant Form, Stag Form (in order)
  • 6 = The third known of: Moonkin Form, Treant Form, Stag Form (in order)
Note: The last 3 are ordered. For example, if you know Stag Form only, it is form 4. If you know both Treant and Stag, Treant is 4 and Stag is 5. If you know all 3, Moonkin is 4, Treant 5, and Stag 6.
Priest
  • 1 = Shadowform
Rogue
  • 1 = Stealth
  • 2 = Vanish / Shadow Dance (for Subtlety rogues, both Vanish and Shadow Dance return as Form 1)
Shaman
  • 1 = Ghost Wolf
Warrior WoW Icon update.png
  • 1 = Battle Stance
  • 2 = Defensive Stance
  • 3 = Beserker Stance

Notes

For some classes the return value is nil during the loading process. You need to wait until UPDATE_SHAPESHIFT_FORMS fires to get correct return values.