WoW:API GetShapeshiftForm: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
(Updated with new information for Death Knight)
No edit summary
Line 6: Line 6:
<big>'''Arguments'''</big>
<big>'''Arguments'''</big>


:(arg1)
:; arg1 : Boolean - For most classes the argument doesn't matter. Paladin auras and Death Knight Presences however will only be returned if the argument is nil (or false).
:; arg1 : Boolean - False will return values for the Paladin auras and Death Knight Presences, True will return the ohter shapeshift forms.


<big>'''Returns'''</big>
<big>'''Returns'''</big>
:stance
:;stance : Number - one of following:
:;stance : Number - one of following:


Line 17: Line 14:
:::*0 = humanoid form
:::*0 = humanoid form


::;Death Knight
::;Death Knight (only when arg1 is nil)
:::*1 = Blood Presence
:::*1 = Blood Presence
:::*2 = Frost Presence
:::*2 = Frost Presence
Line 30: Line 27:
:::*6 = Flight Form
:::*6 = Flight Form


::;Paladin (only when arg1 is false)
::;Paladin (only when arg1 is nil)
:::*1 = Devotion Aura
:::*1 = Devotion Aura
:::*2 = Retribution Aura
:::*2 = Retribution Aura
Line 39: Line 36:
:::*7 = Crusader Aura
:::*7 = Crusader Aura
:::*? = Sanctity Aura (Retribution Talent, unknown where it fits.)
:::*? = Sanctity Aura (Retribution Talent, unknown where it fits.)
::;Priest
:::*1 = Shadowform


::;Rogue
::;Rogue
Line 49: Line 49:
:::*1 = Battle Stance
:::*1 = Battle Stance
:::*2 = Defensive Stance
:::*2 = Defensive Stance
:::*3 = Beserker Stance
:::*3 = Berserker Stance


== Example ==
== Example ==
  local nStance = GetShapeshiftForm(true);
  local nStance = GetShapeshiftForm();
 
== 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.

Revision as of 01:51, 13 February 2009

WoW API < GetShapeshiftForm

stance = GetShapeshiftForm(arg1);

Parameters

Arguments

arg1
Boolean - For most classes the argument doesn't matter. Paladin auras and Death Knight Presences however will only be returned if the argument is nil (or false).

Returns

stance
Number - one of following:
Any class
  • 0 = humanoid form
Death Knight (only when arg1 is nil)
  • 1 = Blood Presence
  • 2 = Frost Presence
  • 3 = Unholy Presence
Druid
  • 1 = Bear/Dire Bear Form
  • 2 = Aquatic Form
  • 3 = Cat Form
  • 4 = Travel Form
  • 5 = Moonkin/Tree Form (Unless feral. If no moonkin/tree form present, (swift) flight form is form 5)
  • 6 = Flight Form
Paladin (only when arg1 is nil)
  • 1 = Devotion Aura
  • 2 = Retribution Aura
  • 3 = Concentration Aura
  • 4 = Shadow Resistance Aura
  • 5 = Frost Resistance Aura
  • 6 = Fire Resistance Aura
  • 7 = Crusader Aura
  • ? = Sanctity Aura (Retribution Talent, unknown where it fits.)
Priest
  • 1 = Shadowform
Rogue
  • 1 = Stealth
Shaman
  • 1 = Ghost Wolf
Warrior
  • 1 = Battle Stance
  • 2 = Defensive Stance
  • 3 = Berserker Stance

Example

local nStance = GetShapeshiftForm();

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.